* Expansing macro-definitions using Gdb
@ 2002-07-06 8:11 Pierre Habraken
2002-07-06 8:36 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Pierre Habraken @ 2002-07-06 8:11 UTC (permalink / raw)
To: gdb, gcc-help
The Gcc man page tells that using the option -g3 macro-definitions
present in the source program are included into the object file.
However, even when I use this option at compile time, Gdb 5.2 does not
recognize such macro-definitions.
Actually, using gcc 3.04, I compiled a C program including macro
definitions first with option -g and then with option -g3. Then, when
using cmp to compare both executables no difference is detected.
Is there a way to enable printing/displaying macro-definitions when
debugging a C program with Gdb ?
Pierre
--
________________________________________________________________________
Pierre HABRAKEN - mailto:Pierre.Habraken@imag.fr
Tél: 04 76 82 72 83 - Fax: 04 76 82 72 87
IMAG-LSR BP72 38402 SAINT MARTIN D'HERES Cedex
________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Expansing macro-definitions using Gdb
2002-07-06 8:11 Expansing macro-definitions using Gdb Pierre Habraken
@ 2002-07-06 8:36 ` Daniel Jacobowitz
2002-07-08 1:55 ` Pierre Habraken
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2002-07-06 8:36 UTC (permalink / raw)
To: Pierre Habraken; +Cc: gdb, gcc-help
On Sat, Jul 06, 2002 at 05:04:29PM +0200, Pierre Habraken wrote:
> The Gcc man page tells that using the option -g3 macro-definitions
> present in the source program are included into the object file.
> However, even when I use this option at compile time, Gdb 5.2 does not
> recognize such macro-definitions.
> Actually, using gcc 3.04, I compiled a C program including macro
> definitions first with option -g and then with option -g3. Then, when
> using cmp to compare both executables no difference is detected.
> Is there a way to enable printing/displaying macro-definitions when
> debugging a C program with Gdb ?
You need to use a CVS snapshot of GDB, and you need to use a very
current GCC; I believe 3.1 will do but you need to verify that
yourself.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Expansing macro-definitions using Gdb
2002-07-06 8:36 ` Daniel Jacobowitz
@ 2002-07-08 1:55 ` Pierre Habraken
0 siblings, 0 replies; 3+ messages in thread
From: Pierre Habraken @ 2002-07-08 1:55 UTC (permalink / raw)
To: Daniel Jacobowitz, Jim Blandy; +Cc: gdb, gcc-help
Daniel Jacobowitz wrote:
>
> You need to use a CVS snapshot of GDB, and you need to use a very
> current GCC; I believe 3.1 will do but you need to verify that
> yourself.
>
Jim Blandy wrote:
>
> Macro support was added after 5.2. To get preprocessor macro support,
> you'll need to get the latest GDB sources.
>
> For the compiler, you'll need to use Dwarf 2 debugging information.
> Try -gdwarf-2 -g3.
Thanks to you Daniel and Jim, I'll try using the latest Gdb snapshot
together with turning on Dwarf 2 debugging.
Best regards,
Pierre
--
________________________________________________________________________
Pierre HABRAKEN - mailto:Pierre.Habraken@imag.fr
Tél: 04 76 82 72 83 - Fax: 04 76 82 72 87
IMAG-LSR BP72 38402 SAINT MARTIN D'HERES Cedex
________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-07-08 8:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-06 8:11 Expansing macro-definitions using Gdb Pierre Habraken
2002-07-06 8:36 ` Daniel Jacobowitz
2002-07-08 1:55 ` Pierre Habraken
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).