aboutsummaryrefslogtreecommitdiff
path: root/gdb/somsolib.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-12-01 05:34:30 +0000
committerJeff Law <law@redhat.com>1994-12-01 05:34:30 +0000
commitb1bbe38b3d1906c0df6d5aca0ec28d3b3a43626b (patch)
tree2b17699b82912d7a47c8a2fe1e105c85f74591c2 /gdb/somsolib.c
parent002199bca44e3a5a691384ec72ce2d25c4dda788 (diff)
downloadgdb-b1bbe38b3d1906c0df6d5aca0ec28d3b3a43626b.zip
gdb-b1bbe38b3d1906c0df6d5aca0ec28d3b3a43626b.tar.gz
gdb-b1bbe38b3d1906c0df6d5aca0ec28d3b3a43626b.tar.bz2
* somsolib.c (som_solib_get_got_by_pc): New function.
* somsolib.h (som_solib_get_got_by_pc): Add extern decl. * hppa-tdep.c (hppa_fix_call_dummy): Handle case where FUN is the function's export stub or real address in a shared library.
Diffstat (limited to 'gdb/somsolib.c')
-rw-r--r--gdb/somsolib.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/gdb/somsolib.c b/gdb/somsolib.c
index f75ad9c..fc3d2ad 100644
--- a/gdb/somsolib.c
+++ b/gdb/somsolib.c
@@ -43,8 +43,6 @@ and by Cygnus Support. */
* Do we need/want a command to load a shared library?
- * Test attaching to running dynamically linked code.
-
* Support for hpux8 dynamic linker.
* Support for tracking user calls to dld_load, dld_unload. */
@@ -544,6 +542,29 @@ som_solib_create_inferior_hook()
som_solib_add ((char *) 0, 0, (struct target_ops *) 0);
}
+/* Return the GOT value for the shared library in which ADDR belongs. If
+ ADDR isn't in any known shared library, return zero. */
+
+CORE_ADDR
+som_solib_get_got_by_pc (addr)
+ CORE_ADDR addr;
+{
+ struct so_list *so_list = so_list_head;
+ CORE_ADDR got_value = 0;
+
+ while (so_list)
+ {
+ if (so_list->som_solib.text_addr <= addr
+ && so_list->som_solib.text_end > addr)
+ {
+ got_value = so_list->som_solib.got_value;
+ break;
+ }
+ so_list = so_list->next;
+ }
+ return got_value;
+}
+
/* Dump information about all the currently loaded shared libraries. */
static void