Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Tedeschi, Walfred" <walfred.tedeschi@intel.com>
To: "Jose E. Marchesi" <jose.marchesi@oracle.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH][SPARC64] Fix breakpointing in syscalls other than sigreturn
Date: Mon, 23 Sep 2013 13:33:00 -0000	[thread overview]
Message-ID: <AC542571535E904D8E8ADAE745D60B191B197923@IRSMSX104.ger.corp.intel.com> (raw)
In-Reply-To: <87ioxradrb.fsf@oracle.com>

Hi Jose,

Have you observed some failure to submit this patch? If so could you also provide a test case?

Regards,
-Fred

-----Original Message-----
From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Jose E. Marchesi
Sent: Monday, September 23, 2013 3:07 PM
To: gdb-patches@sourceware.org
Subject: [PATCH][SPARC64] Fix breakpointing in syscalls other than sigreturn


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);

Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052


  reply	other threads:[~2013-09-23 13:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-23 13:04 Jose E. Marchesi
2013-09-23 13:33 ` Tedeschi, Walfred [this message]
2013-09-23 14:02   ` Jose E. Marchesi
2013-10-04 11:22     ` Pedro Alves
2013-09-23 14:36 ` Mark Kettenis
  -- strict thread matches above, loose matches on Subject: below --
2013-09-16  9:46 Jose E. Marchesi
2013-09-10 18:28 Jose E. Marchesi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AC542571535E904D8E8ADAE745D60B191B197923@IRSMSX104.ger.corp.intel.com \
    --to=walfred.tedeschi@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jose.marchesi@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox