summaryrefslogtreecommitdiff
path: root/gdb/hppa-tdep.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2004-12-17 07:42:48 +0000
committerJoel Brobecker <brobecker@gnat.com>2004-12-17 07:42:48 +0000
commitdcdb13795be3e7ce95fa75c97c4e64bccc220114 (patch)
tree3802e1e1d39ae7fbd8a8326b0ce122301978f85a /gdb/hppa-tdep.c
parent47432515a38d1d6aac5631db9c8a15bff54500a3 (diff)
downloadgdb-dcdb13795be3e7ce95fa75c97c4e64bccc220114.tar.gz
* hppa-tdep.c (hppa_lookup_stub_minimal_symbol): New function.
* hppa-tdep.h (hppa_lookup_stub_minimal_symbol): Add declaration. * solib-som.c (som_solib_create_inferior_hook): Replace stub msymbol search by call to hppa_lookup_stub_minimal_symbol. This extends the search to all objfiles, not just shared libraries. Remove unused variable.
Diffstat (limited to 'gdb/hppa-tdep.c')
-rw-r--r--gdb/hppa-tdep.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 44c6f8d7d25..46a7b080192 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -2255,6 +2255,31 @@ hppa_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
return pc & ~0x3;
}
+/* Return the minimal symbol whose name is NAME and stub type is STUB_TYPE.
+ Return NULL if no such symbol was found. */
+
+struct minimal_symbol *
+hppa_lookup_stub_minimal_symbol (const char *name,
+ enum unwind_stub_types stub_type)
+{
+ struct objfile *objfile;
+ struct minimal_symbol *msym;
+
+ ALL_MSYMBOLS (objfile, msym)
+ {
+ if (strcmp (SYMBOL_LINKAGE_NAME (msym), name) == 0)
+ {
+ struct unwind_table_entry *u;
+
+ u = find_unwind_entry (SYMBOL_VALUE (msym));
+ if (u != NULL && u->stub_unwind.stub_type == stub_type)
+ return msym;
+ }
+ }
+
+ return NULL;
+}
+
/* Instead of this nasty cast, add a method pvoid() that prints out a
host VOID data type (remember %p isn't portable). */