User forums > Using Code::Blocks
Running debugger on custom Makefile based project
oBFusCATed:
--- Quote from: Wyrm on November 10, 2010, 05:40:27 am ---It is also not clear why the debugger doesn't work when "Native" type is activated. At least it would be great if the debugger warned about an invalid application type instead of just ignoring me.
--- End quote ---
Should be fixed in the debuggers branch...
Answers to the second post:
4. You can run it from the command line, but X11 is a required
5. No one has done it reliably, you can look at cbMakefileGen plugin
6. It does, grab the tab and drag it to the side
8. DoxyBlocks and Valgrind are plugins and the could be disabled, Plugins -> Manage or during compile time.
Wyrm:
--- Quote from: oBFusCATed on November 10, 2010, 09:17:06 am ---
--- Quote from: Wyrm on November 10, 2010, 05:40:27 am ---It is also not clear why the debugger doesn't work when "Native" type is activated. At least it would be great if the debugger warned about an invalid application type instead of just ignoring me.
--- End quote ---
Should be fixed in the debuggers branch...
Answers to the second post:
4. You can run it from the command line, but X11 is a required
5. No one has done it reliably, you can look at cbMakefileGen plugin
6. It does, grab the tab and drag it to the side
8. DoxyBlocks and Valgrind are plugins and the could be disabled, Plugins -> Manage or during compile time.
--- End quote ---
I have compiled CB from the debuggers branch. Gdb runs alright indeed even when the target type is set to "Native". Does the CB development team have any plans to merge the debuggers branch with the main one?
Regarding the other items:
(6) I was grabbing the file from the Project tab on the left instead of pulling the tab itself. Now I am able to put multiple files side by side as I wanted.
(7) The bookmarks are not that important now. I noticed that the newer version of CB has "Find declaration of" and "Find implementation of" options when you right click on a function or a variable name. That's good enough for me.
(8 ) I have turned off the plugins that I don't need. It turned out to be that easy!
Thanks for your help!
Thor_89:
Hello
I have similar problem with running debugger, while I'm using my Makefile. Project is build successfully and I can run it. But when i try to debug, debugger ignore my breakpoints and finish (status 0).
I have unchecked "Auto-generate ..." boxes (like you said before) and set Execution working dir to "." .
There is log from "Debugger (debug)" window:
--- Code: ---Command-line: C:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args bin/Debug/pokus.exe
Working dir : C:\Users\Thor\Desktop\pokus\
> set prompt >>>>>>cb_gdb:
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb 6.8
Copyright (C) 2008 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:
> catch throw
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source C:\Program Files (x86)\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> directory C:/Users/Thor/Desktop/pokus/
>>>>>>cb_gdb:
> break "C:/Users/Thor/Desktop/pokus/main.cpp:13"
No source file named C:/Users/Thor/Desktop/pokus/main.cpp in loaded symbols.
Breakpoint 2 ("C:/Users/Thor/Desktop/pokus/main.cpp:13) pending.
>>>>>>cb_gdb:
> break "C:/Users/Thor/Desktop/pokus/main.cpp:12"
No source file named C:/Users/Thor/Desktop/pokus/main.cpp in loaded symbols.
Breakpoint 3 ("C:/Users/Thor/Desktop/pokus/main.cpp:12) pending.
>>>>>>cb_gdb:
> break "C:/Users/Thor/Desktop/pokus/main.cpp:11"
No source file named C:/Users/Thor/Desktop/pokus/main.cpp in loaded symbols.
Breakpoint 4 ("C:/Users/Thor/Desktop/pokus/main.cpp:11) pending.
>>>>>>cb_gdb:
> break "C:/Users/Thor/Desktop/pokus/main.cpp:10"
No source file named C:/Users/Thor/Desktop/pokus/main.cpp in loaded symbols.
Breakpoint 5 ("C:/Users/Thor/Desktop/pokus/main.cpp:10) pending.
>>>>>>cb_gdb:
> break "C:/Users/Thor/Desktop/pokus/main.cpp:8"
No source file named C:/Users/Thor/Desktop/pokus/main.cpp in loaded symbols.
Breakpoint 6 ("C:/Users/Thor/Desktop/pokus/main.cpp:8) pending.
>>>>>>cb_gdb:
> break "C:/Users/Thor/Desktop/pokus/main.cpp:9"
No source file named C:/Users/Thor/Desktop/pokus/main.cpp in loaded symbols.
Breakpoint 7 ("C:/Users/Thor/Desktop/pokus/main.cpp:9) pending.
>>>>>>cb_gdb:
> break "C:/Users/Thor/Desktop/pokus/main.cpp:7"
No source file named C:/Users/Thor/Desktop/pokus/main.cpp in loaded symbols.
Breakpoint 8 ("C:/Users/Thor/Desktop/pokus/main.cpp:7) pending.
>>>>>>cb_gdb:
> break "C:/Users/Thor/Desktop/pokus/main.cpp:6"
No source file named C:/Users/Thor/Desktop/pokus/main.cpp in loaded symbols.
Breakpoint 9 ("C:/Users/Thor/Desktop/pokus/main.cpp:6) pending.
>>>>>>cb_gdb:
> run
gdb: win32_init_thread_list
[New thread 4904.0x1040]
Error: dll starting at 0x77200000 not found.
Error: dll starting at 0x753c0000 not found.
Error: dll starting at 0x77200000 not found.
Error: dll starting at 0x777e0000 not found.
Program exited normally.
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> quit
--- End code ---
It's a simple "Hello World!" project named "pokus" with one .cpp file (main.cpp).
Sorry for my english, I hope that you will follow.
Jenna:
Are you sure the Makefile produces debugging symbols (option -g set) and does not strip the binary ?
Thor_89:
Oh man!
Thanks a lot! ... -g solved my problem.
Stupid mistake of mine .. I suppose. :-[
Navigation
[0] Message Index
[*] Previous page
Go to full version