Add reprocessing flag to struct attribute
authorTom Tromey <tom@tromey.com>
Wed, 30 Sep 2020 00:49:08 +0000 (18:49 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 30 Sep 2020 02:29:06 +0000 (20:29 -0600)
commitfe56917a86c37fbf4399583f4fa041227594d187
tree2e9e30bfc67b8b861c3ce510fddfb8a8eb7859ed
parent414ad644a86fab3e5c22f622c5f586ce7a8bcf03
Add reprocessing flag to struct attribute

Some forms require "reprocessing" -- a second pass to update their
value appropriately.  In this case, we'll set the unsigned value on
the attribute, and then later set it to the correct value.

To handle this, we introduce a reprocessing flag to attribute.  Then,
we manage this flag to ensure that setting and unsetting is done
properly.

gdb/ChangeLog
2020-09-29  Tom Tromey  <tom@tromey.com>

* dwarf2/read.c (read_cutu_die_from_dwo): Use OBSTACK_ZALLOC.
(read_attribute_reprocess, read_attribute_value): Update.
(read_attribute): Clear requires_reprocessing.
* dwarf2/attribute.h (struct attribute) <as_unsigned_reprocess,
form_requires_reprocessing>: New methods.
<string_init>: Clear requires_reprocessing.
<set_unsigned_reprocess>: New method.
<name>: Shrink by one bit.
<requires_reprocessing>: New member.
* dwarf2/attribute.c (attribute::form_requires_reprocessing): New
method.
gdb/ChangeLog
gdb/dwarf2/attribute.c
gdb/dwarf2/attribute.h
gdb/dwarf2/read.c
This page took 0.030643 seconds and 4 git commands to generate.