diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-19 12:23:21 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-10-19 12:23:21 +0000 |
commit | 149ad273c520ca22c19edc35f054fd05fe6cc6e7 (patch) | |
tree | 29f56f16dd0bf1929f57b55e92925c497366e5dd /gdb/stabsread.c | |
parent | 603b72571dd17826efe9843dab8fbb0d5012a1f3 (diff) | |
download | gdb-149ad273c520ca22c19edc35f054fd05fe6cc6e7.zip gdb-149ad273c520ca22c19edc35f054fd05fe6cc6e7.tar.gz gdb-149ad273c520ca22c19edc35f054fd05fe6cc6e7.tar.bz2 |
* gdbarch.sh (static_transform_name): New gdbarch callback.
* gdbarch.c, gdbarch.h: Regenerate.
* dbxread.c (read_dbx_symtab): Use gdbarch_static_transform_name
instead of STATIC_TRANSFORM_NAME.
* mdebugread.c (parse_partial_symbols): Likewise.
* stabsread.c (define_symbol): Likewise.
* xcoffread.c (scan_xcoff_symtab): Likewise.
* config/i368/tm-i386sol2.h (STATIC_TRANSFORM_NAME): Remove.
(IS_STATIC_TRANSFORM_NAME): Remove.
* i386-tdep.c (sunpro_static_transform_name): Remove, move to ...
* i386-sol2-tdep.c (i386_sol2_static_transform_name): ... here.
(i386_sol2_init_abi): Install it.
* config/sparc/tm-sol2.h (STATIC_TRANSFORM_NAME): Remove.
(IS_STATIC_TRANSFORM_NAME): Remove.
* sparc-tdep.c (sparc_stabs_unglobalize_name): Remove, move to ...
* sparc-sol2-tdep.c (sparc_sol2_static_transform_name): ... here.
(sparc32_sol2_init_abi): Install it.
* sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Likewise.
* sparc-tdep.h (sparc_sol2_static_transform_name): Add prototype.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r-- | gdb/stabsread.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 929a856..fb031c7 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -664,11 +664,11 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, /* This was an anonymous type that was never fixed up. */ goto normal; -#ifdef STATIC_TRANSFORM_NAME case 'X': /* SunPRO (3.0 at least) static variable encoding. */ - goto normal; -#endif + if (gdbarch_static_transform_name_p (current_gdbarch)) + goto normal; + /* ... fall through ... */ default: complaint (&symfile_complaints, _("Unknown C++ symbol name `%s'"), @@ -1096,18 +1096,21 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_TYPE (sym) = read_type (&p, objfile); SYMBOL_CLASS (sym) = LOC_STATIC; SYMBOL_VALUE_ADDRESS (sym) = valu; -#ifdef STATIC_TRANSFORM_NAME - if (IS_STATIC_TRANSFORM_NAME (DEPRECATED_SYMBOL_NAME (sym))) + if (gdbarch_static_transform_name_p (current_gdbarch) + && gdbarch_static_transform_name (current_gdbarch, + DEPRECATED_SYMBOL_NAME (sym)) + != DEPRECATED_SYMBOL_NAME (sym)) { struct minimal_symbol *msym; msym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (sym), NULL, objfile); if (msym != NULL) { - DEPRECATED_SYMBOL_NAME (sym) = STATIC_TRANSFORM_NAME (DEPRECATED_SYMBOL_NAME (sym)); + DEPRECATED_SYMBOL_NAME (sym) = gdbarch_static_transform_name + (current_gdbarch, + DEPRECATED_SYMBOL_NAME (sym)); SYMBOL_VALUE_ADDRESS (sym) = SYMBOL_VALUE_ADDRESS (msym); } } -#endif SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &file_symbols); break; @@ -1276,18 +1279,21 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, SYMBOL_TYPE (sym) = read_type (&p, objfile); SYMBOL_CLASS (sym) = LOC_STATIC; SYMBOL_VALUE_ADDRESS (sym) = valu; -#ifdef STATIC_TRANSFORM_NAME - if (IS_STATIC_TRANSFORM_NAME (DEPRECATED_SYMBOL_NAME (sym))) + if (gdbarch_static_transform_name_p (current_gdbarch) + && gdbarch_static_transform_name (current_gdbarch, + DEPRECATED_SYMBOL_NAME (sym)) + != DEPRECATED_SYMBOL_NAME (sym)) { struct minimal_symbol *msym; msym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (sym), NULL, objfile); if (msym != NULL) { - DEPRECATED_SYMBOL_NAME (sym) = STATIC_TRANSFORM_NAME (DEPRECATED_SYMBOL_NAME (sym)); + DEPRECATED_SYMBOL_NAME (sym) = gdbarch_static_transform_name + (current_gdbarch, + DEPRECATED_SYMBOL_NAME (sym)); SYMBOL_VALUE_ADDRESS (sym) = SYMBOL_VALUE_ADDRESS (msym); } } -#endif SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, &local_symbols); break; |