diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-01-27 21:50:32 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2022-02-06 16:03:46 -0500 |
commit | 6c9c307c67043b55a209af402246404d89f992c9 (patch) | |
tree | 20a8edd6e245153957a63a702f8f2eef122867c6 /gdb/symtab.h | |
parent | 66d7f48f8045adf266046df7ceb84161d5678cfa (diff) | |
download | gdb-6c9c307c67043b55a209af402246404d89f992c9.zip gdb-6c9c307c67043b55a209af402246404d89f992c9.tar.gz gdb-6c9c307c67043b55a209af402246404d89f992c9.tar.bz2 |
gdb: remove SYMBOL_DOMAIN macro
Add a getter and a setter for a symbol's domain. Remove the
corresponding macro and adjust all callers.
Change-Id: I54465b50ac89739c663859a726aef8cdc6e4b8f3
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r-- | gdb/symtab.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index a00b48f..2825697 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1113,7 +1113,7 @@ struct symbol : public general_symbol_info, public allocate_on_obstack { symbol () /* Class-initialization of bitfields is only allowed in C++20. */ - : domain (UNDEF_DOMAIN), + : m_domain (UNDEF_DOMAIN), m_aclass_index (0), is_objfile_owned (1), is_argument (0), @@ -1158,6 +1158,16 @@ struct symbol : public general_symbol_info, public allocate_on_obstack return this->impl ().aclass; } + domain_enum domain () const + { + return m_domain; + } + + void set_domain (domain_enum domain) + { + m_domain = domain; + } + /* Data type of value */ struct type *type = nullptr; @@ -1178,7 +1188,7 @@ struct symbol : public general_symbol_info, public allocate_on_obstack /* Domain code. */ - ENUM_BITFIELD(domain_enum_tag) domain : SYMBOL_DOMAIN_BITS; + ENUM_BITFIELD(domain_enum_tag) m_domain : SYMBOL_DOMAIN_BITS; /* Address class. This holds an index into the 'symbol_impls' table. The actual enum address_class value is stored there, @@ -1260,7 +1270,6 @@ struct block_symbol /* Note: There is no accessor macro for symbol.owner because it is "private". */ -#define SYMBOL_DOMAIN(symbol) (symbol)->domain #define SYMBOL_OBJFILE_OWNED(symbol) ((symbol)->is_objfile_owned) #define SYMBOL_IS_ARGUMENT(symbol) (symbol)->is_argument #define SYMBOL_INLINED(symbol) (symbol)->is_inlined |