On Wednesday 19 August 2009 14:09:30 Bogdan Cristea wrote:
I use gdb 6.8.50.20081120-cvs in openSUSE 11.1 x86 in order to debug a C++ program. When entering into a member function (of some C++ class) I cannot print a local variable with the following syntax:
(gdb) p n No symbol "n" in current context.
using
(gdb) p 'n' $1 = 110 'n'
110 is the ASCII value of the character 'n'. You are not printing a variable here, just a character
seems to work. However, debugging in Eclipse Galileo CDT local variables are no longer displayed (when pointing the mouse to one variable in the source code). Thus, it seems that Eclipse is not aware of the new syntax for print function used in gdb.
Is there a reason for this behavior of gdb ?
Most likely, the variables you are looking at have been optimised out by gcc, so that they really aren't in the current context Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org