From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: gdb-patches@sourceware.org
Subject: [rfc] Strip Thumb bit from PC returned by arm_get_longjmp_target
Date: Tue, 17 Aug 2010 19:16:00 -0000 [thread overview]
Message-ID: <201008171915.o7HJFvSp003702@d12av02.megacenter.de.ibm.com> (raw)
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
next reply other threads:[~2010-08-17 19:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-17 19:16 Ulrich Weigand [this message]
2010-08-18 9:01 ` Matthew Gretton-Dann
2010-08-18 18:28 ` Ulrich Weigand
2010-08-19 8:49 ` Ulrich Weigand
2010-08-20 8:38 ` Matthew Gretton-Dann
2010-08-20 12:00 ` Ulrich Weigand
2010-08-20 8:53 ` Matthew Gretton-Dann
2010-08-20 11:45 ` Ulrich Weigand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201008171915.o7HJFvSp003702@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox