aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-01-28 10:41:49 -0500
committerSimon Marchi <simon.marchi@efficios.com>2022-04-11 10:46:52 -0400
commit5bbfd12ddaff56898d5791241cabd1a7b781a416 (patch)
tree9b0dd8c1404a213a6125d4130bfc565de375e873 /gdb/symtab.h
parent60f62e2b83eb362c5063247235c111a59e13cad1 (diff)
downloadgdb-5bbfd12ddaff56898d5791241cabd1a7b781a416.zip
gdb-5bbfd12ddaff56898d5791241cabd1a7b781a416.tar.gz
gdb-5bbfd12ddaff56898d5791241cabd1a7b781a416.tar.bz2
gdb: remove minimal symbol size macros
Remove MSYMBOL_HAS_SIZE, MSYMBOL_SIZE and SET_MSYMBOL_SIZE, replace them with equivalent methods. Change-Id: I6ee1cf82df37e58dff52ea6568ceb4649c7d7538
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h34
1 files changed, 24 insertions, 10 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 3bb23d6..e82572c 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -713,11 +713,33 @@ struct minimal_symbol : public general_symbol_info
m_type = type;
}
+ /* Return this minimal symbol's size. */
+
+ unsigned long size () const
+ {
+ return m_size;
+ }
+
+ /* Set this minimal symbol's size. */
+
+ void set_size (unsigned long size)
+ {
+ m_size = size;
+ m_has_size = 1;
+ }
+
+ /* Return true if this minimal symbol's size is known. */
+
+ bool has_size () const
+ {
+ return m_has_size;
+ }
+
/* 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. */
- unsigned long size;
+ unsigned long m_size;
/* Which source file is this symbol in? Only relevant for mst_file_*. */
const char *filename;
@@ -737,7 +759,7 @@ struct minimal_symbol : public general_symbol_info
/* Nonzero iff the size of the minimal symbol has been set.
Symbol size information can sometimes not be determined, because
the object file format may not carry that piece of information. */
- unsigned int has_size : 1;
+ unsigned int m_has_size : 1;
/* For data symbols only, if this is set, then the symbol might be
subject to copy relocation. In this case, a minimal symbol
@@ -772,14 +794,6 @@ struct minimal_symbol : public general_symbol_info
#define MSYMBOL_TARGET_FLAG_1(msymbol) (msymbol)->target_flag_1
#define MSYMBOL_TARGET_FLAG_2(msymbol) (msymbol)->target_flag_2
-#define MSYMBOL_SIZE(msymbol) ((msymbol)->size + 0)
-#define SET_MSYMBOL_SIZE(msymbol, sz) \
- do \
- { \
- (msymbol)->size = sz; \
- (msymbol)->has_size = 1; \
- } while (0)
-#define MSYMBOL_HAS_SIZE(msymbol) ((msymbol)->has_size + 0)
#include "minsyms.h"