mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-06 12:09:26 +08:00
2a32d78f8a
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. |
||
---|---|---|
.. | ||
abbrev-cache.c | ||
abbrev-cache.h | ||
abbrev.c | ||
abbrev.h | ||
attribute.c | ||
attribute.h | ||
call-site.h | ||
comp-unit-head.c | ||
comp-unit-head.h | ||
cooked-index.c | ||
cooked-index.h | ||
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 | ||
index-cache.h | ||
index-common.c | ||
index-common.h | ||
index-write.c | ||
index-write.h | ||
leb.c | ||
leb.h | ||
line-header.c | ||
line-header.h | ||
loc.c | ||
loc.h | ||
macro.c | ||
macro.h | ||
mapped-index.h | ||
public.h | ||
read-debug-names.c | ||
read-debug-names.h | ||
read-gdb-index.c | ||
read-gdb-index.h | ||
read.c | ||
read.h | ||
sect-names.h | ||
section.c | ||
section.h | ||
stringify.c | ||
stringify.h | ||
tag.h | ||
types.h |