Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Jason Merrill <jason@redhat.com>
Cc: Jim Blandy <jimb@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: function pointer stabs (was Re: RFA: MI tests: tolerate prototypes)
Date: Fri, 08 Feb 2002 07:44:00 -0000	[thread overview]
Message-ID: <20020208104402.A15801@nevyn.them.org> (raw)
In-Reply-To: <wvlzo2knmg5.fsf_-_@prospero.cambridge.redhat.com>

On Fri, Feb 08, 2002 at 01:16:10PM +0000, Jason Merrill wrote:
> >>>>> "Daniel" == Daniel Jacobowitz <drow@mvista.com> writes:
> 
> > Of course those have the same types.  But even if you differentiate
> > them, stabs only describes function pointers by their return type. 
> > Quite regrettable; it must be a GCC bug or at least limitation.  This
> > is the one that's actually related to the patch at the start of this
> > thread.  I think that the patch is fine, but that this should go on our
> > list of things to fix in GCC's debug output.  Jason, I don't suppose
> > you could look at it?  The 'right' thing to do would be to emit the Sun
> > extension for any prototyped function or properly declared (prototyped,
> > essentially) function pointer.
> 
> >On Tue, Feb 05, 2002 at 06:56:04PM -0500, Jim Blandy wrote:
> 
> >> Anyway, there's a standard syntax for prototyped function types
> >> defined in the STABS manual.  GDB even reads it.  If GCC would just
> >> emit it, things would be better.
> 
> Looking at stabsread.c:read_type:case 'f', I don't see any support for
> reading parameter types.

For function definitions, it's in define_symbol.  First it falls in to
process_function_types, then into process_prototype_types, where it
checks:
      /* Sun acc puts declared types of arguments here.  */
      if (*p == ';')
But the only thing we need that information for AFAIK is curiousity. 
We don't really need to know if the function was originally prototyped
if we know how it should be called.

For function TYPES, there's vestigial support for ignoring an os9k
prototype, but no support for the Sun prototypes.  I stand corrected.
Should we add this, or write it off?

> Also, the spec in stabs.texi seems to describe different extensions for
> expressing parameters to actual functions versus function pointers.

Hmm, yes, I had not seen that.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2002-02-08 15:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-03 13:04 RFA: MI tests: tolerate prototypes Jim Blandy
2002-02-03 15:01 ` Daniel Jacobowitz
2002-02-05 15:54   ` Jim Blandy
2002-02-05 17:21     ` Daniel Jacobowitz
2002-02-05 20:30       ` Jim Blandy
2002-02-05 21:48         ` Daniel Jacobowitz
2002-02-06 10:48           ` Jim Blandy
2002-02-06 16:14             ` Andrew Cagney
2002-02-06 16:24               ` Daniel Jacobowitz
2002-02-07 11:01               ` Jim Blandy
2002-02-07 12:27                 ` Daniel Jacobowitz
2002-02-08 10:03                   ` Jim Blandy
2002-02-08  5:16       ` function pointer stabs (was Re: RFA: MI tests: tolerate prototypes) Jason Merrill
2002-02-08  7:44         ` Daniel Jacobowitz [this message]
2002-02-08 11:37           ` Jim Blandy
2002-02-08 14:51           ` Jim Blandy
2002-02-09 12:15             ` Jim Blandy
2002-02-09 14:13               ` Daniel Jacobowitz
2002-02-03 16:29 ` RFA: MI tests: tolerate prototypes Andrew Cagney

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=20020208104402.A15801@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jason@redhat.com \
    --cc=jimb@redhat.com \
    /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