7532cf103a
* tm-sysv4.h (CPLUS_MARKER): By default, g++ uses '.' as the CPLUS_MARKER for all SVR4 systems, so follow suit. * defs.h (strdup_demangled): Remove prototype. * dwarfread.c (enum_type, synthesize_typedef): Use new macro SYMBOL_INIT_LANGUAGE_SPECIFIC. * dwarfread.c (new_symbol): Use SYMBOL_INIT_DEMANGLED_NAME. * minsyms.c (install_minimal_symbols, prim_record_minimal_symbol, prim_record_minimal_symbol_and_info): Use new macro SYMBOL_INIT_LANGUAGE_SPECIFIC. * minsyms.c (install_minimal_symbols): Use new macro SYMBOL_INIT_DEMANGLED_NAME. * stabsread.c (define_symbol): Use new macro SYMBOL_INIT_DEMANGLED_NAME. * symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list): Use new macro SYMBOL_INIT_DEMANGLED_NAME. * symfile.h (ADD_PSYMBOL_VT_TO_LIST): Use new macro SYMBOL_INIT_DEMANGLED_NAME. * symmisc.c (dump_msymbols, dump_symtab, print_partial_symbol): SYMBOL_DEMANGLED_NAME now tests language itself. * symtab.c (COMPLETION_LIST_ADD_SYMBOL): SYMBOL_DEMANGLED_NAME now tests language itself. * symtab.h (SYMBOL_CPLUS_DEMANGLED_NAME): New macro that does what SYMBOL_DEMANGLED_NAME used to do, directly access the C++ mangled name member in the language dependent portion of a symbol. * symtab.h (SYMBOL_DEMANGLED_NAME): New macro that returns the mangled name member appropriate for a symbol's language. * symtab.h (SYMBOL_SOURCE_NAME, SYMBOL_LINKAGE_NAME, SYMBOL_MATCHES_NAME, SYMBOL_MATCHES_REGEXP): SYMBOL_DEMANGLED_NAME now tests language itself. * symtab.h (SYMBOL_INIT_LANGUAGE_SPECIFIC): New macro that initializes language dependent portion of symbol. * symtab.h (SYMBOL_INIT_DEMANGLED_NAME): New macro that demangles and caches the demangled form of symbol names. * utils.c (fputs_demangled, fprint_symbol): Use current language to select an appropriate demangling algorithm. * utils.c (strdup_demangled): Remove, no longer used. **** start-sanitize-chill **** * symtab.h (SYMBOL_CHILL_DEMANGLED_NAME): New macro that directly access the Chill mangled name member in the language dependent portion of a symbol. * ch-lang.c (chill_demangle): New function, simple demangler. * defs.h (chill_demangle): Add prototype. * symtab.h (language_dependent_info): Add struct for Chill. **** end-sanitize-chill ****
51 lines
2.4 KiB
C
51 lines
2.4 KiB
C
/* Macro definitions for GDB on all SVR4 target systems.
|
|
Copyright (C) 1991, 1992, Free Software Foundation, Inc.
|
|
Written by Fred Fish at Cygnus Support (fnf@cygnus.com).
|
|
|
|
This file is part of GDB.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
|
|
#include "solib.h" /* Support for shared libraries. */
|
|
|
|
/* For SVR4 shared libraries, each call to a library routine goes through
|
|
a small piece of trampoline code in the ".init" section. Although each
|
|
of these fragments is labeled with the name of the routine being called,
|
|
the gdb symbol reading code deliberately ignores them so it won't confuse
|
|
them with the real functions. It does however know about the label that
|
|
precedes all of the fragments, which is "_init". Thus when we lookup a
|
|
function that corresponds to a PC value which is in one of the trampoline
|
|
fragments, we'll appear to be in the function "_init". The following
|
|
macro will evaluate to nonzero when NAME is valid and matches "_init".
|
|
The horribly ugly wait_for_inferior() routine uses this macro to detect
|
|
when we have stepped into one of these fragments. */
|
|
|
|
#define IN_SOLIB_TRAMPOLINE(pc,name) ((name) && (STREQ ("_init", name)))
|
|
|
|
/* In SVR4 ELF files, the ABI defines (pg. 4-25) that "External C symbols
|
|
have the same names in C, assembly code, and object files' symbol
|
|
tables." So... */
|
|
|
|
#undef NAMES_HAVE_UNDERSCORE
|
|
|
|
/* It is unknown which, if any, SVR4 assemblers do not accept dollar signs
|
|
in identifiers. The default in G++ is to use dots instead, for all SVR4
|
|
systems, so we make that our default also. FIXME: There should be some
|
|
way to get G++ to tell us what CPLUS_MARKER it is using, perhaps by
|
|
stashing it in the debugging information as part of the name of an
|
|
invented symbol ("gcc_cplus_marker$" for example). */
|
|
|
|
#undef CPLUS_MARKER
|
|
#define CPLUS_MARKER '.'
|