From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13718 invoked by alias); 23 Sep 2013 14:36:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 13691 invoked by uid 89); 23 Sep 2013 14:36:24 -0000 Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 23 Sep 2013 14:36:24 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: glazunov.sibelius.xs4all.nl Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id r8NEa0Hu019721; Mon, 23 Sep 2013 16:36:00 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id r8NEa0nk018437; Mon, 23 Sep 2013 16:36:00 +0200 (CEST) Date: Mon, 23 Sep 2013 14:36:00 -0000 Message-Id: <201309231436.r8NEa0nk018437@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: jose.marchesi@oracle.com CC: gdb-patches@sourceware.org In-reply-to: <87ioxradrb.fsf@oracle.com> (jose.marchesi@oracle.com) Subject: Re: [PATCH][SPARC64] Fix breakpointing in syscalls other than sigreturn References: <87ioxradrb.fsf@oracle.com> X-SW-Source: 2013-09/txt/msg00820.txt.bz2 > Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm > Sender: gdb-patches-owner@sourceware.org > > ping. Could someone please take a look to this patch? Thanks. Diff looks reasonable to me, but I'm not really familliar with Linux' system call interface on SPARC. Best to make sure David S. Miller takes a look at this. > 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 > > * 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); > >