Expansing macro-definitions using Gdb

Daniel Jacobowitz drow@mvista.com
Sat Jul 6 08:36:00 GMT 2002


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



More information about the Gcc-help mailing list