diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-10-31 21:09:28 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-10-31 21:09:28 +0000 |
commit | 84674fe17939ab8a769ace018d8fe1a4cf041a4a (patch) | |
tree | 91c0e31b8c76dec8e312b93cc53a8b7bb8f294fd /gdb | |
parent | c6d1029f18f38a215028c8eeda28ca1a2c9206c7 (diff) | |
download | gdb-84674fe17939ab8a769ace018d8fe1a4cf041a4a.zip gdb-84674fe17939ab8a769ace018d8fe1a4cf041a4a.tar.gz gdb-84674fe17939ab8a769ace018d8fe1a4cf041a4a.tar.bz2 |
2004-10-31 Andrew Cagney <cagney@gnu.org>
* hppa-tdep.c (hppa_stub_unwind_sniffer): Replace
IN_SOLIB_CALL_TRAMPOLINE with tdep.in_solib_call_trampoline.
* hppa-tdep.h (struct gdbarch_tdep): Add in_solib_call_trampoline.
* hppa-hpux-tdep.c (hppa_hpux_init_abi): Set same.
* hppa-linux-tdep.c (hppa_linux_init_abi): Ditto.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/hppa-hpux-tdep.c | 6 | ||||
-rw-r--r-- | gdb/hppa-linux-tdep.c | 3 | ||||
-rw-r--r-- | gdb/hppa-tdep.c | 5 | ||||
-rw-r--r-- | gdb/hppa-tdep.h | 6 |
5 files changed, 21 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4432e48..ecdf2c6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2004-10-31 Andrew Cagney <cagney@gnu.org> + + * hppa-tdep.c (hppa_stub_unwind_sniffer): Replace + IN_SOLIB_CALL_TRAMPOLINE with tdep.in_solib_call_trampoline. + * hppa-tdep.h (struct gdbarch_tdep): Add in_solib_call_trampoline. + * hppa-hpux-tdep.c (hppa_hpux_init_abi): Set same. + * hppa-linux-tdep.c (hppa_linux_init_abi): Ditto. + 2004-10-31 Mark Kettenis <kettenis@gnu.org> * mipsnbsd-nat.c: Include "target.h" and "inf-ptrace.h". diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c index 78f3e2a..9623abe 100644 --- a/gdb/hppa-hpux-tdep.c +++ b/gdb/hppa-hpux-tdep.c @@ -1407,11 +1407,9 @@ hppa_hpux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); if (tdep->bytes_per_address == 4) - set_gdbarch_in_solib_call_trampoline (gdbarch, - hppa32_hpux_in_solib_call_trampoline); + tdep->in_solib_call_trampoline = hppa32_hpux_in_solib_call_trampoline; else - set_gdbarch_in_solib_call_trampoline (gdbarch, - hppa64_hpux_in_solib_call_trampoline); + tdep->in_solib_call_trampoline = hppa64_hpux_in_solib_call_trampoline; set_gdbarch_in_solib_return_trampoline (gdbarch, hppa_hpux_in_solib_return_trampoline); diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c index 7f32236..b7a00bc 100644 --- a/gdb/hppa-linux-tdep.c +++ b/gdb/hppa-linux-tdep.c @@ -563,8 +563,7 @@ hppa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) set_solib_svr4_fetch_link_map_offsets (gdbarch, svr4_ilp32_fetch_link_map_offsets); - set_gdbarch_in_solib_call_trampoline - (gdbarch, hppa_linux_in_solib_call_trampoline); + tdep->in_solib_call_trampoline = hppa_linux_in_solib_call_trampoline; set_gdbarch_skip_trampoline_code (gdbarch, hppa_linux_skip_trampoline_code); diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index db15a1b..ee936ed 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -2096,9 +2096,12 @@ static const struct frame_unwind * hppa_stub_unwind_sniffer (struct frame_info *next_frame) { CORE_ADDR pc = frame_pc_unwind (next_frame); + struct gdbarch *gdbarch = get_frame_arch (next_frame); + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); if (pc == 0 - || IN_SOLIB_CALL_TRAMPOLINE (pc, NULL) + || (tdep->in_solib_call_trampoline != NULL + && tdep->in_solib_call_trampoline (pc, NULL)) || IN_SOLIB_RETURN_TRAMPOLINE (pc, NULL)) return &hppa_stub_frame_unwind; return NULL; diff --git a/gdb/hppa-tdep.h b/gdb/hppa-tdep.h index 26a7556..857b874 100644 --- a/gdb/hppa-tdep.h +++ b/gdb/hppa-tdep.h @@ -82,6 +82,12 @@ struct gdbarch_tdep /* Given a function address, try to find the global pointer for the corresponding shared object. */ CORE_ADDR (*find_global_pointer) (struct value *); + + /* For shared libraries, each call goes through a small piece of + trampoline code in the ".plt", or equivalent, section. + IN_SOLIB_CALL_TRAMPOLINE evaluates to nonzero if we are currently + stopped in one of these. */ + int (*in_solib_call_trampoline) (CORE_ADDR pc, char *name); }; /* |