User forums > General (but related to Code::Blocks)
Can't debug in CB
Shane:
I am trying to debug my app in CB. I have a custom make, but and build just fine, and I can debug in ddd, or kdbg, but I would like to step through my code in CB. All it does is starts the debugger, or at least it looks like it, and doesn't hit any or my break points. Here is the output from the debugger tab.
Adding source dir: /home/user/
Changing directory to: ../Build
Adding file: Test
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb Red Hat Linux (6.5-15.fc6rh)
No symbol table is loaded. Use the "file" command.
Continuing...
Use the "file" or "exec-file" command.
No symbol table is loaded. Use the "file" command.
The program is not being run.
Debugger finished with status 0
I can click next line, step out, start, whatever and all it does is stop. The code does not execute, I know because it is suppose to create a few files. Any ideas?
Thanks.
mariocup:
Hi Shane,
--- Code: ---No symbol table is loaded.
--- End code ---
Are you sure that your application is compiled with debug information. If you application is compiled with debug information the path of the sources is stored in the debug info (relative of absolute). If you use relative path the working directory of the gdb must be correct. You can also use the gdb command line option --cd=<path> to specify the working directory.
Bye,
Mario
Joerg:
--- Quote ---You can also use the gdb command line option --cd=<path> to specify the working directory.
--- End quote ---
Where can I set command line options for gdb in C::B ?
Jenna:
--- Quote from: Shane on December 03, 2008, 08:20:36 pm ---The code does not execute, I know because it is suppose to create a few files. Any ideas?
--- End quote ---
You can switch on the debuggers debug-log and see waht is really sent to gdb: Check "Settings -> Compiler and Debugger... -> Debugger settings -> Display debugger's debug log"
Shane:
Yeah looks like I am not pointing it to the correct directory with my debugging symbols. Where do I place the --cd<path> option at inside CB?
Thanks.
Navigation
[0] Message Index
[#] Next page
Go to full version