* New frame migration path ...
@ 2003-03-12 20:37 Andrew Cagney
0 siblings, 0 replies; only message in thread
From: Andrew Cagney @ 2003-03-12 20:37 UTC (permalink / raw)
To: gdb
Below is a sketch for migrating existing ISA's to the new frame unwind code.
(ok, this is a bit light on details :-().
- if you have get_saved_register(this), replace it with
deprecated_unwind_register(this->next) (don't worry, I'm going to also
deprecate get_saved_register).
I'm about to send out a patch that adds a new architecture method -
deprecated_unwind_register() that, while largely equivalent to the old
get_saved_register(), is paramterized with the next, instead of this, frame.
The problem is that the new code relies on being able to do calls like:
frame_register_unwind (next);
... value of register in this, uncreated, frame ...
and that has no equivalent using get_saved_register() vis:
get_saved_register (next->prev)
... value of register in this, uncreated frame ...
(er, hold on next->prev == NULL). MichaelL's fix to x86-64 dummy-id has
this problem - while the patch looks correct, it can't work without the
above!
Given that, for the most part, architecture specific
get_saved_register() functions look like:
frame = get_next_frame(frame);
... find value to unwind ....
e.g., sh, and more importantly cfi. The migration should be `straight
forward' ...
It's deprecated since it is definitly only an intermediate step.
- implement gdbarch_unwind_pc(), delete frame_saved_pc()
This will likely require further fixes to the register unwinder et.al.
It needs to correctly unwind the PC.
- delete POP_FRAME.
Again, could involve fixing the register unwind code.
- implement gdbarch_unwind_dummy_id()
- slowly implement custom unwinders
Thoughts?
Anyone interested in trying it?
Andrew
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-03-12 20:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-12 20:37 New frame migration path Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).