This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
How can i show the macro infor
- From: "江河" <empriser at gmail dot com>
- To: news.gnu.gdb <gdb at sourceware dot org>
- Date: Fri, 21 Sep 2007 17:30:00 +0800
- Subject: How can i show the macro infor
I can't show the macro info by these operation.
gcc --version
gcc (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)
gdb --version
GNU gdb Red Hat Linux (6.3.0.0-1.96rh)
>cat x.c
#include <stdio.h>
#define NEX 1
int main()
{
printf( "%d\n", N );
return 0;
}
>gcc -gdwarf-2 -g3 x.c -o x
(gdb) l
1 #include <stdio.h>
2 #define NEX 1
3 int main()
4 {
5 printf( "%d\n", NEX );
6 return 0;
7 }
(gdb) info macro NEX
The symbol `NEX' has no definition as a C/C++ preprocessor macro
at x.c:8
included at /usr/include/stdio.h:749
--
桂華秋皎潔