aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h34
1 files changed, 31 insertions, 3 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 25ac028..4bf3035 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -180,8 +180,8 @@ extern const char *symbol_get_demangled_name
extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, struct obj_section *);
/* Note that all the following SYMBOL_* macros are used with the
- SYMBOL argument being either a partial symbol, a minimal symbol or
- a full symbol. All three types have a ginfo field. In particular
+ SYMBOL argument being either a partial symbol or
+ a full symbol. Both types have a ginfo field. In particular
the SYMBOL_SET_LANGUAGE, SYMBOL_DEMANGLED_NAME, etc.
macros cannot be entirely substituted by
functions, unless the callers are changed to pass in the ginfo
@@ -339,7 +339,7 @@ struct minimal_symbol
The SYMBOL_VALUE_ADDRESS contains the address that this symbol
corresponds to. */
- struct general_symbol_info ginfo;
+ struct general_symbol_info mginfo;
/* Size of this symbol. end_psymtab in dbxread.c uses this
information to calculate the end of the partial symtab based on the
@@ -390,6 +390,34 @@ struct minimal_symbol
#define MSYMBOL_HAS_SIZE(msymbol) ((msymbol)->has_size + 0)
#define MSYMBOL_TYPE(msymbol) (msymbol)->type
+#define MSYMBOL_VALUE(symbol) (symbol)->mginfo.value.ivalue
+#define MSYMBOL_VALUE_ADDRESS(symbol) (symbol)->mginfo.value.address
+#define MSYMBOL_VALUE_BYTES(symbol) (symbol)->mginfo.value.bytes
+#define MSYMBOL_BLOCK_VALUE(symbol) (symbol)->mginfo.value.block
+#define MSYMBOL_VALUE_CHAIN(symbol) (symbol)->mginfo.value.chain
+#define MSYMBOL_LANGUAGE(symbol) (symbol)->mginfo.language
+#define MSYMBOL_SECTION(symbol) (symbol)->mginfo.section
+#define MSYMBOL_OBJ_SECTION(objfile, symbol) \
+ (((symbol)->mginfo.section >= 0) \
+ ? (&(((objfile)->sections)[(symbol)->mginfo.section])) \
+ : NULL)
+
+#define MSYMBOL_NATURAL_NAME(symbol) \
+ (symbol_natural_name (&(symbol)->mginfo))
+#define MSYMBOL_LINKAGE_NAME(symbol) (symbol)->mginfo.name
+#define MSYMBOL_PRINT_NAME(symbol) \
+ (demangle ? MSYMBOL_NATURAL_NAME (symbol) : MSYMBOL_LINKAGE_NAME (symbol))
+#define MSYMBOL_DEMANGLED_NAME(symbol) \
+ (symbol_demangled_name (&(symbol)->mginfo))
+#define MSYMBOL_SET_LANGUAGE(symbol,language,obstack) \
+ (symbol_set_language (&(symbol)->mginfo, (language), (obstack)))
+#define MSYMBOL_SEARCH_NAME(symbol) \
+ (symbol_search_name (&(symbol)->mginfo))
+#define MSYMBOL_MATCHES_SEARCH_NAME(symbol, name) \
+ (strcmp_iw (MSYMBOL_SEARCH_NAME (symbol), (name)) == 0)
+#define MSYMBOL_SET_NAMES(symbol,linkage_name,len,copy_name,objfile) \
+ symbol_set_names (&(symbol)->mginfo, linkage_name, len, copy_name, objfile)
+
#include "minsyms.h"