This is the mail archive of the
mailing list for the GDB project.
Re: [RFA/RFC/sparc32] SIGSEGV during fun call when no debugging info
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 29 Apr 2008 10:03:31 +0200
- Subject: Re: [RFA/RFC/sparc32] SIGSEGV during fun call when no debugging info
- References: <20080429034705.GG16574@adacore.com>
- Reply-to: gdb-patches at sourceware dot org
On Apr 28 20:47, Joel Brobecker wrote:
> I think the best way to go in this case is option 2, which is to accept
> NULL as the function type, and document that fact. This is what my
> patch does.
> I checked Corinna's patch (which introduced this extra parameter),
> and there are only 2 instances that really use that new parameter,
> both in sh-tdep.c: sh_return_value_nofpu and sh_return_value_fpu.
> They already both handle the case when the function type is NULL
> by defaulting to the user-setting "set sh calling-convention".
The idea is of course that not only sh uses this at one point. In
theory, other targets are using different calling conventions in
parallel as well, like x86 on Windows (cdecl, fastcall, stdcall, etc.),
but the Dwarf-2 calling convention isn't used for that so far, mostly
because Dwarf-2 isn't used by default.
In my first approach I set the func_type parameter simply to NULL in
sparc32_push_dummy_code, too, but for some reason I thought that's just
my laziness :} Allowing NULL for the func_type seems right to me,
Thanks for catching,
> 2008-04-29 Joel Brobecker <firstname.lastname@example.org>
> * gdbarch.sh: Document the return_value method. Explain that
> the FUNCTYPE parameter might be NULL.
> * gdbarch.h: Regenerated.
> * sparc-tdep.c (sparc32_push_dummy_code): Do not pass the function
> type when calling using_struct_return, as this is unnecessary
> on this target.
Cygwin Project Co-Leader