From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24883 invoked by alias); 16 Sep 2013 09:46:04 -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 24874 invoked by uid 89); 16 Sep 2013 09:46:04 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 16 Sep 2013 09:46:04 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 X-HELO: aserp1040.oracle.com Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r8G9k0V2014844 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 16 Sep 2013 09:46:01 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r8G9jxvL018614 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 16 Sep 2013 09:46:00 GMT Received: from abhmt108.oracle.com (abhmt108.oracle.com [141.146.116.60]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r8G9jxFd026000 for ; Mon, 16 Sep 2013 09:45:59 GMT Received: from termi.oracle.com (/10.175.61.183) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 16 Sep 2013 02:45:59 -0700 From: jose.marchesi@oracle.com (Jose E. Marchesi) To: gdb-patches@sourceware.org Subject: [PATCH][SPARC64] Fix breakpointing in syscalls other than sigreturn Date: Mon, 16 Sep 2013 09:46:00 -0000 Message-ID: <87six5ayiu.fsf@oracle.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00433.txt.bz2 ping... 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);