aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2021-11-19 21:49:53 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-02-06 15:48:18 -0500
commit422f1ea279deea8530b679e4770e97f669797543 (patch)
tree24b4b77f180dbaef3ee816c2a17d60429478ae3e /gdb/symtab.h
parent510860f2787f354d1c294958e4cc5e81256ece58 (diff)
downloadbinutils-422f1ea279deea8530b679e4770e97f669797543.zip
binutils-422f1ea279deea8530b679e4770e97f669797543.tar.gz
binutils-422f1ea279deea8530b679e4770e97f669797543.tar.bz2
gdb: remove COMPUNIT_DEBUGFORMAT macro, add getter/setter
Add a getter and a setter for a compunit_symtab's debugformat. Remove the corresponding macro and adjust all callers. Change-Id: I1667b02d5322346f8e23abd9f8a584afbcd75975
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 45d4bc4..2500c8e 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1482,6 +1482,16 @@ struct compunit_symtab
}
}
+ const char *debugformat () const
+ {
+ return m_debugformat;
+ }
+
+ void set_debugformat (const char *debugformat)
+ {
+ m_debugformat = debugformat;
+ }
+
/* Make PRIMARY_FILETAB the primary filetab of this compunit symtab.
PRIMARY_FILETAB must already be a filetab of this compunit symtab. */
@@ -1525,7 +1535,7 @@ struct compunit_symtab
such as "stabs", "dwarf 1", "dwarf 2", "coff", etc. This is mostly useful
for automated testing of gdb but may also be information that is
useful to the user. */
- const char *debugformat;
+ const char *m_debugformat;
/* String of producer version information, or NULL if we don't know. */
const char *producer;
@@ -1577,7 +1587,6 @@ struct compunit_symtab
using compunit_symtab_range = next_range<compunit_symtab>;
-#define COMPUNIT_DEBUGFORMAT(cust) ((cust)->debugformat)
#define COMPUNIT_PRODUCER(cust) ((cust)->producer)
#define COMPUNIT_DIRNAME(cust) ((cust)->dirname)
#define COMPUNIT_BLOCKVECTOR(cust) ((cust)->blockvector)