diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-05-29 15:15:10 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-29 15:15:10 -0400 |
commit | 976ca31673841e14a7595ed32f8009b61608fe46 (patch) | |
tree | fa94f1d4ebbbe08a4a9c7c42f0ada88aea2f7406 /gdb/dwarf2/macro.c | |
parent | 678048e8079ace915052f3070b2df97bcaea58d2 (diff) | |
download | gdb-976ca31673841e14a7595ed32f8009b61608fe46.zip gdb-976ca31673841e14a7595ed32f8009b61608fe46.tar.gz gdb-976ca31673841e14a7595ed32f8009b61608fe46.tar.bz2 |
gdb: rename dwarf2_per_objfile variables/fields to per_objfile
While doing the psymtab-sharing patchset, I avoided renaming variables
unnecessarily to avoid adding noise to patches, but I'd like to do it
now. Basically, we have these dwarf2 per-something structures:
- dwarf2_per_objfile
- dwarf2_per_bfd
- dwarf2_per_cu_data
I named the instances of dwarf2_per_bfd `per_bfd` and most of instances
of dwarf2_per_cu_data are called `per_cu`. Most pre-existing instances
of dwarf2_per_objfile are named `dwarf2_per_objfile`. For consistency
with the other type, I'd like to rename them to just `per_objfile`. The
`dwarf2_` prefix is superfluous, since it's already clear we are in
dwarf2 code. It also helps reducing the line wrapping by saving 7
precious columns.
gdb/ChangeLog:
* dwarf2/comp-unit.c, dwarf2/comp-unit.h, dwarf2/index-cache.c,
dwarf2/index-cache.h, dwarf2/index-write.c,
dwarf2/index-write.h, dwarf2/line-header.c,
dwarf2/line-header.h, dwarf2/macro.c, dwarf2/macro.h,
dwarf2/read.c, dwarf2/read.h: Rename struct dwarf2_per_objfile
variables and fields from `dwarf2_per_objfile` to just
`per_objfile` throughout.
Change-Id: I3c45cdcc561265e90df82cbd36b4b4ef2fa73aef
Diffstat (limited to 'gdb/dwarf2/macro.c')
-rw-r--r-- | gdb/dwarf2/macro.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/gdb/dwarf2/macro.c b/gdb/dwarf2/macro.c index a44e2c7..d047d80 100644 --- a/gdb/dwarf2/macro.c +++ b/gdb/dwarf2/macro.c @@ -418,7 +418,7 @@ dwarf_parse_macro_header (const gdb_byte **opcode_definitions, including DW_MACRO_import. */ static void -dwarf_decode_macro_bytes (struct dwarf2_per_objfile *dwarf2_per_objfile, +dwarf_decode_macro_bytes (dwarf2_per_objfile *per_objfile, buildsym_compunit *builder, bfd *abfd, const gdb_byte *mac_ptr, const gdb_byte *mac_end, @@ -429,7 +429,7 @@ dwarf_decode_macro_bytes (struct dwarf2_per_objfile *dwarf2_per_objfile, unsigned int offset_size, htab_t include_hash) { - struct objfile *objfile = dwarf2_per_objfile->objfile; + struct objfile *objfile = per_objfile->objfile; enum dwarf_macro_record_type macinfo_type; int at_commandline; const gdb_byte *opcode_definitions[256]; @@ -506,15 +506,14 @@ dwarf_decode_macro_bytes (struct dwarf2_per_objfile *dwarf2_per_objfile, || macinfo_type == DW_MACRO_undef_sup || section_is_dwz) { - struct dwz_file *dwz - = dwarf2_get_dwz_file (dwarf2_per_objfile->per_bfd); + dwz_file *dwz = dwarf2_get_dwz_file (per_objfile->per_bfd); body = dwz->read_string (objfile, str_offset); } else - body = dwarf2_per_objfile->per_bfd->str.read_string (objfile, - str_offset, - "DW_FORM_strp"); + body = per_objfile->per_bfd->str.read_string (objfile, + str_offset, + "DW_FORM_strp"); } is_define = (macinfo_type == DW_MACRO_define @@ -644,8 +643,7 @@ dwarf_decode_macro_bytes (struct dwarf2_per_objfile *dwarf2_per_objfile, if (macinfo_type == DW_MACRO_import_sup) { - struct dwz_file *dwz - = dwarf2_get_dwz_file (dwarf2_per_objfile->per_bfd); + dwz_file *dwz = dwarf2_get_dwz_file (per_objfile->per_bfd); dwz->macro.read (objfile); @@ -669,11 +667,11 @@ dwarf_decode_macro_bytes (struct dwarf2_per_objfile *dwarf2_per_objfile, { *slot = (void *) new_mac_ptr; - dwarf_decode_macro_bytes (dwarf2_per_objfile, builder, - include_bfd, new_mac_ptr, - include_mac_end, current_file, lh, - section, section_is_gnu, is_dwz, - offset_size, include_hash); + dwarf_decode_macro_bytes (per_objfile, builder, include_bfd, + new_mac_ptr, include_mac_end, + current_file, lh, section, + section_is_gnu, is_dwz, offset_size, + include_hash); htab_remove_elt (include_hash, (void *) new_mac_ptr); } @@ -710,7 +708,7 @@ dwarf_decode_macro_bytes (struct dwarf2_per_objfile *dwarf2_per_objfile, } void -dwarf_decode_macros (struct dwarf2_per_objfile *dwarf2_per_objfile, +dwarf_decode_macros (dwarf2_per_objfile *per_objfile, buildsym_compunit *builder, const dwarf2_section_info *section, const struct line_header *lh, unsigned int offset_size, @@ -861,9 +859,7 @@ dwarf_decode_macros (struct dwarf2_per_objfile *dwarf2_per_objfile, mac_ptr = section->buffer + offset; slot = htab_find_slot (include_hash.get (), mac_ptr, INSERT); *slot = (void *) mac_ptr; - dwarf_decode_macro_bytes (dwarf2_per_objfile, builder, - abfd, mac_ptr, mac_end, - current_file, lh, section, - section_is_gnu, 0, offset_size, - include_hash.get ()); + dwarf_decode_macro_bytes (per_objfile, builder, abfd, mac_ptr, mac_end, + current_file, lh, section, section_is_gnu, 0, + offset_size, include_hash.get ()); } |