User forums > Help
Starting debugger: failed
kamos:
Hello.
I'm having some trouble setting up the debugger. I know this kind of problem comes up a lot here, but I'm really lost and I couldn't find a previous topic / wiki page that helped me. This is what I have done:
I've downloaded Code::Blocks rev 4771 and installed MinGW with the Automated MinGW Installer (5.1.3). I have also downloaded GDB 6.6 and copied the package's contents to "c:\MinGW\". The path is set properly and compiling/building works from inside Code::Blocks. The "Toolchain Executables" at "Settings -> Compiler and Debugger Options" are pointing to the correct apps. The build target has the -g (Produce Debugging Symbols) flag set.
This is the output from building:
--- Code: ----------------- Build: Debug in maisum ---------------
g++.exe -Wall -fexceptions -g -g -c D:\teste\maisum\maisum\main.cpp -o obj\Debug\main.o
g++.exe -o bin\Debug\maisum.exe obj\Debug\main.o
Output size is 573.67 KB
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings
--- End code ---
And this is what I get in the Debugger textarea when I run the app through F8:
--- Code: ---Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: D:\teste\maisum\maisum\
Adding source dir: D:\teste\maisum\maisum\
Adding file: bin\Debug\maisum.exe
Starting debugger:
failed
--- End code ---
There is also another tab called "Debugger (Debug)" by the first Debugger tab. It has the following output:
--- Code: ---PATH=.;C:\Arquivos de programas\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos de programas\QuickTime\QTSystem\;c:\Mingw\bin\
Command-line: c:\Mingw\bin -nx -fullname -quiet -args bin/Debug/maisum.exe
Working dir : D:\teste\maisum\maisum\
--- End code ---
The only "strange" thing I have seen is the command-line above: "c:\Mingw\bin -nx -fullname -quiet -args bin/Debug/maisum.exe"
Shouldn't GDB be there somewhere? (i.e. "c:\Mingw\bin\gdb -nx -fullname -quiet -args bin/Debug/maisum.exe")
If so, how do I fix it?
If not, what am I missing? Any help is deeply apreciated. :)
Jenna:
Can you call gdb.exe from the console (try "gdb --version" and post the output) to verify it works correctly.
If that works, can you post a screenshot of the "Toolchain executables" tab ?
Which OS do you use ?
I had troubles with gdb 6.6 and so I use 6.7 on Windows. But that should not be the problem you have.
kamos:
Thanks for the swift reply jens.
Here's the output of gdb --version:
--- Code: ---C:\>gdb --version
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
C:\>
--- End code ---
And here's the screenshot showing the tab and the browse window showing the executables:
I'm running Windows XP SP2.
mandrav:
Change "Compiler's installation path" from C:\Mingw\bin to C:\Mingw
Jenna:
--- Quote from: mandrav on January 06, 2008, 08:37:45 pm ---Change "Compiler's installation path" from C:\Mingw\bin to C:\Mingw
--- End quote ---
I tried it on my system (W2K under kvm) and it doesn't matter if the "\bin" is there under "Toolchain executables".
But there is one difference to kamos' installation: he has a "\" in his Path environment-variable after the "c:\MinGW\bin". I have none.
With the trailing backslash in path and the "\bin" in the C::B settings the debugger does not start.
If the trailing backslash in path is missing it works.
Navigation
[0] Message Index
[#] Next page
Go to full version