From: Andrew Cagney <cagney@gnu.org>
To: Randolph Chung <randolph@tausq.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc] function descriptor handling for push_dummy_call
Date: Wed, 19 May 2004 17:05:00 -0000 [thread overview]
Message-ID: <40AB93DC.5080300@gnu.org> (raw)
In-Reply-To: <20040518061246.GG566@tausq.org>
This implements the idea discussed in:
http://sources.redhat.com/ml/gdb-patches/2004-05/msg00093.html
Instead of passing a dereferenced function value into push_dummy_call (), it
passes the entire "struct value *function". This is not a complete patch; it
is only for comments.
The first bit updates gdbarch.{sh,h,c} with the new prototype, and shows how
$(ARCH)-tdep.c will have to change. There are two cases: in most of the cases
the func_addr argument in the original prototype is not used, so it is
sufficient to only change the function declaration without changing
functionality. This will apply to almost all the targets. (hppa-tdep.c is
updated as an example.)
In a few other cases where the method needs the function address,
it will need to either make a call to find_function_addr () or
value_as_address (). This includes rs6000-tdep.c, ia64-tdep.c, and possibly
other function-descriptor targets.
So they could all, as a mechanical operation, be changed from:
..._call (..., CORE_ADDR funaddr, ...)
to:
..._call (..., struct value *function, ...)
{
CORE_ADDR funaddr = find_function_addr (function);
(perhaphs make find_function_addr robust to a NULL value_type).
I was thinking that infcall.c should convert "function" into a proper
function pointer but this appears just as effective.
I think this is ok.
Andrew
next prev parent reply other threads:[~2004-05-19 17:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-18 6:12 Randolph Chung
2004-05-19 17:05 ` Andrew Cagney [this message]
2004-05-20 4:40 ` 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=40AB93DC.5080300@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