[offbyone RFC] Merge i386newframe

Andrew Cagney ac131313@redhat.com
Fri Mar 14 16:19:00 GMT 2003


>    If the previous frame's direction flag should have been reset then the    register unwind code should have done that (wonder if dwarf2cfi is    powerful enough to specify this).
> 
> I felt that it is somehow different from a "saved" registers.  But
> your phrasing makes me believe it's more correct to reset from the
> register unwind code.
> 
> I don't think it is any different.  For:
> 
>     (gdb) up
>     Frame #1 foo()
>     (gdb) info register psw
> 
> to work correctly, the register unwind code will need to zap that bit. Otherwize GDB will mis-represent the value of the PSW in the calling frame.
> 
> I think there is still going to be a problem in the CFI unwinder.  The CFI spec as the `architectural' register unwind rule as a loop-hole. Something related to that may need to be added.  Wonder if GCC even thought to generate it.  Hmm, the throw/catch code must have done something .... 

Thinking about this some more, a generic pop function won't work.

Consider the frames:

- sentinel
- normal
- sigtramp
- dummy

It's only when unwinding a normal frame that that PSW bit should be 
zapped.  For all the others the PSW value of the callee was hopefully 
completly saved by the caller.

Andrew




More information about the Gdb-patches mailing list