aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-01-28 10:28:57 -0500
committerSimon Marchi <simon.marchi@efficios.com>2022-04-11 10:46:07 -0400
commit60f62e2b83eb362c5063247235c111a59e13cad1 (patch)
treec74a83d20a05ab710391425f072f79e31276db5a /gdb/symtab.h
parent4aeddc50d7a06294cc124dfd8f43992ffa0b7382 (diff)
downloadfsf-binutils-gdb-60f62e2b83eb362c5063247235c111a59e13cad1.zip
fsf-binutils-gdb-60f62e2b83eb362c5063247235c111a59e13cad1.tar.gz
fsf-binutils-gdb-60f62e2b83eb362c5063247235c111a59e13cad1.tar.bz2
gdb: remove MSYMBOL_TYPE macro
Add a getter and a setter for a minimal symbol's type. Remove the corresponding macro and adjust all callers. Change-Id: I89900df5ffa5687133fe1a16b2e0d4684e67a77d
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 390ee9d..3bb23d6 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -699,6 +699,20 @@ struct minimal_symbol : public general_symbol_info
return m_value.address;
}
+ /* Return this minimal symbol's type. */
+
+ minimal_symbol_type type () const
+ {
+ return m_type;
+ }
+
+ /* Set this minimal symbol's type. */
+
+ void set_type (minimal_symbol_type type)
+ {
+ m_type = type;
+ }
+
/* Size of this symbol. dbx_end_psymtab in dbxread.c uses this
information to calculate the end of the partial symtab based on the
address of the last symbol plus the size of the last symbol. */
@@ -710,7 +724,7 @@ struct minimal_symbol : public general_symbol_info
/* Classification type for this minimal symbol. */
- ENUM_BITFIELD(minimal_symbol_type) type : MINSYM_TYPE_BITS;
+ ENUM_BITFIELD(minimal_symbol_type) m_type : MINSYM_TYPE_BITS;
/* Non-zero if this symbol was created by gdb.
Such symbols do not appear in the output of "info var|fun". */
@@ -766,7 +780,6 @@ struct minimal_symbol : public general_symbol_info
(msymbol)->has_size = 1; \
} while (0)
#define MSYMBOL_HAS_SIZE(msymbol) ((msymbol)->has_size + 0)
-#define MSYMBOL_TYPE(msymbol) (msymbol)->type
#include "minsyms.h"