From: Nathan Froyd <froydnj@codesourcery.com>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] output INCOMING_RETURN_ADDR_RTX in debug info
Date: Fri, 03 Aug 2007 15:51:00 -0000 [thread overview]
Message-ID: <20070803155148.GA6839@sparrowhawk.codesourcery.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]
When PR 24444 was fixed, recording the initial location of the return
address in debug info was made dependent on whether DWARF2_UNWIND_INFO
was defined and was true at runtime. On targets where
DWARF2_UNWIND_INFO is defined to 0, this was a change in behavior from
the previous method, which was to output the initial location of the
return address if DWARF2_UNWIND_INFO was simply defined.
The current behaviour is inconvenient for the debugger on platforms
where DWARF2_UNWIND_INFO is 0, but INCOMING_RETURN_ADDR_RTX is defined.
(Since the debugger now has to guess where the return address is,
whereas the compiler could have simply told it.) On such platforms
(e.g. vxworks targets), we already record register saves in the prologue
in the debug info; we might as well record where the return address is
too. The attached patch changes things to record the initial location
of the return address if INCOMING_RETURN_ADDR_RTX is defined.
I don't see a reason to make this information conditional on
DWARF2_UNWIND_INFO--but I am also not a debug info expert.
Clarifications/corrections welcome!
Bootstrapped and tested on i586-wrs-vxworks. OK to commit?
:ADDPATCH dwarf2:
-Nathan
2007-08-03 Nathan Froyd <froydnj@codesourcery.com>
gcc/
* dwarf2out.c (dwarf2out_frame_init): Make saving
INCOMING_RETURN_ADDR_RTX dependent on whether it is defined.
[-- Attachment #2: dwarf2-retaddr.patch --]
[-- Type: text/plain, Size: 555 bytes --]
Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c (revision 178052)
+++ gcc/dwarf2out.c (working copy)
@@ -2612,9 +2612,8 @@ dwarf2out_frame_init (void)
/* On entry, the Canonical Frame Address is at SP. */
dwarf2out_def_cfa (NULL, STACK_POINTER_REGNUM, INCOMING_FRAME_SP_OFFSET);
-#ifdef DWARF2_UNWIND_INFO
- if (DWARF2_UNWIND_INFO)
- initial_return_save (INCOMING_RETURN_ADDR_RTX);
+#ifdef INCOMING_RETURN_ADDR_RTX
+ initial_return_save (INCOMING_RETURN_ADDR_RTX);
#endif
}
next reply other threads:[~2007-08-03 15:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-03 15:51 Nathan Froyd [this message]
2007-08-05 7:13 ` Eric Botcazou
2007-08-09 15:25 ` Nathan Froyd
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=20070803155148.GA6839@sparrowhawk.codesourcery.com \
--to=froydnj@codesourcery.com \
--cc=gcc-patches@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).