Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFA/RFC/sparc32] SIGSEGV during fun call when no debugging 	info
Date: Tue, 29 Apr 2008 15:58:00 -0000	[thread overview]
Message-ID: <20080429080331.GH23852@calimero.vinschen.de> (raw)
In-Reply-To: <20080429034705.GG16574@adacore.com>

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,
though.


Thanks for catching,
Corinna

> 2008-04-29  Joel Brobecker  <brobecker@adacore.com>
> 
> 	* 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.


-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


  reply	other threads:[~2008-04-29  8:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-29  8:04 Joel Brobecker
2008-04-29 15:58 ` Corinna Vinschen [this message]
2008-04-29 15:58 ` Mark Kettenis
2008-04-29 18:21   ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080429080331.GH23852@calimero.vinschen.de \
    --to=vinschen@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox