From: Andreas Schwab <schwab@linux-m68k.org>
To: gdb-patches@sourceware.org
Subject: Don't overshoot when executing cfa instructions
Date: Sat, 27 Jun 2009 22:23:00 -0000 [thread overview]
Message-ID: <m2ws6xqptl.fsf@igel.home> (raw)
The dwarf2 unwinder is careful to substract one from pc when finding the
associated fde, but when executing the cfa instructions it uses the
original pc as the limit, which may cause it to execute too much, for
example if this is a frame calling a noreturn function. Tested on
powerpc-linux.
Andreas.
2009-06-28 Andreas Schwab <schwab@linux-m68k.org>
* dwarf2-frame.c (execute_cfa_program): Use
get_frame_address_in_block instead of get_frame_pc.
--- gdb/dwarf2-frame.c.~1.89.~ 2009-06-25 00:05:03.000000000 +0200
+++ gdb/dwarf2-frame.c 2009-06-27 21:52:17.000000000 +0200
@@ -376,7 +376,7 @@ execute_cfa_program (struct dwarf2_fde *
struct dwarf2_frame_state *fs)
{
int eh_frame_p = fde->eh_frame_p;
- CORE_ADDR pc = get_frame_pc (this_frame);
+ CORE_ADDR pc = get_frame_address_in_block (this_frame);
int bytes_read;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next reply other threads:[~2009-06-27 22:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-27 22:23 Andreas Schwab [this message]
2009-06-27 22:28 ` Daniel Jacobowitz
2009-06-27 22:33 ` Daniel Jacobowitz
2009-06-29 13:19 ` Andreas Schwab
2009-06-29 14:33 ` Daniel Jacobowitz
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=m2ws6xqptl.fsf@igel.home \
--to=schwab@linux-m68k.org \
--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