diff options
author | Tom de Vries <tdevries@suse.de> | 2022-07-04 10:28:42 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-07-04 10:28:42 +0200 |
commit | 2c474c46943e5242f356a0c0676e2f7bd223c8a9 (patch) | |
tree | 031939ed2a8c17af5e254d6fc60954f43bd7d481 /gdb/dwarf2/index-write.c | |
parent | 58098fd779cca68f6a3fee6c289da2e352ccd7a8 (diff) | |
download | binutils-2c474c46943e5242f356a0c0676e2f7bd223c8a9.zip binutils-2c474c46943e5242f356a0c0676e2f7bd223c8a9.tar.gz binutils-2c474c46943e5242f356a0c0676e2f7bd223c8a9.tar.bz2 |
[gdb/symtab] Add get/set functions for per_cu->lang/unit_type
The dwarf2_per_cu_data fields lang and unit_type both have a dont-know
initial value (respectively language_unknown and (dwarf_unit_type)0), which
allows us to add certain checks, f.i. checking that that a field is not read
before written.
Add get/set member functions for the two fields as a convenient location to
add such checks, make the fields private to enforce using the member
functions, and add the m_ prefix.
Tested on x86_64-linux.
Diffstat (limited to 'gdb/dwarf2/index-write.c')
-rw-r--r-- | gdb/dwarf2/index-write.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c index 7f8df0b..c3aad8d 100644 --- a/gdb/dwarf2/index-write.c +++ b/gdb/dwarf2/index-write.c @@ -583,7 +583,7 @@ public: insert (tag, name, it->second, (entry->flags & IS_STATIC) != 0, entry->per_cu->is_debug_types ? unit_kind::tu : unit_kind::cu, - entry->per_cu->lang); + entry->per_cu->lang ()); } /* Build all the tables. All symbols must be already inserted. |