From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24905 invoked by alias); 17 Aug 2010 19:16:07 -0000 Received: (qmail 24894 invoked by uid 22791); 17 Aug 2010 19:16:06 -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 mtagate4.de.ibm.com (HELO mtagate4.de.ibm.com) (195.212.17.164) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 Aug 2010 19:16:01 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate4.de.ibm.com (8.13.1/8.13.1) with ESMTP id o7HJFwTe020713 for ; Tue, 17 Aug 2010 19:15:58 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 o7HJFwEe2642030 for ; Tue, 17 Aug 2010 21:15:58 +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 o7HJFwXd003759 for ; Tue, 17 Aug 2010 21:15:58 +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 o7HJFvSp003702 for ; Tue, 17 Aug 2010 21:15:57 +0200 Message-Id: <201008171915.o7HJFvSp003702@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 17 Aug 2010 21:15:57 +0200 Subject: [rfc] Strip Thumb bit from PC returned by arm_get_longjmp_target To: gdb-patches@sourceware.org Date: Tue, 17 Aug 2010 19:16:00 -0000 From: "Ulrich Weigand" 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/msg00271.txt.bz2 Hello, when stepping over code performing a longjmp on Thumb code, I'm seeing warning messages along the lines of: warning: Breakpoint address adjusted from 0x4002d29d to 0x4002d29c. (This happens e.g. in gdb.threads/threxit-hop-specific.exp.) This is caused by arm_get_longjmp_target returning a value with the Thumb bit set, which the rest of the code doesn't expect. Fixed by calling arm_addr_bits_remove on the PC value returned from arm_get_longjmp_target. Tested on armv7l-linux-gnueabi with no regressions. Any comments? I'm planning on committing this within a couple of days. Bye, Ulrich ChangeLog: * arm-tdep.c (arm_get_longjmp_target): Strip extra bits from returned PC value. Index: gdb/arm-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/arm-tdep.c,v retrieving revision 1.304 diff -u -p -r1.304 arm-tdep.c --- gdb/arm-tdep.c 27 May 2010 19:06:12 -0000 1.304 +++ gdb/arm-tdep.c 16 Aug 2010 19:05:36 -0000 @@ -5852,6 +5852,7 @@ arm_get_longjmp_target (struct frame_inf return 0; *pc = extract_unsigned_integer (buf, INT_REGISTER_SIZE, byte_order); + *pc = arm_addr_bits_remove (gdbarch, *pc); return 1; } -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com