From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28614 invoked by alias); 21 Jun 2002 15:38:00 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 28584 invoked from network); 21 Jun 2002 15:37:53 -0000 Received: from unknown (HELO takamaka.int.act-europe.fr) (142.179.108.207) by sources.redhat.com with SMTP; 21 Jun 2002 15:37:53 -0000 Received: by takamaka.int.act-europe.fr (Postfix, from userid 507) id 54D6989FBA; Fri, 21 Jun 2002 08:37:53 -0700 (PDT) Date: Fri, 21 Jun 2002 08:38:00 -0000 From: Joel Brobecker To: "NewHaka@hotmail" Cc: gdb@sources.redhat.com Subject: Re: How can I get the C function prototype from a SO(link by cc) on solaris using gdb? Message-ID: <20020621083753.A29523@gnat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from newhaka@hotmail.com on Fri, Jun 21, 2002 at 05:17:34PM +0800 X-SW-Source: 2002-06/txt/msg00164.txt.bz2 > (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 = {} 0xff273374 > (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