From: Jerome Guitton <guitton@adacore.com>
To: gdb-patches@sourceware.org
Subject: [RFA] Use the frame address in block to locate alpha mdebug records
Date: Mon, 24 Nov 2008 18:05:00 -0000 [thread overview]
Message-ID: <20081124132339.GA80088@adacore.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]
Hello,
In alpha-mdebug-tdep.c, the frame address in block is used to locate
the mdebug information associated to a function... except for one
occurence, in alpha_mdebug_frame_unwind_cache, where the return
address is used. I fail to understand why, and it seems wrong to me:
the return address may point to the "next" function in .text, so we
may end up fetching the wrong debug record. This typically happens with
no-return functions that do not have epilogue sequences.
This patch should fix this. This also fixes Ada's "catch exception"
feature on alpha-tru64; the procedures that raise exceptions in the
Ada run-time are no-return, which is why they are affected by the
problem I mentionned.
I failed to run the dejaGNU testsuite on an alpha machine, too many
hangups. However, I have been validated this patch against AdaCore's
internal testsuite and I had no regression. I am pretty confident that
it will not break anything.
OK to apply?
Thanks,
Jerome
2008-11-24 Jerome Guitton <guitton@adacore.com>
* alpha-mdebug-tdep.c (alpha_mdebug_frame_unwind_cache): Use
the frame address in block instead of the return address to
locate the mdebug PDR of the frame.
[-- Attachment #2: alpha-mdebug-tdep.c.diff --]
[-- Type: text/x-diff, Size: 694 bytes --]
Index: alpha-mdebug-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-mdebug-tdep.c,v
retrieving revision 1.21
diff -u -p -r1.21 alpha-mdebug-tdep.c
--- alpha-mdebug-tdep.c 21 May 2008 14:47:26 -0000 1.21
+++ alpha-mdebug-tdep.c 24 Nov 2008 11:55:55 -0000
@@ -193,7 +193,7 @@ alpha_mdebug_frame_unwind_cache (struct
info = FRAME_OBSTACK_ZALLOC (struct alpha_mdebug_unwind_cache);
*this_prologue_cache = info;
- pc = get_frame_pc (this_frame);
+ pc = get_frame_address_in_block (this_frame);
/* ??? We don't seem to be able to cache the lookup of the PDR
from alpha_mdebug_frame_p. It'd be nice if we could change
next reply other threads:[~2008-11-24 13:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-24 18:05 Jerome Guitton [this message]
2008-11-24 18:35 ` Daniel Jacobowitz
2008-11-24 18:51 ` Jerome Guitton
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=20081124132339.GA80088@adacore.com \
--to=guitton@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