binutils-gdb/gdb/dwarf2
Tom Tromey 2a32d78f8a Clean up attribute reprocessing
I ran across the attribute reprocessing code recently and noticed that
it unconditionally sets members of the CU when reading a DIE.  Also,
each spot reading attributes needs to be careful to "reprocess" them
as a separate step.

This seemed excessive to me, because while reprocessing applies to any
DIE, setting the CU members is only necessary for the toplevel DIE in
any given CU.

This patch introduces a new read_toplevel_die function and changes a
few spots to call it.  This is easily done because reading the
toplevel DIE is already special.

I left the reprocessing flag and associated checks in attribute.  It
could be stripped out, but I am not sure it would provide much value
(maybe some iota of performance).

Regression tested on x86-64 Fedora 36.
2023-03-07 14:32:45 -07:00
..
abbrev-cache.c
abbrev-cache.h
abbrev.c
abbrev.h
attribute.c
attribute.h
call-site.h gdb: update some copyright years (2022 -> 2023) 2023-03-01 20:54:56 -05:00
comp-unit-head.c
comp-unit-head.h
cooked-index.c Fix selfcheck regression due to new maint command 2023-03-07 11:30:20 -07:00
cooked-index.h Write the DWARF index in the background 2023-02-24 11:46:53 -07:00
cu.c
cu.h
die.c
die.h
dwz.c
dwz.h
expr.c
expr.h
file-and-dir.h
frame-tailcall.c
frame-tailcall.h
frame.c
frame.h
index-cache.c Only use the per-BFD object to write a DWARF index 2023-02-24 11:46:53 -07:00
index-cache.h Only use the per-BFD object to write a DWARF index 2023-02-24 11:46:53 -07:00
index-common.c
index-common.h
index-write.c Only use the per-BFD object to write a DWARF index 2023-02-24 11:46:53 -07:00
index-write.h Only use the per-BFD object to write a DWARF index 2023-02-24 11:46:53 -07:00
leb.c
leb.h
line-header.c
line-header.h
loc.c Use const for dwarf2_property_baton 2023-03-01 15:33:03 -07:00
loc.h Use const for dwarf2_property_baton 2023-03-01 15:33:03 -07:00
macro.c
macro.h
mapped-index.h Write the DWARF index in the background 2023-02-24 11:46:53 -07:00
public.h
read-debug-names.c
read-debug-names.h
read-gdb-index.c
read-gdb-index.h
read.c Clean up attribute reprocessing 2023-03-07 14:32:45 -07:00
read.h
sect-names.h
section.c
section.h
stringify.c
stringify.h
tag.h
types.h gdb: update some copyright years (2022 -> 2023) 2023-03-01 20:54:56 -05:00