From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8585 invoked by alias); 1 Apr 2011 11:58:55 -0000 Received: (qmail 8556 invoked by uid 22791); 1 Apr 2011 11:58:53 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate3.uk.ibm.com (HELO mtagate3.uk.ibm.com) (194.196.100.163) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Apr 2011 11:58:48 +0000 Received: from d06nrmr1507.portsmouth.uk.ibm.com (d06nrmr1507.portsmouth.uk.ibm.com [9.149.38.233]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p31BwkbR015367 for ; Fri, 1 Apr 2011 11:58:46 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p31BxMlN1450030 for ; Fri, 1 Apr 2011 12:59:23 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p31BwjX7022028 for ; Fri, 1 Apr 2011 05:58:45 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id p31Bwi6A021997; Fri, 1 Apr 2011 05:58:44 -0600 Message-Id: <201104011158.p31Bwi6A021997@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 01 Apr 2011 13:58:44 +0200 Subject: Re: [rfc, arm] Always use correct execution state for single-step breakpoints To: gdb-patches@sourceware.org Date: Fri, 01 Apr 2011 11:58:00 -0000 From: "Ulrich Weigand" Cc: matthew.gretton-dann@arm.com, patches@linaro.org In-Reply-To: <201103241831.p2OIVfSm025531@d06av02.portsmouth.uk.ibm.com> from "Ulrich Weigand" at Mar 24, 2011 07:31:41 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2011-04/txt/msg00004.txt.bz2 > gdb/ > * arm-tdep.h (arm_insert_single_step_breakpoint): Add prototype. > * arm-tdep.c (arm_override_mode): New global. > (arm_pc_is_thumb): Respect arm_override_mode. Remove single-step > execution mode heuristics. > (thumb_get_next_pc_raw): Remove INSERT_BKTP argument; always insert > second single-step breakpoint if needed, using > arm_insert_single_step_breakpoint. > (arm_get_next_pc_raw): Remove INSERT_BKTP argument. Only handle > ARM execution mode, do not call thumb_get_next_pc_raw. > (arm_get_next_pc): Encode execution mode in return value. Call > either arm_get_next_pc_raw or thumb_get_next_pc_raw. > (arm_insert_single_step_breakpoint): New function. > (arm_software_single_step): Call it. > * arm-linux-tdep.c (arm_linux_sigreturn_return_addr): Add IS_THUMB > argument to return execution mode of sigreturn target. > (arm_linux_syscall_next_pc): Use it. > (arm_linux_copy_svc): Update call. > (arm_linux_software_single_step): Call > arm_insert_single_step_breakpoint. > > gdb/testsuite/ > * gdb.arch/thumb-singlestep.S: New file. > * gdb.arch/thumb-singlestep.exp: Likewise. I've checked this in now. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com