This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Change gdbarch_return_value to take function type instead of return value type


Hi Mark,

On Oct 13 00:15, Mark Kettenis wrote:
> The patch looks OK to me.
> 
>    There's also an important change necessary to sparc-tdep.c.  sparc32 is the
>    only platform which calls using_struct_return from push_dummy_code.  Since
>    push_dummy_code only has the return value type, it can neither call 
>    using_struct_return nor gdbarch_return_value.  I've created a new static
>    function called "sparc32_using_struct_return" which only evaluates whether
>    a struct return condition exists or not.  The function is now used in
>    sparc32_push_dummy_code as well as in sparc32_return_value.
> 
> I think that for HP-UX, push_dummy_call needs to get passed the
> function as a `struct value'.  That could clean up things a bit
> further.  However, that's not for you to worry about.  So please check
> this in.

I'm a bit confused.  The patch to sparc-tdep.c affects push_dummy_*code*,
not push_dumm_*call*.  The push_dummy_call definition has already been
changed to using `struct value *function' by Randlph Chung on 2004-06-06.

push_dummy_code still gets a `struct type *return_type' only.  So while
my patch handles the immediate consequences of the gdbarch_return_value
parameter change, it might be useful in the long run to change
push_dummy_code to get either the function value or the function type
as well.

Otherwise, thanks for approving the patch, I'll check it in in a few minutes.


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]