[RFA] Use the frame address in block to locate alpha mdebug records

Jerome Guitton guitton@adacore.com
Mon Nov 24 18:05:00 GMT 2008


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: alpha-mdebug-tdep.c.diff
Type: text/x-diff
Size: 694 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20081124/2be671dc/attachment.bin>


More information about the Gdb-patches mailing list