This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: How can I get the C function prototype from a SO(link by cc) onsolaris using gdb?
- From: Don Howard <dhoward at redhat dot com>
- To: "NewHaka at hotmail" <newhaka at hotmail dot com>
- Cc: <gdb at sources dot redhat dot com>
- Date: Fri, 21 Jun 2002 10:08:06 -0700 (PDT)
- Subject: Re: How can I get the C function prototype from a SO(link by cc) onsolaris using gdb?
On Fri, 21 Jun 2002, Don Howard wrote:
> On Fri, 21 Jun 2002, NewHaka@hotmail wrote:
>
> > hi,all
> >
> > (gdb 5.0 sparc solaris 8)
> >
> > I have a library link by sun cc,this library is complied and link
> > with flag -g.
> >
> > I try to find out the prototype of functions in this library,gdb output:
> > (gdb) p GetDatVersion
> > $1 = {<text variable, no debug info>} 0xff273374 <GetDatVersion>
> > (gdb) p GetDatVersion
> > type = int ()
> >
> > Does the library must complied by gcc?
> >
>
> 'p <function>' or 'print <function>' tells you only the returned type.
> Try 'ptype <function>'.
No. I'm quite wrong here. Both commands should give you full prototype
info when applied to a function.
Sorry for the confusion.
--
dhoward@redhat.com
gdb engineering