This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH][SPARC64] Fix breakpointing in syscalls other than sigreturn
- From: jose dot marchesi at oracle dot com (Jose E. Marchesi)
- To: gdb-patches at sourceware dot org
- Date: Mon, 23 Sep 2013 15:06:32 +0200
- Subject: [PATCH][SPARC64] Fix breakpointing in syscalls other than sigreturn
- Authentication-results: sourceware.org; auth=none
ping. Could someone please take a look to this patch? Thanks.
From: jose.marchesi@oracle.com (Jose E. Marchesi)
To: gdb-patches@sourceware.org
Subject: [PATCH][SPARC64] Fix breakpointing in syscalls other than sigreturn
Date: Tue, 10 Sep 2013 20:29:33 +0200
Hi.
This small patch 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.
2013-09-10 Jose E. Marchesi <jose.marchesi@oracle.com>
* sparc64-linux-tdep.c (sparc64_linux_step_trap): Make sure the
trap is a sigreturn syscall.
Index: gdb/sparc64-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc64-linux-tdep.c,v
retrieving revision 1.31
diff -u -r1.31 sparc64-linux-tdep.c
--- gdb/sparc64-linux-tdep.c 1 Jan 2013 06:32:51 -0000 1.31
+++ gdb/sparc64-linux-tdep.c 10 Sep 2013 18:17:25 -0000
@@ -111,7 +111,9 @@
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);