]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Minor tweak to use die_reader_specs::abfd
authorTom Tromey <tom@tromey.com>
Sun, 14 Mar 2021 17:42:05 +0000 (11:42 -0600)
committerTom Tromey <tom@tromey.com>
Sun, 14 Mar 2021 17:50:06 +0000 (11:50 -0600)
For an experiment I'm working on, it would be convenient if
die_reader_specs::cu could be NULL.  This is fairly involved to
implement, but I did notice one spot that could conveniently be
updated.  While making this trivial change, I also noticed a small,
related formatting error.

2021-03-14  Tom Tromey  <tom@tromey.com>

* dwarf2/read.c (struct die_reader_specs) <abfd>: Fix formatting.
(peek_die_abbrev): Use reader.abfd.

gdb/ChangeLog
gdb/dwarf2/read.c

index 387d2d545027696f4fa9d5baf7343cbd8a7b882b..ad596d8626a5cfef41ac3becb94a0607fb2ffcd2 100644 (file)
@@ -1,3 +1,8 @@
+2021-03-14  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (struct die_reader_specs) <abfd>: Fix formatting.
+       (peek_die_abbrev): Use reader.abfd.
+
 2021-03-14  Tom Tromey  <tom@tromey.com>
 
        * dwarf2/read.c (dwarf2_per_cu_data::get_header): Set
index dcf161fa359a825f6a353830e6d30dad015bebf8..f625a618a6de8dee9c74b744734e5a614ba8bfed 100644 (file)
@@ -955,7 +955,7 @@ struct dwp_file
 struct die_reader_specs
 {
   /* The bfd of die_section.  */
-  bfdabfd;
+  bfd *abfd;
 
   /* The CU of the DIE we are parsing.  */
   struct dwarf2_cu *cu;
@@ -8702,7 +8702,7 @@ peek_die_abbrev (const die_reader_specs &reader,
                 const gdb_byte *info_ptr, unsigned int *bytes_read)
 {
   dwarf2_cu *cu = reader.cu;
-  bfd *abfd = cu->per_objfile->objfile->obfd;
+  bfd *abfd = reader.abfd;
   unsigned int abbrev_number
     = read_unsigned_leb128 (abfd, info_ptr, bytes_read);