From: Andrew Cagney <cagney@gnu.org>
To: Randolph Chung <randolph@tausq.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc/hppa] handle setting gp for calling shlib functions
Date: Thu, 29 Apr 2004 16:48:00 -0000 [thread overview]
Message-ID: <409131F2.5040706@gnu.org> (raw)
In-Reply-To: <20040429161357.GA3965@tausq.org>
>>>Unfortunately the func_addr that is passed
>>>> >into push_dummy_call is already the canonicalized function address,
>>>> >so i cannot do this as part of e.g. find_global_pointer.
>>
>>>
>>> For PPC64 I used ABI knowledge to do a code address -> descriptor
>>> address reverse lookup. Can you do something similar?
>
>
> you mean look through a opd section? unfortunately there isn't such a
> thing for the 32-bit abi. it's there in hppa64.
Anything.
For pa64, given "<symname>", the descriptor is at ".<symname>" so the
operation is pretty easy.
> for hppa32, the plabel likely resides in the got/plt, and i don't think
> we can easily find it there.
>
>
>>> Anyway, a thing-to-do-one day is to pass the function's ``value''
>>> (descriptor and type) to push-dummy-call (there has been talk of doing
>>> this before). Another is to clean up what's passed as the parameter
>>> list -> again descriptors.
>
>
> well, i can already do this, by *not* implementing the conversion
> function. However, when the actual call is made, we need to do the
> conversion.
>
> how about adding a new gdbarch method breakpoint_from_func_ptr
> and potentially not calling convert_from_func_ptr_address() from
> call_function_by_hand()? other than ia64, ppc64 and hppa, how many
> function-descriptor archs do we have?
(also xstormy16 at least)
The function/variable is (well was, it appears to have fallen off the
radar for the moment) also wanted for a second reason. When it comes to
implementing ABI variants the full function type info is needed. Hence,
a ``struct value'' function descriptor (or descriptor pointer / type)
are going to eventually be needed anyway. Hence, I think an updated
push-dummy-call with the new parameter would be better.
Andrew
next prev parent reply other threads:[~2004-04-29 16:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-29 6:23 Randolph Chung
2004-04-29 14:12 ` Andrew Cagney
2004-04-29 15:07 ` Randolph Chung
2004-04-29 16:02 ` Andrew Cagney
2004-04-29 16:13 ` Randolph Chung
2004-04-29 16:48 ` Andrew Cagney [this message]
2004-04-30 4:04 ` Randolph Chung
2004-04-30 14:25 ` Andrew Cagney
2004-05-04 14:03 ` Andrew Cagney
2004-05-04 14:10 ` Randolph Chung
2004-05-04 14:34 ` 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=409131F2.5040706@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