This is the mail archive of the gdb@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] |
Hi all,
since there are different unwind mechanisms in different branches of GDB I got a bit lost. I need to sort my thoughts to understand the principles.
First my view of how things now work:
To be honest, this a very good description of how GDB did work: special case on top of special case on top of ....
- In the backtrace the function's arguments are printed as well. - on i386 it's not a problem since they are on the stack - on x86-64 we pass some of them in registers - that's fine for the first frame (#0) - I know all registers and I can use location lists to find current position of a given arg. - for the second frame (#1) I could call next_frame->unwind->reg(regnum) to get the register I need and unwind it even more by calling this_frame->unwind->reg(regnum) to get it's value at the beginning of the frame. - but how about the next frames (#2,...)? I can always call next_frame->unwind->reg(regnum) and if the next_frame wouldn't know its "initial" value (ie. the value at the place of PC) it would recursively call next_frame->next_frame->unwind->register() untill it get's the value.
The above is the desired and correct behavior. This recursion is required for things to work (a stack is recursive by definition).
Michal Ludvig -- * SuSE CR, s.r.o * mludvig at suse dot cz * (+420) 296.545.373 * http://www.suse.cz
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |