This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
You might try updating your GCC release. We found the same problem and it was fixed by upgrading GCC.
#include <stdio.h>
int main(int argc, char *argv[]){
int i,j;
int inside(void){ int k,l;
k = 1; l = k; printf("inside, k = %d, l = %d\n", k,l); return 0;
}
inside(); i = 0; j = 1; }
....
Breakpoint 1, inside.0 () at test.c:12 12 printf("inside, k = %d, l = %d\n", k,l); (gdb) p k No symbol "k" in current context.
I presume you have confirmed that k is actually there (since it is set only from a constant, it could be folded away even without fancy optimization).
Paul Hilfinger
-- =========================================================================== Cal Erickson MontaVista Software Inc. Linux Consultant 1237 E. Arques Ave. Phone (408) 328-0304 Sunnyvale CA 94085 Fax (408) 328-9204 web http://www.mvista.com ===========================================================================
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |