This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question on Dwarf2 unwind info and optimized code
- From: Daniel Jacobowitz <drow at false dot org>
- To: Christophe LYON <christophe dot lyon at st dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 24 Oct 2005 13:27:53 -0400
- Subject: Re: Question on Dwarf2 unwind info and optimized code
- References: <435D0B8B.3020403@st.com>
On Mon, Oct 24, 2005 at 06:27:55PM +0200, Christophe LYON wrote:
>
> Hi all,
>
> I have been look at the Dwarf2 frame info generated by GCC, and how it
> works.
> From what I can see, only the register saves are recorded, and not the
> restores. Why?
IIUC, because (A) it's much harder, and (B) it's rarely necessary.
> I guess it may loose GDB if one sets a breakpoint inside a function
> epilogue, right?
Yes, occasionally this happens.
> I am currently working on the debug_frame info emission in our C/C++
> compiler (based on Open64) and I have recently come across optimized
> code which I don't know how to handle.
Reposting this question to increasingly unrelated lists is not likely
to help you find an answer :-)
> It's also unclear to me if I can/should use the
> remember_state/restore_state dwarf operators.
> Indeed, what is the rule?
There's no rule, just documentation of how they work - if you can run
through the CFI stack machine and get the right results, you could use
them.
--
Daniel Jacobowitz
CodeSourcery, LLC