This is the mail archive of the
mailing list for the GDB project.
Re: value to function?
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: Jim Blandy <jimb at redhat dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 30 Sep 2003 11:04:44 -0400
- Subject: Re: value to function?
- References: <3F76FB5B.firstname.lastname@example.org> <email@example.com>
Andrew Cagney <firstname.lastname@example.org> writes:
If the proposal to pass a function value to push_dummy_call is going
to fly there's going to need to be a method that converts an arbitrary
value into a function/method value.
A new gdbarch method to be called from where, specifically? This area
is a mess (just try describing the behavior of find_function_addr...),
so I'm not sure what you mean.
Now I think I'm missing something. What new architecture method? What
Kind of like find_function_addr() and the oposite of value_coerce_function.
pre (I guess that value isn't void or NULL);
struct value *foo (struct value *);
post (VALUE_TYPE (foo (value)) == TYPE_CODE_FUNC
|| VALUE_TYPE (foo (value)) == TYPE_CODE_METHOD));
it would be used in relative proximity to push_dummy_call and
return_value (ex, replace find_function_addr).