Author Topic: Debugging by "Attach to process" show "no symble table is loaded"  (Read 8892 times)

omomo

  • Guest
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
Code
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

Code
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:
Code
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:



omomo

  • Guest
Re: Debugging by "Attach to process" show "no symble table is loaded"
« Reply #1 on: April 12, 2009, 06:00:48 pm »
Does anyone once encounter this problem? C::B is really great IDE, but now, I have to use C::B to write code while use KDevelop to debug. I search in google, and read mast post, but didn't find answer. so i decided to ask question myself, above post i paste detailed build log and debugger log.

Offline Static

  • Single posting newcomer
  • *
  • Posts: 6
Re: Debugging by "Attach to process" show "no symble table is loaded"
« Reply #2 on: April 24, 2009, 07:39:52 am »
The same problem :(
I changed the project's paths to absolute ones. But the problem remains. Is there any ways to fix such behaviour?