From: "Jafa" <jafa@silicondust.com>
To: "Andrew Cagney" <ac131313@redhat.com>
Cc: <gdb@sources.redhat.com>
Subject: Re: ignore helper no longer works?
Date: Thu, 03 Jul 2003 17:27:00 -0000 [thread overview]
Message-ID: <001901c34188$1e14e770$0a02a8c0@scenix.com> (raw)
In-Reply-To: <3F044768.6090403@redhat.com>
Hi Andrew,
>- When stepping, the need to identify and single step through
>trampolines / helpers.
I have updated the backtrace code so that if it detects that it is in an
epilogue stub then return a frame with no known return address (0) and no
known FP (0).
I can probably work out the FP of the previous function if need be, but have
no hope (without some simulation) of figuring out the return address.
Step-over at the end of a fucntion results in gdb running without stopping
(and it doesn't call ignore_helper).
One way to address this problem would be for gdb to call ignore_helper, and
then know not attempt a stack-backtrace.
Another solution (ok, crude hack) would be for the tdep to cache the last
known PC so that if it steps into a stub then it knows where it came from.
>- When stopped, the need to back trace out of a trampoline / helper.
I think it is accceptable not being able to do a backtrace if you are in an
epilogue helper.... the code now returns that the FP and PC are unknown to
abort the backtrace.
I am open to ideas (I figure this must be a rare but general problem). If
all else fails I will implement the crude hack above because I need to get
this working.
Thanks
Nick
----- Original Message -----
From: "Andrew Cagney" <ac131313@redhat.com>
To: "Jafa" <jafa@silicondust.com>
Cc: <gdb@sources.redhat.com>
Sent: Thursday, July 03, 2003 8:10 AM
Subject: Re: ignore helper no longer works?
> 1) Say it is my responsibility to determine the return address anywhere in
> code, even if it means writing a whole lot of code in gdb to simulate the
> execution of these stubs.
>
> 2) Fix gdb at a higher level so that it doesn't try to obtain a return
> address from a helper function - instead keep stepping (like it gdb used
to
> do).
Sounds like you've got two problems:
- When stepping, the need to identify and single step through
trampolines / helpers.
- When stopped, the need to back trace out of a trampoline / helper.
Given a core file, it isn't possible to `step'. Your unwinder is going
to need to identify and dig itself out of that hole. Main thing to do
is to not lie - from what I understand of your case, given a callee that
jumped to a helper, you'll end up displaying:
<helper>
caller
Andrew
> I can figure out the FP ok (all be it that it is painful without being
able
> to see the prologue) - the old system only asked for the FP and after
> detecting that it was the same frame, kept stepping.
>
> BTW - I have also noticed that gdb now does not call ignore_helper for any
> step-over operations, instead relying on the tdep to supply the return
> address for the stub. It think it always used to call ignore_helper and if
> it was a helper then it stepped rather that setting a breakpoint as if it
> was a function.
>
> I don't want to be too quick to butcher infrun - I would appreciate your
> advice.
next prev parent reply other threads:[~2003-07-03 17:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-03 2:27 Jafa
2003-07-03 15:10 ` Andrew Cagney
2003-07-03 17:27 ` Jafa [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-07-03 18:36 Jafa
2003-07-03 0:33 Jafa
2003-07-03 0:27 Jafa
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='001901c34188$1e14e770$0a02a8c0@scenix.com' \
--to=jafa@silicondust.com \
--cc=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