From 50f182aa6671dea0fdcf063d5974c623332f3e63 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Thu, 10 Nov 2011 20:21:29 +0000 Subject: * defs.h (is_cplus_marker, set_demangling_style): Moved to ... * gdb-demangle.h: ... here. New file. * demangle.c: #include "gdb-demangle.h". (_initialize_demangler): Use initialize_file_ftype for prototype. Move "set demangle" and "set asm-demangle" parameters here from utils.c (demangle, show_demangle, asm_demangle, show_asm_demangle): Move here from utils.c * utils.c: Update. #include "gdb-demangle.h". * symtab.h (asm_demangle): Delete. (demangle): Move declaration next to use. * breakpoint.c: #include "gdb-demangle.h" instead of "demangle.h". * dwarf2read.c: #include "gdb-demangle.h". * gnu-v2-abi.c: Ditto. * jv-typeprint.c: Ditto. * mdebugread.c: Ditto. * p-typeprint.c: Ditto. * stabsread.c: Ditto. * printcmd.c: Ditto. (asm_demangle): Delete declaration. * tui/tui-stack.c: #include "gdb-demangle.h". --- gdb/symtab.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'gdb/symtab.h') diff --git a/gdb/symtab.h b/gdb/symtab.h index 90a6fe4..e5bf155 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -244,11 +244,14 @@ extern char *symbol_demangled_name (const struct general_symbol_info *symbol); name if demangle is on and the "mangled" form of the name if demangle is off. In other languages this is just the symbol name. The result should never be NULL. Don't use this for internal - purposes (e.g. storing in a hashtable): it's only suitable for - output. */ + purposes (e.g. storing in a hashtable): it's only suitable for output. + + N.B. symbol may be anything with a ginfo member, + e.g., struct symbol or struct minimal_symbol. */ #define SYMBOL_PRINT_NAME(symbol) \ (demangle ? SYMBOL_NATURAL_NAME (symbol) : SYMBOL_LINKAGE_NAME (symbol)) +extern int demangle; /* Macro that tests a symbol for a match against a specified name string. First test the unencoded name, then looks for and test a C++ encoded @@ -866,10 +869,6 @@ struct symtab extern int currently_reading_symtab; -/* From utils.c. */ -extern int demangle; -extern int asm_demangle; - /* symtab.c lookup functions */ extern const char multiple_symbols_ask[]; -- cgit v1.1