This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] Use the frame address in block to locate alpha mdebug records
- From: Jerome Guitton <guitton at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 24 Nov 2008 14:23:39 +0100
- Subject: [RFA] Use the frame address in block to locate alpha mdebug records
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.
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