aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc64-linux-tdep.c
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2014-01-29 07:15:05 -0800
committerJose E. Marchesi <jose.marchesi@oracle.com>2014-01-29 07:15:05 -0800
commit401e27fd717fcbc2efe00e332bdaa46846501323 (patch)
tree7e0f672777edfae3deda9b72f31360a7587357d5 /gdb/sparc64-linux-tdep.c
parentdf3ce959f4f4598f73c4e02f45e65ad1fd6f4f7c (diff)
downloadgdb-401e27fd717fcbc2efe00e332bdaa46846501323.zip
gdb-401e27fd717fcbc2efe00e332bdaa46846501323.tar.gz
gdb-401e27fd717fcbc2efe00e332bdaa46846501323.tar.bz2
This changeset makes sparc64_linux_step_trap to return 0 when a
breakpoint is set in a `ta 0x6d´ which is not a sigreturn syscall. In these cases no rt_frame exists in the stack and thus the read PC is wrong. ChangeLog 2014-01-29 Jose E. Marchesi <jose.marchesi@oracle.com> * sparc64-linux-tdep.c (sparc64_linux_step_trap): Get PC from the sigreturn register save area only if the syscall is sigreturn. testsuite/ChangeLog 2014-01-29 Jose E. Marchesi <jose.marchesi@oracle.com> * gdb.arch/sparc-sysstep.exp: New file. * gdb.arch/sparc-sysstep.c: Likewise. * gdb.arch/Makefile.in (EXECUTABLES): Add sparc-sysstep.
Diffstat (limited to 'gdb/sparc64-linux-tdep.c')
-rw-r--r--gdb/sparc64-linux-tdep.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/sparc64-linux-tdep.c b/gdb/sparc64-linux-tdep.c
index ea83c28..a381d2a 100644
--- a/gdb/sparc64-linux-tdep.c
+++ b/gdb/sparc64-linux-tdep.c
@@ -111,7 +111,9 @@ sparc64_linux_sigframe_init (const struct tramp_frame *self,
static CORE_ADDR
sparc64_linux_step_trap (struct frame_info *frame, unsigned long insn)
{
- if (insn == 0x91d0206d)
+ /* __NR_rt_sigreturn is 101 */
+ if ((insn == 0x91d0206d)
+ && (get_frame_register_unsigned (frame, SPARC_G1_REGNUM) == 101))
{
struct gdbarch *gdbarch = get_frame_arch (frame);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);