This is the mail archive of the 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/RFC/sparc32] SIGSEGV during fun call when no debugging info

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  <>
> 	* 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.

Corinna Vinschen
Cygwin Project Co-Leader
Red Hat

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