mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
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 <tom@tromey.com> * dwarf2/read.c (struct die_reader_specs) <abfd>: Fix formatting. (peek_die_abbrev): Use reader.abfd.
This commit is contained in:
@ -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>
|
2021-03-14 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* dwarf2/read.c (dwarf2_per_cu_data::get_header): Set
|
* dwarf2/read.c (dwarf2_per_cu_data::get_header): Set
|
||||||
|
@ -955,7 +955,7 @@ struct dwp_file
|
|||||||
struct die_reader_specs
|
struct die_reader_specs
|
||||||
{
|
{
|
||||||
/* The bfd of die_section. */
|
/* The bfd of die_section. */
|
||||||
bfd* abfd;
|
bfd *abfd;
|
||||||
|
|
||||||
/* The CU of the DIE we are parsing. */
|
/* The CU of the DIE we are parsing. */
|
||||||
struct dwarf2_cu *cu;
|
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)
|
const gdb_byte *info_ptr, unsigned int *bytes_read)
|
||||||
{
|
{
|
||||||
dwarf2_cu *cu = reader.cu;
|
dwarf2_cu *cu = reader.cu;
|
||||||
bfd *abfd = cu->per_objfile->objfile->obfd;
|
bfd *abfd = reader.abfd;
|
||||||
unsigned int abbrev_number
|
unsigned int abbrev_number
|
||||||
= read_unsigned_leb128 (abfd, info_ptr, bytes_read);
|
= read_unsigned_leb128 (abfd, info_ptr, bytes_read);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user