summaryrefslogtreecommitdiff
path: root/gdb/dwarf2/line-header.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-05-29 15:15:10 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-05-29 15:15:10 -0400
commit976ca31673841e14a7595ed32f8009b61608fe46 (patch)
treefa94f1d4ebbbe08a4a9c7c42f0ada88aea2f7406 /gdb/dwarf2/line-header.c
parent678048e8079ace915052f3070b2df97bcaea58d2 (diff)
downloadbinutils-gdb-976ca31673841e14a7595ed32f8009b61608fe46.tar.gz
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/line-header.c')
-rw-r--r--gdb/dwarf2/line-header.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/gdb/dwarf2/line-header.c b/gdb/dwarf2/line-header.c
index 58749e9594b..6c67f2b551f 100644
--- a/gdb/dwarf2/line-header.c
+++ b/gdb/dwarf2/line-header.c
@@ -154,9 +154,8 @@ read_checked_initial_length_and_offset (bfd *abfd, const gdb_byte *buf,
format. */
static void
-read_formatted_entries (struct dwarf2_per_objfile *dwarf2_per_objfile,
- bfd *abfd, const gdb_byte **bufp,
- struct line_header *lh,
+read_formatted_entries (dwarf2_per_objfile *per_objfile, bfd *abfd,
+ const gdb_byte **bufp, struct line_header *lh,
const struct comp_unit_head *cu_header,
void (*callback) (struct line_header *lh,
const char *name,
@@ -208,9 +207,7 @@ read_formatted_entries (struct dwarf2_per_objfile *dwarf2_per_objfile,
case DW_FORM_line_strp:
string.emplace
- (dwarf2_per_objfile->read_line_string (buf,
- cu_header,
- &bytes_read));
+ (per_objfile->read_line_string (buf, cu_header, &bytes_read));
buf += bytes_read;
break;
@@ -286,7 +283,7 @@ read_formatted_entries (struct dwarf2_per_objfile *dwarf2_per_objfile,
line_header_up
dwarf_decode_line_header (sect_offset sect_off, bool is_dwz,
- struct dwarf2_per_objfile *dwarf2_per_objfile,
+ dwarf2_per_objfile *per_objfile,
struct dwarf2_section_info *section,
const struct comp_unit_head *cu_header)
{
@@ -393,7 +390,7 @@ dwarf_decode_line_header (sect_offset sect_off, bool is_dwz,
if (lh->version >= 5)
{
/* Read directory table. */
- read_formatted_entries (dwarf2_per_objfile, abfd, &line_ptr, lh.get (),
+ read_formatted_entries (per_objfile, abfd, &line_ptr, lh.get (),
cu_header,
[] (struct line_header *header, const char *name,
dir_index d_index, unsigned int mod_time,
@@ -403,7 +400,7 @@ dwarf_decode_line_header (sect_offset sect_off, bool is_dwz,
});
/* Read file name table. */
- read_formatted_entries (dwarf2_per_objfile, abfd, &line_ptr, lh.get (),
+ read_formatted_entries (per_objfile, abfd, &line_ptr, lh.get (),
cu_header,
[] (struct line_header *header, const char *name,
dir_index d_index, unsigned int mod_time,