From: Andrew Cagney <cagney@gnu.org>
To: Randolph Chung <tausq@debian.org>
Cc: gdb@sources.redhat.com
Subject: Re: [patch/rfc] How to handle stepping into an unresolved plt entry?
Date: Mon, 24 May 2004 17:32:00 -0000 [thread overview]
Message-ID: <40B231BE.50609@gnu.org> (raw)
In-Reply-To: <20040521182138.GN566@tausq.org>
>>Hmm, should gdb put a greater reliance on SKIP_TRAMPOLINE_CODE.
>>> Something like a new separate clause:
>>>
>>> if (we've stepped into a function
>>> && we're not stopping in this sort of code
>>> && skip trampoline returns something)
>>> run to skip trampoline breakpoint, possibly doing a step into function
>
>
> sounds ok; i'm curious about what are the other trampoline cases that we
> need to deal with. i found another case on hppa where what needs to
> happen doesn't really match what infrun.c is doing (i'll describe it
> below), but it'll be good if somehow we can handle these in a sort of
> standard way so that h_i_e is actually understandable :)
>
> the other problem i've seen is when stepping into a shared library call
> -- again, this goes through a stub. gdb steps into the stub, but before
> it has a chance to skip over the stub, it hits this (since the stub has
> no corresponding symbol):
That case should be handled by the same skip-trampoline logic (it is
just another trampoline).
> if (step_over_calls == STEP_OVER_UNDEBUGGABLE
> && ecs->stop_func_name == NULL)
> {
> /* The inferior just stepped into, or returned to, an
> undebuggable function (where there is no symbol, not even a
> minimal symbol, corresponding to the address where the
> inferior stopped). Since we want to skip this kind of code,
> we keep going until the inferior returns from this
> function. */
> [...]
> /* Set a breakpoint at callee's return address (the address
> at which the caller will resume). */
> insert_step_resume_breakpoint (get_prev_frame (get_current_frame ()),
> ecs);
> keep_going (ecs);
> return;
> }
>
> if i move this block after the next block (that checks for stub frames
> and does SKIP_TRAMPOLINE_CODE () processing) then it works...
>
> I'm still trying to understand why the checks in h_i_e happen in the
> current order.... so i don't know whether this is a problem with h_i_e
> or somewhere else...
The rationale (if we think it can be called that :-) is lost in the
depths of time. Perhaps some unwinders barfed when presented with a
function with no function name so it was thought that doing the check
first was prudent?
Anyway, can the IN_SOLIB_RETURN_TRAMPOLINE be moved up as well (with an
additional ecs->stop_func_name != NULL check?
Andrew
next prev parent reply other threads:[~2004-05-24 17:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-21 6:44 Randolph Chung
2004-05-21 16:00 ` Andrew Cagney
2004-05-21 18:21 ` Randolph Chung
2004-05-24 17:32 ` Andrew Cagney [this message]
2004-05-24 18:52 ` Randolph Chung
2004-05-25 7:13 ` Randolph Chung
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=40B231BE.50609@gnu.org \
--to=cagney@gnu.org \
--cc=gdb@sources.redhat.com \
--cc=tausq@debian.org \
/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