I am new to code::blocks, I hope to get rid of kdevelop because its break point always jump around... I get nightly build SVN 5489 installed on my debian. i found debugging by building and run works well. but when I attached to a process and set break points, debugger doesn't work, always told me "No symbol table is loaded. Use the "file" command."
then I switch to Windows, try to narrow down what's issue, i got 8.02 installed on windows, and write a simple program. Still, i can get debugger works in "build and run", but get same error when i first run the program and later attach to it.
Does anyone has clue about this issue? below is my build log when I click "build and run" and my debugger works well to set break point
mingw32-g++.exe -Wall -fexceptions -g -g -IE:\App\helloworld -IE:\App\helloworld\obj\Debug -c E:\App\helloworld\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -o E:\App\helloworld\bin\Debug\helloworld.exe obj\Debug\main.o
Output size is 588.26 KB
PATH=.;D:\Program Files\CodeBlocks\MinGW\bin;E:\App\helloworld;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\WiFi\bin\;d:\Program Files\StormII\Codec;d:\Program Files\StormII
Command-line: D:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args E:/App/helloworld/bin/Debug/helloworld.exe
Working dir : E:\App\helloworld\
> set prompt >>>>>>cb_gdb:
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb 6.7.50.20071127
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set debugevents on
>>>>>>cb_gdb:
> set new-console on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> cd E:/App/helloworld
>>>>>>cb_gdb:
> directory E:/App/helloworld/
>>>>>>cb_gdb:
> set args --enableloop
>>>>>>cb_gdb:
> break "E:/App/helloworld/main.cpp:30"
Breakpoint 1 at 0x40153c: file E:/App/helloworld/main.cpp, line 30.
>>>>>>cb_gdb:
> run
gdb: win32_init_thread_list
Breakpoint 1, main (argc=2, argv=0x3d2510) at E:/App/helloworld/main.cpp:30
E:/App/helloworld/main.cpp:30:553:beg:0x40153c
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> cont
Program exited normally.
>>>>>>cb_gdb:
> quit
while when i start this program in console first and attach to it later by PID, symble table is not loaded...debugger log is as below:
Command-line: D:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet -pid=5512
Working dir : E:\App\helloworld\
> set prompt >>>>>>cb_gdb:
Attaching to process 5512
[Switching to thread 5512.0x80]
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb 6.7.50.20071127
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set debugevents on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> break "E:/App/helloworld/main.cpp:30"
No symbol table is loaded. Use the "file" command.
>>>>>>cb_gdb: