This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa/arm] Fix some structs.exp failures
- From: Mark Kettenis <kettenis at chello dot nl>
- To: rearnsha at arm dot com
- Cc: drow at false dot org, gdb-patches at sources dot redhat dot com, rearnsha at arm dot com
- Date: Wed, 3 Mar 2004 22:34:52 +0100 (CET)
- Subject: Re: [rfa/arm] Fix some structs.exp failures
- References: <200403031729.i23HTi021640@pc960.cambridge.arm.com>
Date: Wed, 03 Mar 2004 17:29:44 +0000
From: Richard Earnshaw <rearnsha@arm.com>
> structs.exp uses "typedef float tf". A structure type that would
> otherwise be returned by reference is returned by value, because
> GDB doesn't realize that it counts as a floating-point-like
> structure.
>
> OK?
>
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
>
> 2004-03-02 Daniel Jacobowitz <drow@mvista.com>
>
> * arm-tdep.c (arm_use_struct_convention): Look through typedefs.
I think this is OK, but it's hard to be sure: check_typedef is completely
undocumented -- no mention in the internals documentation, and not even a
comment in gdbtypes.[ch].
There is one comment about check_typedef()/CHECK_TYPEDEF() in
gdbtypes.h. Anyway, Daniels fix is OK. Before you look at a type the
way arm_use_struct_convention does, you should have called
check_typedef(), otherwise you'll look at the typedef itself, and not
its underlying type.
Mark