Re: Question on Dwarf2 unwind info and optimized code

2005-10-25 Thread Richard Henderson
On Tue, Oct 25, 2005 at 10:08:59AM +0200, Christophe LYON wrote: > On occasions, I wonder whether it wouldn't make sense to generate > different infos in debug_frame and eh_frame And we do this. r~

Re: Question on Dwarf2 unwind info and optimized code

2005-10-25 Thread Richard Henderson
On Tue, Oct 25, 2005 at 10:08:59AM +0200, Christophe LYON wrote: > On occasions, I wonder whether it wouldn't make sense to generate > different infos in debug_frame and eh_frame: IIUC, GCC tries to > 'compress' the debug frame info by generating few advance_loc > instructions (eg only 1 for the wh

Re: Question on Dwarf2 unwind info and optimized code

2005-10-25 Thread Daniel Jacobowitz
On Tue, Oct 25, 2005 at 12:44:42PM -0700, James E Wilson wrote: > On Tue, 2005-10-25 at 01:08, Christophe LYON wrote: > > On occasions, I wonder whether it wouldn't make sense to generate > > different infos in debug_frame and eh_frame: > > That is probably a reasonable solution if it can be imple

Re: Question on Dwarf2 unwind info and optimized code

2005-10-25 Thread James E Wilson
On Tue, 2005-10-25 at 01:08, Christophe LYON wrote: > On occasions, I wonder whether it wouldn't make sense to generate > different infos in debug_frame and eh_frame: That is probably a reasonable solution if it can be implemented cleanly. There are already some differences. debug_frame info can

Re: Question on Dwarf2 unwind info and optimized code

2005-10-25 Thread James E Wilson
On Tue, 2005-10-25 at 11:34, Joern RENNECKE wrote: > It can't be easily implemented in target-specific code alone. Sometimes > there is code after the epilogue, so there would have to be > a mechanism to get the dwarf virtual machine back to the pre-epilogue state. There is. I'm more conversant

Re: Question on Dwarf2 unwind info and optimized code

2005-10-25 Thread Joern RENNECKE
In http://gcc.gnu.org/ml/gcc/2005-10/msg00823.html, Jim Wilson wrote: > The frame info is primarily used for C++ EH stack unwinding. Since you can't throw a C++ exception in an epilogue, epilogue frame info isn't needed > for this, and was never implemented for most targets. Which is a shame.

Re: Question on Dwarf2 unwind info and optimized code

2005-10-25 Thread Christophe LYON
Jim Wilson wrote: Christophe LYON wrote: 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? The frame info is primarily used for C++ EH stack unwinding. Since you can't throw

Re: Question on Dwarf2 unwind info and optimized code

2005-10-25 Thread Christophe LYON
Daniel Jacobowitz wrote: 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 a

Re: Question on Dwarf2 unwind info and optimized code

2005-10-24 Thread Jim Wilson
Christophe LYON wrote: 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? The frame info is primarily used for C++ EH stack unwinding. Since you can't throw a C++ exception in an

Re: Question on Dwarf2 unwind info and optimized code

2005-10-24 Thread Daniel Jacobowitz
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)

Question on Dwarf2 unwind info and optimized code

2005-10-24 Thread Christophe LYON
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? I guess it may loose GDB if one sets a breakpoint inside a function epilogue, right? I am currently working on the