public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* RE: DWARF problem - newbie question
@ 2003-05-06  8:15 Lev Assinovsky
  0 siblings, 0 replies; 7+ messages in thread
From: Lev Assinovsky @ 2003-05-06  8:15 UTC (permalink / raw)
  To: Jim Blandy; +Cc: gdb

Seems, you didn't read my latest post.
The matter is I made a mistake
compiling task.
It was -g -g3 -gdwarf-2.
With -g3 -gdwarf-2 
"info macro M" works.
What else can I have with dwarf-2.
Can I step in macro and see it's content on the screen?

----
Lev Assinovsky
Aelita Software Corporation
O&S Core Division, Programmer
ICQ# 165072909


> -----Original Message-----
> From: Jim Blandy [mailto:jimb@redhat.com]
> Sent: Monday, May 05, 2003 9:39 PM
> To: Lev Assinovsky
> Cc: gdb@sources.redhat.com
> Subject: Re: DWARF problem - newbie question
> 
> 
> 
> 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.
> > > 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: DWARF problem - newbie question
  2003-05-05  9:57 Lev Assinovsky
@ 2003-05-20 22:07 ` Jim Blandy
  0 siblings, 0 replies; 7+ messages in thread
From: Jim Blandy @ 2003-05-20 22:07 UTC (permalink / raw)
  To: Lev Assinovsky; +Cc: gdb


"Lev Assinovsky" <LAssinovsky@algorithm.aelita.com> writes:
> Sorry, I made a mistake
> compiling task.
> It was -g -g3 -gdwarf-2.
> With -g3 -gdwarf-2 
> "info macro M" works.
> What else can I have with dwarf-2.
> Can I step in macro and see it's content on the screen?

There's a chapter in the GDB manual on macros that describes things.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: DWARF problem - newbie question
  2003-05-02 10:11 Lev Assinovsky
@ 2003-05-05 17:34 ` Jim Blandy
  0 siblings, 0 replies; 7+ messages in thread
From: Jim Blandy @ 2003-05-05 17:34 UTC (permalink / raw)
  To: Lev Assinovsky; +Cc: gdb


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.
> > 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: DWARF problem - newbie question
@ 2003-05-05  9:57 Lev Assinovsky
  2003-05-20 22:07 ` Jim Blandy
  0 siblings, 1 reply; 7+ messages in thread
From: Lev Assinovsky @ 2003-05-05  9:57 UTC (permalink / raw)
  To: Lev Assinovsky, Jim Blandy; +Cc: gdb

Sorry, I made a mistake
compiling task.
It was -g -g3 -gdwarf-2.
With -g3 -gdwarf-2 
"info macro M" works.
What else can I have with dwarf-2.
Can I step in macro and see it's content on the screen?

Thanks, 
----
Lev Assinovsky
Aelita Software Corporation
O&S Core Division, Programmer
ICQ# 165072909


> -----Original Message-----
> From: Lev Assinovsky 
> Sent: Friday, May 02, 2003 2:10 PM
> To: Jim Blandy
> Cc: gdb@sources.redhat.com
> Subject: RE: DWARF problem - newbie question
> 
> 
> 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.
> > 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: DWARF problem - newbie question
@ 2003-05-02 10:11 Lev Assinovsky
  2003-05-05 17:34 ` Jim Blandy
  0 siblings, 1 reply; 7+ messages in thread
From: Lev Assinovsky @ 2003-05-02 10:11 UTC (permalink / raw)
  To: Jim Blandy; +Cc: gdb

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.
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: DWARF problem - newbie question
  2003-04-30 10:35 Lev Assinovsky
@ 2003-05-01 23:25 ` Jim Blandy
  0 siblings, 0 replies; 7+ messages in thread
From: Jim Blandy @ 2003-05-01 23:25 UTC (permalink / raw)
  To: Lev Assinovsky; +Cc: gdb


"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 "info macro M"
> 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* DWARF problem - newbie question
@ 2003-04-30 10:35 Lev Assinovsky
  2003-05-01 23:25 ` Jim Blandy
  0 siblings, 1 reply; 7+ messages in thread
From: Lev Assinovsky @ 2003-04-30 10:35 UTC (permalink / raw)
  To: gdb

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 "info macro M"
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?

----
Lev Assinovsky
Aelita Software Corporation
O&S Core Division, Programmer
ICQ# 165072909


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-05-20 22:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-06  8:15 DWARF problem - newbie question Lev Assinovsky
  -- strict thread matches above, loose matches on Subject: below --
2003-05-05  9:57 Lev Assinovsky
2003-05-20 22:07 ` Jim Blandy
2003-05-02 10:11 Lev Assinovsky
2003-05-05 17:34 ` Jim Blandy
2003-04-30 10:35 Lev Assinovsky
2003-05-01 23:25 ` Jim Blandy

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).