From: Andrew Cagney <cagney@gnu.org>
To: Randolph Chung <randolph@tausq.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc] Try to get dummy calls working on hpux again
Date: Fri, 11 Jun 2004 15:25:00 -0000 [thread overview]
Message-ID: <40C9CECF.5040902@gnu.org> (raw)
In-Reply-To: <20040610221238.GJ561@tausq.org>
>>> Sigh (the relevant code will need comments explaining this). Are you
>>> absolutely positively certain this is true (for both HP/UX 10.20 /
>>> 11.xx)? :-)
>
>
> there is a comment that explains this already; is this not enough?
> + /* We set the breakpoint address and r31 to (close to) where the current
> + pc is; when __gcc_plt_call returns, it will restore pcsqh to the
> + current value based on this. The -4 is needed for frame unwinding
> + to work properly -- we need to land in a different function than
> + the current function. */
Given all the questions I'm asking, I think you'll want to include more
details. Some sort of summary of this thread.
> I've only tested on 11.11 so far.... do you mean "can we do something
> simplier with another version of HPUX", or "will this also work with
> another version of HPUX"? The answer to the latter is probably yes. The
> original code that was deleted also did something similar, but in a much
> more ugly way in some cases.
>
>
>>> Also that sequence in the call path, the return path, or both?
>
>
> both; but it is done inside of __gcc_plt_call.
>
>
>>> Having the dummy-code containing a non-trivial sequence of instructions
>>> opens up the problem of needing to be able to step through them. Issues
>>> similar to the grief I've been going through with signal trampolines.
>
>
> well....
>
> the current sequence actually is:
> current function -> dummy frame -> __gcc_plt_call -> called function
Ah! the comments should include this diagram, I think making this clear
(and the need to fudge __gcc_plt_call) is what's really needed.
> we need to teach gdb that __gcc_plt_call (__d_plt_call) is a stub and
> how to unwind through that. i'm thinking about whether this can be done
> with the stub unwinder itself or if we need a special unwinder, because
> it doesn't follow the same calling conventions as a regular
> function/stub. <sigh>
Yes. Probably using the tramp-frame logic.
Andrew
next prev parent reply other threads:[~2004-06-11 15:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-10 6:12 Randolph Chung
2004-06-10 19:27 ` Andrew Cagney
2004-06-10 20:23 ` Randolph Chung
2004-06-10 20:42 ` Andrew Cagney
2004-06-10 22:12 ` Randolph Chung
2004-06-11 15:25 ` Andrew Cagney [this message]
2004-06-11 16:12 ` Randolph Chung
2004-06-11 17:30 ` Andrew Cagney
2004-07-11 6:53 ` Randolph Chung
2004-07-14 16:54 ` Andrew Cagney
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=40C9CECF.5040902@gnu.org \
--to=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=randolph@tausq.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