This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [offbyone RFC] Merge i386newframe


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]