#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello world!\n");
return 0;
}
PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Efl\bin;C:\Program Files\doxygen\bin;C:\Program Files\GtkSharp\2.12\bin;C:\PROGRA~1\PICC;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;C:\Dev-Cpp\bin
Command-line: C:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args bin/Debug/wordwrap.exe
Working dir : C:\prjs\wordwrap\
> 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
Function "__cxa_throw" not defined in loaded symbols.
>>>>>>cb_gdb:
> source C:\Program Files\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> directory C:/prjs/wordwrap/
>>>>>>cb_gdb:
> break "C:/prjs/wordwrap/main.c:6"
No source file named C:/prjs/wordwrap/main.c in loaded symbols.
Breakpoint 1 ("C:/prjs/wordwrap/main.c:6) pending.
>>>>>>cb_gdb:
> run
gdb: win32_init_thread_list
[New thread 2268.0x450]
Program exited normally.
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> quit
This:
No source file named C:/prjs/wordwrap/main.c in loaded symbols.
is the message you get if you try to debug an executable that doesn't contain debug info. Check in Project|Build Options that you have "Produce debugging symbols" checked, and that you are not trying to debug a release build.
Yes, project is with -g flag marked and with "debug" chosen as build target.-g = "Produce debugging symbols"
http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::BlocksChecked now, was already unticked...
There is another magic flag used for stripping the symbols from the executables (-s).
Have you checked this in you full build log?
See here how to enable it: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
-------------- Build: Debug in wordwrap ---------------
mingw32-gcc.exe -IC:/prjs/wordwrap -c main.c -o obj/Debug/main.o
mingw32-g++.exe -o bin/Debug/wordwrap.exe obj/Debug/main.o
Output size is 24,54 KB
Process terminated with status 0 (0 minutes, 7 seconds)
0 errors, 0 warnings
If you have set it, but you should verify that the policy of the target is correct.It is. Here's a screenshot: http://img515.imageshack.us/img515/4171/problemey.jpg
Anyone? :(Provide a sample project to reproduce.
Attached a project sample. A breakpoint on line 6 doesn't stop the program.Well I don't know how you managed to do this, but the executable under the Debug folder has no debug symbols in it. If I do a simple re-build of the project, the BP's work.
It's a fresh project [...]A fresh project doesn't have an executable. ??? Did you create the project in an existing folder?
Open C::B;Well if I do it exactly the way you described it works fine here. ???
[...]
The problem was my project path have an accent.This may cause the gdb problem, so avoid using space or other non-alphabetic chars in the path.
Neither "rebuild" nor "clean and build" works. Same result. :-\Please give us (post) the full debug log here.
Please give us (post) the full debug log here.It's in the first post:
here's the full GDB log:CodePATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Efl\bin;C:\Program Files\doxygen\bin;C:\Program Files\GtkSharp\2.12\bin;C:\PROGRA~1\PICC;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;C:\Dev-Cpp\bin
Command-line: C:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args bin/Debug/wordwrap.exe
Working dir : C:\prjs\wordwrap\
> 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
Function "__cxa_throw" not defined in loaded symbols.
>>>>>>cb_gdb:
> source C:\Program Files\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> directory C:/prjs/wordwrap/
>>>>>>cb_gdb:
> break "C:/prjs/wordwrap/main.c:6"
No source file named C:/prjs/wordwrap/main.c in loaded symbols.
Breakpoint 1 ("C:/prjs/wordwrap/main.c:6) pending.
>>>>>>cb_gdb:
> run
gdb: win32_init_thread_list
[New thread 2268.0x450]
Program exited normally.
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> quit
Can you show me the whole "full build log", see:Please give us (post) the full debug log here.It's in the first post:
Already posted too:Can you show me the whole "full build log", see:Please give us (post) the full debug log here.It's in the first post:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
Have you checked this in you full build log?
See here how to enable it: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
here's the full build log:Code-------------- Build: Debug in wordwrap ---------------
mingw32-gcc.exe -IC:/prjs/wordwrap -c main.c -o obj/Debug/main.o
mingw32-g++.exe -o bin/Debug/wordwrap.exe obj/Debug/main.o
Output size is 24,54 KB
Process terminated with status 0 (0 minutes, 7 seconds)
0 errors, 0 warnings
Should the flag appear here? Why is it not appearing?
mingw32-gcc.exe -IC:/prjs/wordwrap -c main.c -o obj/Debug/main.oThis log message is wrong, it should have -g option. So, you need to adjust the build options. Or, you can create a simple "hello world" project from the project wizard and test again.
Did you read the entire topic? All the things you asked are already posted (including this step) o.oQuotemingw32-gcc.exe -IC:/prjs/wordwrap -c main.c -o obj/Debug/main.oThis log message is wrong, it should have -g option. So, you need to adjust the build options. Or, you can create a simple "hello world" project from the project wizard and test again.