From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23666 invoked by alias); 5 May 2003 17:34: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 23643 invoked from network); 5 May 2003 17:33:59 -0000 Received: from unknown (HELO zenia.red-bean.com) (12.222.151.100) by sources.redhat.com with SMTP; 5 May 2003 17:33:59 -0000 Received: from zenia.red-bean.com (localhost.localdomain [127.0.0.1]) by zenia.red-bean.com (8.12.5/8.12.5) with ESMTP id h45Hd4Fq004503; Mon, 5 May 2003 12:39:04 -0500 Received: (from jimb@localhost) by zenia.red-bean.com (8.12.5/8.12.5/Submit) id h45Hctx2004499; Mon, 5 May 2003 12:38:55 -0500 To: "Lev Assinovsky" Cc: Subject: Re: DWARF problem - newbie question References: <3F6F4712B759A34ABD453A8B39C10D6260DF1E@bagman.edm.com> From: Jim Blandy Date: Mon, 05 May 2003 17:34:00 -0000 In-Reply-To: <3F6F4712B759A34ABD453A8B39C10D6260DF1E@bagman.edm.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.95 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-05/txt/msg00055.txt.bz2 Okay --- so, did you compile with -g3? Does readelf -S show a ".debug_macinfo" section? "Lev Assinovsky" writes: > Nop, I do see .debug_info but don't see .stab > gdb command "info macro M" > still complains. > My platform is Solaris 8 Intel. > > Thanks, > ---- > Lev Assinovsky > Aelita Software Corporation > O&S Core Division, Programmer > ICQ# 165072909 > > > > -----Original Message----- > > From: Jim Blandy [mailto:jimb@redhat.com] > > Sent: Friday, May 02, 2003 3:30 AM > > To: Lev Assinovsky > > Cc: gdb@sources.redhat.com > > Subject: Re: DWARF problem - newbie question > > > > > > > > "Lev Assinovsky" writes: > > > > > Hi! > > > I use gcc 3.2 and gdb+dejagnu-20030228. > > > Compile my code with -ggdb option which promises > > > the most expressive extra debug info. > > > But when in gdb I request "" > > > I get: > > > GDB has no preprocessor macro information for that code, though > > > I do have macro M defined in my source. > > > > > > What am I doing wrong? > > > > At the moment, to get macro information, you need to: > > - use the Dwarf 2 debugging format, and > > - pass GCC the -g3 flag, to ask it to include macro information. > > > > You don't say which platform you're using. On i686-pc-linux-gnu, GCC > > 3.2 defaults to using Dwarf 2. You can check for sure by running > > 'readelf -S foo.o' on one of your .o files, compiled with plain -g: > > - If it has a section named '.debug_info', then that's Dwarf 2. > > - If it has a section named '.stab', then that's STABS. > > > > If Dwarf 2 isn't the default, then you can request it with -gdwarf-2. > > So altogether, you'd need to say '-gdwarf-2 -g3'. > > > > I don't really know how -ggdb decides which format is 'the most > > expressive'. I think it's better to spell out what you want than to > > use that flag. > >