public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: "Lev Assinovsky" <LAssinovsky@algorithm.aelita.com>
Cc: <gdb@sources.redhat.com>
Subject: Re: DWARF problem - newbie question
Date: Mon, 05 May 2003 17:34:00 -0000	[thread overview]
Message-ID: <vt2vfwpb8eo.fsf@zenia.red-bean.com> (raw)
In-Reply-To: <3F6F4712B759A34ABD453A8B39C10D6260DF1E@bagman.edm.com>


Okay --- so, did you compile with -g3?  Does readelf -S show a
".debug_macinfo" section?

"Lev Assinovsky" <LAssinovsky@algorithm.aelita.com> 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" <LAssinovsky@algorithm.aelita.com> 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.
> > 

  reply	other threads:[~2003-05-05 17:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-02 10:11 Lev Assinovsky
2003-05-05 17:34 ` Jim Blandy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-06  8:15 Lev Assinovsky
2003-05-05  9:57 Lev Assinovsky
2003-05-20 22:07 ` Jim Blandy
2003-04-30 10:35 Lev Assinovsky
2003-05-01 23:25 ` Jim Blandy

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=vt2vfwpb8eo.fsf@zenia.red-bean.com \
    --to=jimb@redhat.com \
    --cc=LAssinovsky@algorithm.aelita.com \
    --cc=gdb@sources.redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).