aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2021-11-19 21:35:17 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-02-06 15:48:18 -0500
commit510860f2787f354d1c294958e4cc5e81256ece58 (patch)
tree12a7f08e5386b2986994665fe7c43b0eea80ade8 /gdb/dwarf2
parent102cc23543fc37b42c4814f594f130f862397178 (diff)
downloadgdb-510860f2787f354d1c294958e4cc5e81256ece58.zip
gdb-510860f2787f354d1c294958e4cc5e81256ece58.tar.gz
gdb-510860f2787f354d1c294958e4cc5e81256ece58.tar.bz2
gdb: remove COMPUNIT_FILETABS macro
I think that most remaining uses of COMPUNIT_FILETABS intend to get the primary filetab of the compunit_symtab specifically (and not to iterate over all filetabs, for example, those cases would use compunit_filetabs, which has been converted to compunit_symtab::filetabs), so replace mosts uses with compunit_symtab::primary_filetab. In jit.c, function finalize_symtab, we can save the symtab object returned by allocate_symtab and use it, it makes things simpler. Change-Id: I4e51d6d4b40759de8768b61292e5e13c8eae2e38
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r--gdb/dwarf2/read.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 84877e6..7e62d11 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -9477,8 +9477,8 @@ process_full_comp_unit (dwarf2_cu *cu, enum language pretend_language)
compilation is from a C file generated by language preprocessors, do
not set the language if it was already deduced by start_subfile. */
if (!(cu->per_cu->lang == language_c
- && COMPUNIT_FILETABS (cust)->language != language_unknown))
- COMPUNIT_FILETABS (cust)->language = cu->per_cu->lang;
+ && cust->primary_filetab ()->language != language_unknown))
+ cust->primary_filetab ()->language = cu->per_cu->lang;
/* GCC-4.0 has started to support -fvar-tracking. GCC-3.x still can
produce DW_AT_location with location lists but it can be possibly
@@ -9562,8 +9562,8 @@ process_full_type_unit (dwarf2_cu *cu,
do not set the language if it was already deduced by
start_subfile. */
if (!(cu->per_cu->lang == language_c
- && COMPUNIT_FILETABS (cust)->language != language_c))
- COMPUNIT_FILETABS (cust)->language = cu->per_cu->lang;
+ && cust->primary_filetab ()->language != language_c))
+ cust->primary_filetab ()->language = cu->per_cu->lang;
}
}
else