User forums > Help
CB on Win XP: issues
harrykar:
I am new here so greetings to all you :)
Yesterday i download Code::Blocks 13.12 rev9501 from sourceforge was a zip(good i hate exe ;) ). Till now i used Geany. I had some headaches (i discover C:B not debug single files that are not part of a project --and C:B seems not be alone here are other IDEs having that behaviour--)with CB resolved with some googling
Now i am faced with that problem:
I did a -test- project(simple console app) in a directory on desktop (C:\Documents and Setings\owner.... ) i tried to debug but debugger not stop on breakpoints and also goto cursor not worked; worked only step by step debug; after some googling (tnx to http://stackoverflow.com/questions/12106948/cant-use-breakpoints-in-codeblocks-even-when-debug-settings-are-correct-linu) i deduce the problem probably was the spaces in "Documents and Settings" directory(the only one in my case that have spaces in his name); obviously i can't rename system's directory "Documents and Settings" so i worked around moving project's directory in C:\project; spaces gone away and all automagically all worked as intended
Anyway that's a silly way to do. Someone know how that spaces can be masquerated trough C:B? exist another workaround out there to solve better?
NOTICE that the problem arises only in debugging not in building and running (operations did ever inside C:B)
Thanks in advance
PS: mingw installed ( gdb:7.6.1 ,gcc:4.8.1)
BlueHazzard:
why do you need spaces? they make things complicated and are easy to avoid...
i think that c::b can handle it, but mingw and gdb not, and so c::b can't do anything about it.
MortenMacFly:
C::B features a work-around (probably well hidden):
Goto Settings -> Compiler -> your MinGW compiler -> Tab "Other settings" -> Button "Advanced options" -> In the new window, in tab "Others" enable "Use full path for source files (GDB work-around)" and probably also "Use 8.3 notation". The latter might not work if you have auto-generated files or alike. However it shouldn't be needed for that purpose (I don't recall exactly).
harrykar:
--- Quote from: BlueHazzard on June 30, 2014, 11:25:09 pm ---why do you need spaces? they make things complicated and are easy to avoid...
--- End quote ---
I will not but MS sw engineers seems to like it >:(
--- Quote ---i think that c::b can handle it, but mingw and gdb not, and so c::b can't do anything about it.
--- End quote ---
Maybe you are right i did a search and here http://www.mingw.org/wiki/Getting_Started in the first lines is clearly reported :
MinGW Installation Notes
MinGW may have problems with paths containing spaces, and if not, usually other programs used with MinGW
will experience problems with such paths. Thus, we strongly recommend that you do not install MinGW in any
location with spaces in the path name reference. You should avoid installing into any directory or subdirectory
having names like "Program Files" or "My Documents", etc.
but wrapping the whole thing (file specification) inside double quotes i guess should work as we see from C:B build log window
--- Code: ----------------- Build: Debug in test (compiler: GNU GCC Compiler)---------------
mingw32-gcc.exe -Wall -g -Wall -pg -g -std=c11 -pedantic -c "C:\Documents and Settings\Owner\Επιφάνεια εργασίας\BOB\cources\tmp\test\main.c" -o obj\Debug\main.o
--- End code ---
NOTICE that the problem arises only in debugging not in building and running (ever inside C:B)
i.e. the compiler seems unaffected but the debugger seems sensible why that asymmetric behavior?
tnx for your reply
harrykar:
--- Quote from: MortenMacFly on July 01, 2014, 06:28:23 am ---
C::B features a work-around (probably well hidden):
Goto Settings -> Compiler -> your MinGW compiler -> Tab "Other settings" -> Button "Advanced options" -> In the new window, in tab "Others" enable "Use full path for source files (GDB work-around)"
--- End quote ---
I saw (C:B is full of settings and subtleties lol) and was just ticked(enabled) by default.
--- Quote ---and probably also "Use 8.3 notation". The latter might not work if you have auto-generated files or alike. However it shouldn't be needed for that purpose (I don't recall exactly).
--- End quote ---
that was unticked by default and as last resource i enable it but the output in C:B's debugger window is ever the same(bad :( ):
--- Code: ---Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Documents and Settings\Owner\Επιφάνεια εργασίας\BOB\cources\tmp\test\
Adding source dir: C:\Documents and Settings\Owner\Επιφάνεια εργασίας\BOB\cources\tmp\test\
Adding file: C:\Documents and Settings\Owner\Επιφάνεια εργασίας\BOB\cources\tmp\test\bin\Debug\test.exe
Changing directory to: C:/DOCUME~1/Owner/6808~1/BOB/cources/tmp/test/.
Set variable: PATH=.;c:\MinGW\bin;c:\MinGW;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;c:\MinGW\libexec\gcc\mingw32\4.8.1;C:\Program Files\Geany\bin
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/DOCUME~1/Owner/6808~1/BOB/cources/tmp/test/bin/Debug/test.exe
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.6.1
Child process PID: 2236
[Inferior 1 (process 2236) exited normally]
Debugger finished with status 0
--- End code ---
So now what?
PS: i copy/paste the same command we see above in CB's debugger window:
--- Code: ---Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/DOCUME~1/Owner/6808~1/BOB/cources/tmp/test/bin/Debug/test.exe
done
--- End code ---
in cmd.com (without any change) and in msys (here only i change "\" to "/" in the first part i.e.the path of gdb) and either worked well
output of msys:
--- Code: ---Owner@giannis-b791577 ~
$ C:/MinGW/bin/gdb.exe -nx -fullname -quiet -args C:/DOCUME~1/Owner/6808~1/BO
B/cources/tmp/test/bin/Debug/test.exe
Reading symbols from C:\DOCUME~1\Owner\6808~1\BOB\cources\tmp\test\bin\Debug\tes
t.exe...done.
(gdb) quit
Owner@giannis-b791577 ~
$
--- End code ---
So i deduce if C:B use Msys's convention C:B have to change "\" --> "/" in the path of gdb in the command above before start gdb or
wrap the command into " " i.e. "C:\MinGW\bin\gdb.exe" in either case work well.
Lets see
a)
--- Code: ---Owner@giannis-b791577 ~
$ C:\MinGW\bin\gdb.exe
sh: C:MinGWbingdb.exe: command not found
--- End code ---
not work
b) (see also output of msys above)
--- Code: ---Owner@giannis-b791577 ~
$ "C:\MinGW\bin\gdb.exe"
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 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 "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) quit
Owner@giannis-b791577 ~
$
--- End code ---
work as intended
I am wondering how cmd.com can handle flawlessly either combinations (with or without " " and with "/" or "\") :(
Tnx very much for your reply
Navigation
[0] Message Index
[#] Next page
Go to full version