aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1995-02-09 20:21:46 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1995-02-09 20:21:46 +0000
commit137a07e69da8cb956951fae6f84c3af96351a3b4 (patch)
treee09b881239365ed75d9a783d7599bbd12174d8c5 /gdb/stabsread.c
parentdf8d50821648d7585ca1b402f7e0855f440a5bac (diff)
downloadgdb-137a07e69da8cb956951fae6f84c3af96351a3b4.zip
gdb-137a07e69da8cb956951fae6f84c3af96351a3b4.tar.gz
gdb-137a07e69da8cb956951fae6f84c3af96351a3b4.tar.bz2
* config/sparc/tm-sun4sol2.h: Define STATIC_TRANSFORM_NAME.
* partial-stab.h: Call it. * stabsread.c (define_symbol) [STATIC_TRANSFORM_NAME]: Call STATIC_TRANSFORM_NAME to get the name and use minimal symbols to get the address. * sparc-tdep.c (solaris_static_transform_name): New function.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index ac334b2..3b7c8e1 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1047,6 +1047,18 @@ define_symbol (valu, string, desc, type, objfile)
SYMBOL_TYPE (sym) = read_type (&p, objfile);
SYMBOL_CLASS (sym) = LOC_STATIC;
SYMBOL_VALUE_ADDRESS (sym) = valu;
+#ifdef STATIC_TRANSFORM_NAME
+ if (SYMBOL_NAME (sym)[0] == '$')
+ {
+ struct minimal_symbol *msym;
+ msym = lookup_minimal_symbol (SYMBOL_NAME (sym), NULL, objfile);
+ if (msym != NULL)
+ {
+ SYMBOL_NAME (sym) = STATIC_TRANSFORM_NAME (SYMBOL_NAME (sym));
+ SYMBOL_VALUE_ADDRESS (sym) = SYMBOL_VALUE_ADDRESS (msym);
+ }
+ }
+#endif
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
add_symbol_to_list (sym, &file_symbols);
break;
@@ -1173,6 +1185,18 @@ define_symbol (valu, string, desc, type, objfile)
SYMBOL_TYPE (sym) = read_type (&p, objfile);
SYMBOL_CLASS (sym) = LOC_STATIC;
SYMBOL_VALUE_ADDRESS (sym) = valu;
+#ifdef STATIC_TRANSFORM_NAME
+ if (SYMBOL_NAME (sym)[0] == '$')
+ {
+ struct minimal_symbol *msym;
+ msym = lookup_minimal_symbol (SYMBOL_NAME (sym), NULL, objfile);
+ if (msym != NULL)
+ {
+ SYMBOL_NAME (sym) = STATIC_TRANSFORM_NAME (SYMBOL_NAME (sym));
+ SYMBOL_VALUE_ADDRESS (sym) = SYMBOL_VALUE_ADDRESS (msym);
+ }
+ }
+#endif
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
if (os9k_stabs)
add_symbol_to_list (sym, &global_symbols);