aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2008-08-21 18:14:39 +0000
committerDaniel Jacobowitz <drow@false.org>2008-08-21 18:14:39 +0000
commit3567439cdefa9f2340bae3fbb068780923934865 (patch)
tree4bbcd2dbca60884715d795f442ca09af87d4da1d /gdb/symtab.h
parentc22a967f855f76192c4053ee196067cd74aa0ecf (diff)
downloadbinutils-3567439cdefa9f2340bae3fbb068780923934865.zip
binutils-3567439cdefa9f2340bae3fbb068780923934865.tar.gz
binutils-3567439cdefa9f2340bae3fbb068780923934865.tar.bz2
* ax-gdb.c (gen_var_ref): Use SYMBOL_LINKAGE_NAME.
* blockframe.c (find_pc_partial_function): Likewise. * buildsym.c (find_symbol_in_list): Likewise. * c-valprint.c (c_val_print): Likewise. * coffread.c (patch_opaque_types, process_coff_symbol): Likewise. (coff_read_enum_type): Likewise. Use SYMBOL_SET_LINKAGE_NAME. * cp-support.c (cp_remove_params): Renamed from remove_params and made global. (overload_list_add_symbol): Update call to remove_params. * cp-support.h (cp_remove_params): Declare. * dwarf2read.c (process_enumeration_scope): Use SYMBOL_LINKAGE_NAME. (dwarf2_const_value): Use SYMBOL_PRINT_NAME. * expprint.c (dump_subexp_body_standard): Likewise. * f-valprint.c (info_common_command, there_is_a_visible_common_named): Use SYMBOL_LINKAGE_NAME to find symbols and SYMBOL_PRINT_NAME for messages. * findvar.c (read_var_value): Use SYMBOL_LINKAGE_NAME. * gnu-v2-abi.c (gnuv2_value_rtti_type): Likewise. * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline) (hppa_hpux_skip_trampoline_code): Use SYMBOL_LINKAGE_NAME to find symbols and SYMBOL_PRINT_NAME for messages. * jv-lang.c (add_class_symbol): Use SYMBOL_SET_LINKAGE_NAME. * linespec.c (decode_line_2): Use SYMBOL_LINKAGE_NAME. * mdebugread.c (parse_symbol): Use SYMBOL_LINKAGE_NAME and SYMBOL_SET_LINKAGE_NAME. (mylookup_symbol): Use SYMBOL_LINKAGE_NAME. * minsyms.c (add_minsym_to_demangled_hash_table): Use SYMBOL_SEARCH_NAME. (lookup_minimal_symbol): Use SYMBOL_LINKAGE_NAME or SYMBOL_MATCHES_SEARCH_NAME, depending on the pass. * objfiles.h (ALL_OBJFILE_MSYMBOLS): Use SYMBOL_LINKAGE_NAME. * printcmd.c (build_address_symbolic): Use SYMBOL_LINKAGE_NAME. (address_info): Use SYMBOL_PRINT_NAME for messages and SYMBOL_LINKAGE_NAME for lookups. * sol-thread.c (info_cb): Use SYMBOL_PRINT_NAME for messages. * stabsread.c (patch_block_stabs, define_symbol) (read_type, read_enum_type, common_block_end) (cleanup_undefined_types_1, scan_file_globals): Use SYMBOL_LINKAGE_NAME, SYMBOL_SET_LINKAGE_NAME, ALL_OBJFILE_MSYMBOLS, and SYMBOL_PRINT_NAME. * stack.c (print_frame_args): Use SYMBOL_LINKAGE_NAME. (print_frame, frame_info): Use SYMBOL_PRINT_NAME for output. Use cp_remove_params instead of cplus_demangle. (print_block_frame_labels, print_frame_arg_vars): Use SYMBOL_LINKAGE_NAME. * symmisc.c (dump_msymbols): Use ALL_OBJFILE_MSYMBOLS and SYMBOL_LINKAGE_NAME. (dump_symtab_1, print_symbol, print_partial_symbols) (maintenance_check_symtabs): Use SYMBOL_LINKAGE_NAME. * symtab.h (DEPRECATED_SYMBOL_NAME): Delete. (SYMBOL_SET_LINKAGE_NAME): New. (SYMBOL_SET_NAMES): Add a comment. * tracepoint.c (set_traceframe_context, validate_actionline) (collect_symbol, scope_info): Use SYMBOL_LINKAGE_NAME for lookups and SYMBOL_PRINT_NAME for output. * typeprint.c (typedef_print): Use SYMBOL_LINKAGE_NAME. * xcoffread.c (process_xcoff_symbol): Use SYMBOL_SET_LINKAGE_NAME.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index ae4faf5..43c4e81 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -162,7 +162,6 @@ extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, asection *);
functions, unless the callers are changed to pass in the ginfo
field only, instead of the SYMBOL parameter. */
-#define DEPRECATED_SYMBOL_NAME(symbol) (symbol)->ginfo.name
#define SYMBOL_VALUE(symbol) (symbol)->ginfo.value.ivalue
#define SYMBOL_VALUE_ADDRESS(symbol) (symbol)->ginfo.value.address
#define SYMBOL_VALUE_BYTES(symbol) (symbol)->ginfo.value.bytes
@@ -182,6 +181,15 @@ extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, asection *);
extern void symbol_init_language_specific (struct general_symbol_info *symbol,
enum language language);
+/* Set just the linkage name of a symbol; do not try to demangle
+ it. Used for constructs which do not have a mangled name,
+ e.g. struct tags. Unlike SYMBOL_SET_NAMES, linkage_name must
+ be terminated and already on the objfile's obstack. */
+#define SYMBOL_SET_LINKAGE_NAME(symbol,linkage_name) \
+ (symbol)->ginfo.name = (linkage_name)
+
+/* Set the linkage and natural names of a symbol, by demangling
+ the linkage name. */
#define SYMBOL_SET_NAMES(symbol,linkage_name,len,objfile) \
symbol_set_names (&(symbol)->ginfo, linkage_name, len, objfile)
extern void symbol_set_names (struct general_symbol_info *symbol,
@@ -194,10 +202,7 @@ extern void symbol_set_names (struct general_symbol_info *symbol,
want to know what the linker thinks the symbol's name is. Use
SYMBOL_PRINT_NAME for output. Use SYMBOL_DEMANGLED_NAME if you
specifically need to know whether SYMBOL_NATURAL_NAME and
- SYMBOL_LINKAGE_NAME are different. Don't use
- DEPRECATED_SYMBOL_NAME at all: instances of that macro should be
- replaced by SYMBOL_NATURAL_NAME, SYMBOL_LINKAGE_NAME, or perhaps
- SYMBOL_PRINT_NAME. */
+ SYMBOL_LINKAGE_NAME are different. */
/* Return SYMBOL's "natural" name, i.e. the name that it was called in
the original source code. In languages like C++ where symbols may
@@ -211,11 +216,7 @@ extern char *symbol_natural_name (const struct general_symbol_info *symbol);
/* Return SYMBOL's name from the point of view of the linker. In
languages like C++ where symbols may be mangled for ease of
manipulation by the linker, this is the mangled name; otherwise,
- it's the same as SYMBOL_NATURAL_NAME. This is currently identical
- to DEPRECATED_SYMBOL_NAME, but please use SYMBOL_LINKAGE_NAME when
- appropriate: it conveys the additional semantic information that
- you really have thought about the issue and decided that you mean
- SYMBOL_LINKAGE_NAME instead of SYMBOL_NATURAL_NAME. */
+ it's the same as SYMBOL_NATURAL_NAME. */
#define SYMBOL_LINKAGE_NAME(symbol) (symbol)->ginfo.name