From: Andrew Cagney <ac131313@redhat.com>
To: gdb@sources.redhat.com
Subject: New frame migration path ...
Date: Wed, 12 Mar 2003 20:37:00 -0000 [thread overview]
Message-ID: <3E6F9A82.6010609@redhat.com> (raw)
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
reply other threads:[~2003-03-12 20:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E6F9A82.6010609@redhat.com \
--to=ac131313@redhat.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).