diff options
author | Jeff Law <law@redhat.com> | 1994-12-01 05:34:30 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1994-12-01 05:34:30 +0000 |
commit | b1bbe38b3d1906c0df6d5aca0ec28d3b3a43626b (patch) | |
tree | 2b17699b82912d7a47c8a2fe1e105c85f74591c2 /gdb/hppa-tdep.c | |
parent | 002199bca44e3a5a691384ec72ce2d25c4dda788 (diff) | |
download | gdb-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/hppa-tdep.c')
-rw-r--r-- | gdb/hppa-tdep.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 687b309..d765b94 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -1378,6 +1378,19 @@ hppa_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p) at *fun. */ fun = (CORE_ADDR) read_memory_integer (fun & ~0x3, 4); } + else + { + + /* FUN could be either an export stub, or the real address of a + function in a shared library. + + To call this function we need to get the GOT/DP value for the target + function. Do this by calling shared library support routines in + somsolib.c. Once the GOT value is in %r19 we can call the procedure + in the normal fashion. */ + + write_register (19, som_solib_get_got_by_pc (fun)); + } /* If we are calling an import stub (eg calling into a dynamic library) then have sr4export call the magic __d_plt_call routine which is linked |