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) on solaris using gdb?
- From: Joel Brobecker <brobecker at gnat dot com>
- To: "NewHaka at hotmail" <newhaka at hotmail dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Fri, 21 Jun 2002 08:37:53 -0700
- Subject: Re: How can I get the C function prototype from a SO(link by cc) on solaris using gdb?
- References: <DAV70oHyvHsCaB2YGtM0001172e@hotmail.com>
> (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?
I don't have a Sun CC license handy to verify this, but I remember that
Sun decided to put the debugging informatin outside of the object files.
IIRC, the magical switch is -xs (try compiling with '-g -xs'), otherwise
it should be in the cc manpage.
--
Joel