aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2021-11-19 22:43:56 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-02-06 15:48:19 -0500
commit10cc645b6a09c58cf1a5ce53accbe6cf3178ca12 (patch)
tree1c66ae2f2ca011fa051bee725a67cf3180123704 /gdb/symtab.h
parent3908b699f8d08499ad53adcb34e8a4675cf39142 (diff)
downloadgdb-10cc645b6a09c58cf1a5ce53accbe6cf3178ca12.zip
gdb-10cc645b6a09c58cf1a5ce53accbe6cf3178ca12.tar.gz
gdb-10cc645b6a09c58cf1a5ce53accbe6cf3178ca12.tar.bz2
gdb: remove COMPUNIT_MACRO_TABLE macro, add getter/setter
Add a getter and a setter for a compunit_symtab's macro table. Remove the corresponding macro and adjust all callers. Change-Id: I00615ea72d5ac43d9a865e941cb2de0a979c173a
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 5419e70..c319d51 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1551,6 +1551,16 @@ struct compunit_symtab
m_epilogue_unwind_valid = epilogue_unwind_valid;
}
+ struct macro_table *macro_table () const
+ {
+ return m_macro_table;
+ }
+
+ void set_macro_table (struct macro_table *macro_table)
+ {
+ m_macro_table = macro_table;
+ }
+
/* Make PRIMARY_FILETAB the primary filetab of this compunit symtab.
PRIMARY_FILETAB must already be a filetab of this compunit symtab. */
@@ -1626,7 +1636,7 @@ struct compunit_symtab
is shared between different symtabs in a given compilation unit.
It's debatable whether it *should* be shared among all the symtabs in
the given compilation unit, but it currently is. */
- struct macro_table *macro_table;
+ struct macro_table *m_macro_table;
/* If non-NULL, then this points to a NULL-terminated vector of
included compunits. When searching the static or global
@@ -1646,8 +1656,6 @@ struct compunit_symtab
using compunit_symtab_range = next_range<compunit_symtab>;
-#define COMPUNIT_MACRO_TABLE(cust) ((cust)->macro_table)
-
/* Return the language of CUST. */
extern enum language compunit_language (const struct compunit_symtab *cust);