diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-11-19 21:35:17 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-02-06 15:48:18 -0500 |
commit | 510860f2787f354d1c294958e4cc5e81256ece58 (patch) | |
tree | 12a7f08e5386b2986994665fe7c43b0eea80ade8 /gdb/symtab.h | |
parent | 102cc23543fc37b42c4814f594f130f862397178 (diff) | |
download | gdb-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/symtab.h')
-rw-r--r-- | gdb/symtab.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index 670826d..45d4bc4 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1577,7 +1577,6 @@ struct compunit_symtab using compunit_symtab_range = next_range<compunit_symtab>; -#define COMPUNIT_FILETABS(cust) (*(cust)->filetabs ().begin ()) #define COMPUNIT_DEBUGFORMAT(cust) ((cust)->debugformat) #define COMPUNIT_PRODUCER(cust) ((cust)->producer) #define COMPUNIT_DIRNAME(cust) ((cust)->dirname) @@ -1596,7 +1595,7 @@ extern enum language compunit_language (const struct compunit_symtab *cust); static inline bool is_main_symtab_of_compunit_symtab (struct symtab *symtab) { - return symtab == COMPUNIT_FILETABS (SYMTAB_COMPUNIT (symtab)); + return symtab == SYMTAB_COMPUNIT (symtab)->primary_filetab (); } |