aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/config/sparc/tm-sun4sol2.h3
-rw-r--r--gdb/partial-stab.h3
-rw-r--r--gdb/stabsread.c24
4 files changed, 39 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dccc1f8..b7dbd7b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+Thu Feb 9 07:43:41 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
+
+ * 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.
+
Thu Feb 9 12:09:09 1995 Jeff Law (law@snake.cs.utah.edu)
* somread.c (som_symtab_read): Handle dynamic relocation for both
diff --git a/gdb/config/sparc/tm-sun4sol2.h b/gdb/config/sparc/tm-sun4sol2.h
index 292e683..79f21e7 100644
--- a/gdb/config/sparc/tm-sun4sol2.h
+++ b/gdb/config/sparc/tm-sun4sol2.h
@@ -64,6 +64,9 @@ get_longjmp_target PARAMS ((CORE_ADDR *));
and for SunPRO 3.0, N_FUN symbols too. */
#define SOFUN_ADDRESS_MAYBE_MISSING
+extern char *solaris_static_transform_name PARAMS ((char *));
+#define STATIC_TRANSFORM_NAME(x) solaris_static_transform_name (x)
+
#define FAULTED_USE_SIGINFO
/* Enable handling of shared libraries for a.out executables. */
diff --git a/gdb/partial-stab.h b/gdb/partial-stab.h
index e92da5a..f1ab991 100644
--- a/gdb/partial-stab.h
+++ b/gdb/partial-stab.h
@@ -378,6 +378,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
{
case 'S':
CUR_SYMBOL_VALUE += ANOFFSET (section_offsets, SECT_OFF_DATA);
+#ifdef STATIC_TRANSFORM_NAME
+ namestring = STATIC_TRANSFORM_NAME (namestring);
+#endif
ADD_PSYMBOL_ADDR_TO_LIST (namestring, p - namestring,
VAR_NAMESPACE, LOC_STATIC,
objfile->static_psymbols,
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);