Still cannot print variable
Joakim Hove
hove@ift.uib.no
Fri Apr 15 09:27:00 GMT 2005
JS <fedevaps@yahoo.dk> writes:
> I run "gdb test" followed by "print d" and then I get this error:
You must explicitly start test with the run command from gdb:
bash% gdb test
<...>
(gdb) run
However, that is also not enough because the current program will
immediately complete, and hence when you get back to the (gdb) prompt
the context of the (no longer) running program is void. Hence you must
set a breakpoint to halt the execution:
bash% gdb test
<...>
(gdb) break test.c:5 # Break at line 5 in file test.c
(gdb) run
(gdb) print d
HTH - Joakim
--
Joakim Hove
hove AT ift uib no /
Tlf: +47 (55 5)8 27 90 / Stabburveien 18
Fax: +47 (55 5)8 94 40 / N-5231 Paradis
http://www.ift.uib.no/~hove/ / 55 91 28 18 / 92 68 57 04
More information about the Gdb
mailing list