aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/index-write.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-07-04 10:28:42 +0200
committerTom de Vries <tdevries@suse.de>2022-07-04 10:28:42 +0200
commit2c474c46943e5242f356a0c0676e2f7bd223c8a9 (patch)
tree031939ed2a8c17af5e254d6fc60954f43bd7d481 /gdb/dwarf2/index-write.c
parent58098fd779cca68f6a3fee6c289da2e352ccd7a8 (diff)
downloadbinutils-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.c2
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.