Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Jim Blandy <jimb@zwingli.cygnus.com>
Cc: Jason Merrill <jason@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: function pointer stabs (was Re: RFA: MI tests: tolerate prototypes)
Date: Sat, 09 Feb 2002 14:13:00 -0000	[thread overview]
Message-ID: <20020209171301.A28585@nevyn.them.org> (raw)
In-Reply-To: <npwuxmbebr.fsf@zwingli.cygnus.com>

On Sat, Feb 09, 2002 at 03:16:56PM -0500, Jim Blandy wrote:
> 
> All right --- I've committed a change to allow GDB to read Sun-style
> prototyped function types, and I've posted tests for it, which
> hopefully will be approved soon.  So it's you GCC guys' turn to teach
> GCC to emit those, now that you have a GDB you can test against.
> 
> The format is documented in:
> http://www.cs.ucsb.edu/facilities/software/cc-info/stabs.ps
> 
> Also, the test case includes examples of the sort of STABS GDB expects
> to see:
> 
> /**** Pointers to functions *******/
> 
> typedef int (*func_type) (int (*) (int, float), float);
> double (*old_fptr) ();
> double (*new_fptr) (void);
> int (*fptr) (int, float);
> int *(*fptr2) (int (*) (int, float), float);
> int (*xptr) (int (*) (), int (*) (void), int);
> int (*(*ffptr) (char)) (short);
> int (*(*(*fffptr) (char)) (short)) (long);
> 
> /* Here are the sort of stabs we expect to see for the above:
> 
>    .stabs "func_type:t(0,100)=*(0,101)=g(0,1)(0,102)=*(0,103)=g(0,1)(0,1)(0,14)#(0,14)#",128,0,234,0
>    .stabs "old_fptr:G(0,110)=*(0,111)=f(0,15)",32,0,231,0
>    .stabs "new_fptr:G(0,120)=*(0,121)=g(0,15)(0,122)=(0,122)#",32,0,232,0
>    .stabs "fptr:G(0,130)=*(0,103)#",32,0,233,0
>    .stabs "fptr2:G(0,140)=*(0,141)=g(0,142)=*(0,1)(0,102)(0,14)#",32,0,235,0
>    .stabs "xptr:G(0,150)=*(0,151)=g(0,1)(0,152)=*(0,153)=f(0,1)(0,154)=*(0,155)=g(0,1)(0,122)#(0,1)#",32,0,236,0
>    .stabs "ffptr:G(0,160)=*(0,161)=g(0,162)=*(0,163)=g(0,1)(0,8)#(0,2)#",32,0,237,0\
>    .stabs "fffptr:G(0,170)=*(0,171)=g(0,172)=*(0,173)=g(0,174)=*(0,175)=g(0,1)(0,3)#(0,8)#(0,2)#",32,0,237,0
> 
>    Most of these use Sun's extension for prototyped function types ---
>    the 'g' type descriptor.  As of around 9 Feb 2002, GCC didn't emit
>    those, but GDB can read them, so the related tests in ptype.exp
>    will all xfail.  */

Have you ever seen these generated?  I'm fairly certain about two
things:
  - I couldn't get Sun Workshop 6 to generate 'g' stabs
  - I'm slightly concerned about the types not separated by anything. 
Some compilers use non-tuple types... read_type should behave OK,
though.


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


  reply	other threads:[~2002-02-09 22:13 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
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 [this message]
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=20020209171301.A28585@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jason@redhat.com \
    --cc=jimb@zwingli.cygnus.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