From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Michal Ludvig <mludvig@suse.cz>,
GDB Patches <gdb-patches@sources.redhat.com>
Subject: Re: [RFA] Artifical dwarf2 debug info
Date: Mon, 16 Dec 2002 12:10:00 -0000 [thread overview]
Message-ID: <3DFE3007.3040100@redhat.com> (raw)
In-Reply-To: <20021216193459.GA27215@nevyn.them.org>
>> >If I'm scanning this code correctly, all we would need to do would be
>> >to connect set_unwind_by_pc to the CFI machinery. No, it's more
>> >complicated than that, we still call both FRAME_CHAIN and frame_pc_unwind;
>> >I'm not entirely clear on how frame_saved_regs_id_unwind works.
>> >Similarly in get_prev_frame.
>
>>
>> FRAME_CHAIN is going away.
>>
>> The steps are broadly:
>> pc = pc-unwind (next_frame)
>> if (not an edge case like dummy frame where the id doesn't need to
>> be unwound because the frame can be identified using the callee's ID)
>> id = id-unwind (next_frame);
>> create frame from pc/id setting new unwind methods using pc.
>> (frame_saved_regs_id_unwind is there to keep code that just implements
>> frame chain working.).
>
>
> Great!
>
>
>> >But what I'd like to see is something like you've sketched above.
>> >Probably check first for dummy frame, then for sigtramp frame, then for
>> >CFI frame, and then fall back to the defaults.
>
>>
>> Yes. Should the choices/order be hardwired or specified by the
>> architecture though? I.e., iterate over a list of possible frames that
>> are specified by the architecture.
>
>
> Hmm, I'm not sure. Do we have any architectures that would want to
> specify their own frame types? In such a way that using this CFI
> approach wouldn't suffice?
Well, I'd not want to be the one enabling CFI on all architectures.
That code needs some serious cleanups.
As for own frame types, a SIGTRAMP frames are one case.
>> The catch is that it needs to unwind the PC before anything else. That
>> way it can correctly set the type. Like I said, patch for that pending.
>
>
> Right. I really appreciate all your cleanups in this area. I have
> some work to do on FRAME_CHAIN_VALID but I'll sit on it for a while,
> until I see what this looks like when you're done revamping the
> unwinders. (That's the backtrace-to-or-through-main conversation from
> some months ago.)
>
> Back to the patch at the beginning of this thread - do you think this
> view of fake CFI information is feasible? Any comments on Michal's
> patch?
It's feasible. It may long term solve another problem. Apparently GDB
needs to generate, at run time, debug info for things like Java. It may
also be easier to handle this case by implementing direct functions and
not going via CFI.
That actual code, though, is a mess. It is adding another edge case to
code that shouldn't have to handle anything at all.
BTW, exactly is the difference between a prologueless and frameless
function? The prologue case appears to be checking for a push -> the
reverse of frameless.
Andrew
next prev parent reply other threads:[~2002-12-16 19:57 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-14 17:31 Michal Ludvig
2002-12-14 22:53 ` Eli Zaretskii
2002-12-15 11:03 ` Daniel Jacobowitz
2002-12-16 7:28 ` Michal Ludvig
2002-12-16 7:49 ` Daniel Jacobowitz
2002-12-16 9:27 ` Michal Ludvig
2002-12-16 9:54 ` Daniel Jacobowitz
2002-12-16 10:38 ` Eli Zaretskii
2002-12-20 8:43 ` Michal Ludvig
2002-12-20 10:51 ` Eli Zaretskii
2002-12-16 9:25 ` Andrew Cagney
2002-12-16 9:40 ` Daniel Jacobowitz
2002-12-16 10:04 ` Andrew Cagney
2002-12-16 10:17 ` Daniel Jacobowitz
2002-12-16 10:56 ` Andrew Cagney
2002-12-16 11:13 ` Daniel Jacobowitz
2002-12-16 11:34 ` Andrew Cagney
2002-12-16 11:57 ` Daniel Jacobowitz
2002-12-16 12:10 ` Andrew Cagney [this message]
2002-12-16 12:42 ` Daniel Jacobowitz
2002-12-17 6:23 ` Michal Ludvig
2002-12-17 6:28 ` Andrew Cagney
2002-12-17 8:42 ` Daniel Jacobowitz
2002-12-18 4:39 ` Andrew Cagney
2002-12-18 10:05 ` Daniel Jacobowitz
2003-01-02 20:54 ` Andrew Cagney
2003-01-02 21:19 ` Daniel Jacobowitz
2003-01-02 23:05 ` Andrew Cagney
2003-01-02 23:27 ` Daniel Jacobowitz
2003-01-03 0:28 ` Andrew Cagney
2002-12-16 9:46 ` Michal Ludvig
2002-12-16 9:57 ` Andrew Cagney
2002-12-16 10:01 ` Michal Ludvig
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=3DFE3007.3040100@redhat.com \
--to=ac131313@redhat.com \
--cc=drow@mvista.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