[PATCH] gdb: rename dwarf2_per_objfile variables/fields to per_objfile

Kevin Buettner kevinb@redhat.com
Thu May 28 23:17:49 GMT 2020


On Thu, 28 May 2020 15:28:08 -0400
Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> wrote:

> 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.

LGTM.

Kevin



More information about the Gdb-patches mailing list