From: Tom Tromey Date: Sun, 14 Mar 2021 17:42:05 +0000 (-0600) Subject: Minor tweak to use die_reader_specs::abfd X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0280fdcc0822f028d9889bb8c9559989bf71e69b;p=binutils-gdb.git Minor tweak to use die_reader_specs::abfd 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 * dwarf2/read.c (struct die_reader_specs) : Fix formatting. (peek_die_abbrev): Use reader.abfd. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 387d2d54502..ad596d8626a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2021-03-14 Tom Tromey + + * dwarf2/read.c (struct die_reader_specs) : Fix formatting. + (peek_die_abbrev): Use reader.abfd. + 2021-03-14 Tom Tromey * dwarf2/read.c (dwarf2_per_cu_data::get_header): Set diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index dcf161fa359..f625a618a6d 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -955,7 +955,7 @@ struct dwp_file struct die_reader_specs { /* The bfd of die_section. */ - bfd* abfd; + 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);