From: Andrew Cagney <ac131313@redhat.com>
To: Michal Ludvig <mludvig@suse.cz>
Cc: GDB Patches <gdb-patches@sources.redhat.com>
Subject: Re: [patch/rfc] Add a sentinel frame
Date: Fri, 28 Feb 2003 15:48:00 -0000 [thread overview]
Message-ID: <3E5F8559.1020708@redhat.com> (raw)
In-Reply-To: <3E5F5DEE.3030505@suse.cz>
> Andrew Cagney wrote:
> To give this x86-64 thread clear closure. The internal-error you are seeing from the new frame code is now, officially, "not-a-frame-bug".
>
> Yes, I've already realised so. Thank you for confirmation.
>
> The underlying problem is caused by a design flaw (one of many) in the original CFI code (on which the x86-64 depends). It's trying to use the CFI unwinder on a block of code that either: has no CFI information; or has CFI information that isn't relevant to the stack frame being unwound. Using CFI to unwind such a frame is meaningless.
> [...]
> To fix this problem, the x86-64 will need to implement both that and the save_dummy_frame_tos() method.
>
> OK. So, first I need to convert x86-64 target to use all the new frame-id stuff I think. And then implement handling of different frame types (normal (CFI), dummy, sigtramp, and specifically for x86-64 also normal frames without CFI debug info).
> Basically all calls to cfi_*() functions from x86-64-*.c files should become x86_64_*() functions that call the appropriate cfi_*() functions if needed, or a frame-type specific thing otherwise.
> Correct?
Well, to fix this specific bug I think you'd just need to implement:
save_dummy_frame_tos()
unwind_dummy_id() (see uncommitted patch I posted).
And ensure that the top-of-stack value saved by save_dummy_frame_tos()
matches the id.base value returned by unwind_dummy_id().
--
The cleanup is more substantial:. The first shaky step is to implement
a cfi-frame.[hc] object (using dwarf2expr.[hc]?). After that are the
separate x86-64 specific unwinders: traditional, sigtramp. The key
difference is that with the old code the sequence:
frame->get_saved_register ()
->x86_64_get_saved_register ()
->cfi_get_saved_register ()
where as the new code is more direct:
frame->register_unwind()
->cfi_register_unwind()
(the x86-64 code doesn't get a look in), and very recursive:
frame->register_unwind()
->cfi_register_unwind(frame)
... determines that it needs the next frame's register
... that frame happens to be a dummy
frame->register ()
frame->next->register_unwind()
->dummy_frame_register_unwind(frame->next)
Andrew
next prev parent reply other threads:[~2003-02-28 15:48 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-23 20:54 Andrew Cagney
2003-01-27 21:42 ` Andrew Cagney
2003-02-10 23:36 ` Michal Ludvig
2003-02-11 16:48 ` Andrew Cagney
2003-02-18 11:21 ` Michal Ludvig
2003-02-19 13:27 ` Andrew Cagney
2003-02-19 14:04 ` Daniel Jacobowitz
2003-02-19 16:46 ` Andrew Cagney
2003-02-19 16:56 ` Daniel Jacobowitz
2003-02-19 17:11 ` Andrew Cagney
2003-02-19 17:17 ` Daniel Jacobowitz
2003-02-19 17:46 ` Andrew Cagney
2003-02-19 17:56 ` Daniel Jacobowitz
2003-02-19 18:36 ` Andrew Cagney
2003-02-19 18:52 ` Daniel Jacobowitz
2003-02-19 20:22 ` Andrew Cagney
2003-02-19 20:39 ` Daniel Jacobowitz
2003-02-19 21:21 ` Andrew Cagney
2003-02-20 19:32 ` Daniel Jacobowitz
2003-02-19 21:45 ` Andrew Cagney
2003-02-20 19:32 ` Daniel Jacobowitz
2003-02-25 16:24 ` Michal Ludvig
2003-02-25 19:43 ` Andrew Cagney
2003-02-25 21:00 ` Michal Ludvig
2003-02-25 21:12 ` Andrew Cagney
2003-02-26 8:04 ` Michal Ludvig
2003-02-27 18:27 ` Andrew Cagney
2003-02-28 13:02 ` Michal Ludvig
2003-02-28 15:48 ` Andrew Cagney [this message]
2003-03-05 17:38 ` Michal Ludvig
2003-03-05 18:25 ` Andrew Cagney
2003-03-06 16:00 ` Michal Ludvig
2003-03-06 20:13 ` Andrew Cagney
2003-03-06 22:42 ` [RFA] Dummy frames on x86-64 Michal Ludvig
2003-03-07 14:50 ` Andrew Cagney
2003-02-25 22:41 ` [patch/rfc] Add a sentinel frame Andrew Cagney
2003-02-25 21:21 Michael Elizabeth Chastain
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=3E5F8559.1020708@redhat.com \
--to=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=mludvig@suse.cz \
/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