From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11258 invoked by alias); 20 Aug 2010 12:00:26 -0000 Received: (qmail 11248 invoked by uid 22791); 20 Aug 2010 12:00:26 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL,TW_GJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate7.de.ibm.com (HELO mtagate7.de.ibm.com) (195.212.17.167) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Aug 2010 12:00:15 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.1/8.13.1) with ESMTP id o7KC0Cv3023229 for ; Fri, 20 Aug 2010 12:00:12 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o7KC0CLe3731578 for ; Fri, 20 Aug 2010 14:00:12 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o7KC0BtV007784 for ; Fri, 20 Aug 2010 14:00:11 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id o7KC0ASe007759; Fri, 20 Aug 2010 14:00:10 +0200 Message-Id: <201008201200.o7KC0ASe007759@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 20 Aug 2010 14:00:10 +0200 Subject: Re: [rfc] Strip Thumb bit from PC returned by arm_get_longjmp_target To: matthew.gretton-dann@arm.com (Matthew Gretton-Dann) Date: Fri, 20 Aug 2010 12:00:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <1282293503.7290.8.camel@e102319-lin.cambridge.arm.com> from "Matthew Gretton-Dann" at Aug 20, 2010 09:38:23 AM 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: 2010-08/txt/msg00369.txt.bz2 Matthew Gretton-Dann wrote: > On Thu, 2010-08-19 at 10:49 +0200, Ulrich Weigand wrote: > > Actually, it turns out this new patch doesn't work. It leads to: > > > > Breakpoint 4 at 0x84ec: file ../../../gdb-head/gdb/testsuite/gdb.threads/threxit-hop-specific.c, line 47.^M > > (gdb) next^M > > ^M > > Program received signal SIGTRAP, Trace/breakpoint trap.^M > > > > This happens because GDB now no longer recognizes the PC address > > when the breakpoint trap arrives. The PC is compared against > > the breakpoint location's loc->address value -- which now has the > > Thumb bit set, but the PC doesn't. > > > > Note that while the Thumb bit gets removes in arm_breakpoint_from_pc, > > this affects only loc->placed_address, not loc->address. > > > > This seems to indicate that in fact, breakpoint addresses must > > *not* have the Thumb bit set ... > > > > Do you have a case where this works for you? > > I don't have a case. I think this means that the original patch is the > correct one for the moment - but I'm not a maintainer so this isn't an > approval. OK, thanks for your feedback. I'm happy to wait for Richard's approval ... > Also, looking at the code in arm_adjust_breakpoint_address I think there > are other cases that may cause the failure you are seeing above (for > instance when using Thumb-2 in the absence of mapping symbols and > setting the breakpoint on 0x8001). I'm now wondering whether it can in fact ever happen that an address with the Thumb bit set can come into arm_adjust_breakpoint_address; it seems that (except for the longjmp target case) no such values are ever exposed. Am I missing a possible path here? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com