From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [RFA] Fix calls to frame_base_find_by_frame in frame.c (?)
Date: Fri, 09 May 2008 04:04:00 -0000 [thread overview]
Message-ID: <20080509022413.GO7421@adacore.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 864 bytes --]
Hi Daniel,
I noticed a regression while converting alpha-osf to the value-based
unwinding approach, and it looks like frame_base_find_by_frame was
changed to take a this_frame but the callers were still left passing
a next_frame. As a result, we ended up selecting the wrong frame
base unwinder for a one of our frames, leading to the wrong value
being printed for the one argument.
2008-05-08 Joel Brobecker <brobecker@adacore.com>
* frame.c (get_frame_base_address, get_frame_locals_address)
(get_frame_args_address): Pass the correct frame when calling
frame_base_find_by_frame.
Tested on x86-linux. I also tested this on alpha-osf after my updates
for the new value-based unwinding - but because I haven't been able
to run the testsuite on this platform for a while now, I used AdaCore's
GDB testsuite as the reference.
--
Joel
[-- Attachment #2: frame.c.diff --]
[-- Type: text/plain, Size: 1540 bytes --]
Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.240
diff -u -p -r1.240 frame.c
--- frame.c 3 May 2008 23:24:17 -0000 1.240
+++ frame.c 9 May 2008 02:21:25 -0000
@@ -1592,7 +1592,7 @@ get_frame_base_address (struct frame_inf
if (get_frame_type (fi) != NORMAL_FRAME)
return 0;
if (fi->base == NULL)
- fi->base = frame_base_find_by_frame (fi->next);
+ fi->base = frame_base_find_by_frame (fi);
/* Sneaky: If the low-level unwind and high-level base code share a
common unwinder, let them share the prologue cache. */
if (fi->base->unwind == fi->unwind)
@@ -1608,7 +1608,7 @@ get_frame_locals_address (struct frame_i
return 0;
/* If there isn't a frame address method, find it. */
if (fi->base == NULL)
- fi->base = frame_base_find_by_frame (fi->next);
+ fi->base = frame_base_find_by_frame (fi);
/* Sneaky: If the low-level unwind and high-level base code share a
common unwinder, let them share the prologue cache. */
if (fi->base->unwind == fi->unwind)
@@ -1624,7 +1624,7 @@ get_frame_args_address (struct frame_inf
return 0;
/* If there isn't a frame address method, find it. */
if (fi->base == NULL)
- fi->base = frame_base_find_by_frame (fi->next);
+ fi->base = frame_base_find_by_frame (fi);
/* Sneaky: If the low-level unwind and high-level base code share a
common unwinder, let them share the prologue cache. */
if (fi->base->unwind == fi->unwind)
next reply other threads:[~2008-05-09 2:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-09 4:04 Joel Brobecker [this message]
2008-05-09 4:06 ` Daniel Jacobowitz
2008-05-09 7:45 ` Joel Brobecker
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=20080509022413.GO7421@adacore.com \
--to=brobecker@adacore.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