From 976ca31673841e14a7595ed32f8009b61608fe46 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 29 May 2020 15:15:10 -0400 Subject: 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 --- gdb/dwarf2/index-cache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/dwarf2/index-cache.c') diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c index cb79c87..38cbc54 100644 --- a/gdb/dwarf2/index-cache.c +++ b/gdb/dwarf2/index-cache.c @@ -87,9 +87,9 @@ index_cache::disable () /* See dwarf-index-cache.h. */ void -index_cache::store (struct dwarf2_per_objfile *dwarf2_per_objfile) +index_cache::store (dwarf2_per_objfile *per_objfile) { - objfile *obj = dwarf2_per_objfile->objfile; + objfile *obj = per_objfile->objfile; if (!enabled ()) return; @@ -108,7 +108,7 @@ index_cache::store (struct dwarf2_per_objfile *dwarf2_per_objfile) /* Get build id of dwz file, if present. */ gdb::optional dwz_build_id_str; - const dwz_file *dwz = dwarf2_get_dwz_file (dwarf2_per_objfile->per_bfd); + const dwz_file *dwz = dwarf2_get_dwz_file (per_objfile->per_bfd); const char *dwz_build_id_ptr = NULL; if (dwz != nullptr) @@ -149,7 +149,7 @@ index_cache::store (struct dwarf2_per_objfile *dwarf2_per_objfile) /* Write the index itself to the directory, using the build id as the filename. */ - write_psymtabs_to_index (dwarf2_per_objfile, m_dir.c_str (), + write_psymtabs_to_index (per_objfile, m_dir.c_str (), build_id_str.c_str (), dwz_build_id_ptr, dw_index_kind::GDB_INDEX); } -- cgit v1.1