Code::Blocks Forums

User forums => Help => Topic started by: Leviathan569 on October 28, 2005, 02:10:52 pm

Title: How to use GDB on Windows XP?
Post by: Leviathan569 on October 28, 2005, 02:10:52 pm
I've downloaded GDB but I can't get it to work. As usual with stuff coming from the Linux world, lots of files and directories with cryptic names. No exe file and no documentation on how to get it to work in Windows. Will someone please help me to get this damned thing to work?
Title: Re: How to use GDB on Windows XP?
Post by: Tjaalie on October 28, 2005, 03:16:19 pm
Why not download the version of CB with GDB in it??

Tjaalie,
Title: Re: How to use GDB on Windows XP?
Post by: rickg22 on October 28, 2005, 03:31:09 pm
no exe file??? Are you sure?

I think you downloaded the SOURCE CODE for gdb! Or if it's a "tar.gz" file, you need a tar-extracting utility to do the installation.
Title: Re: How to use GDB on Windows XP?
Post by: Leviathan569 on October 28, 2005, 03:40:54 pm
It was a tar.gz file. Seems like it was just the source code. I downloaded a windows version with a .exe file, but now I have another problem. When I try to debug, I get an error message that the debugger executable isn't set, while I definitely did set it in the compiler settings. "Debugger: gdb.exe". I use the Borland C++ 5.5 compiler. Can this compiler be used together with GDB?
Title: Re: How to use GDB on Windows XP?
Post by: rickg22 on October 28, 2005, 03:58:18 pm
eh no, GDB can only debug GCC compiled files. At lesat nobody we know has tried to do that.
Title: Re: How to use GDB on Windows XP?
Post by: Leviathan569 on October 30, 2005, 10:54:13 am
Ok, now I've downloaded and installed Code::Blocks with MinGW and GDB and it STILL doesn't work. I keep getting the same error message: debugger executable not set.

(http://img486.imageshack.us/img486/8594/error8pl.jpg)

These are the compiler settings. I believe everything is set correctly.

(http://img486.imageshack.us/img486/4775/setting2bj.jpg)

Do I have to adjust any other settings or what?
Title: Re: How to use GDB on Windows XP?
Post by: TDragon on October 30, 2005, 03:12:22 pm
Verify that the file "C:\Program Files\CodeBlocks\bin\gdb.exe" exists. If it doesn't, change the path accordingly. If it does, try uninstalling CodeBlocks and reinstalling it to a path without any spaces. (This shouldn't be the issue, but it's worth a shot.)

The error message isn't entirely accurate; it also appears when the debugger executable can't be found.
Title: Re: How to use GDB on Windows XP?
Post by: Leviathan569 on October 31, 2005, 11:30:50 am
The debugger path is correct. I've tried installing it on a path without any spaces, without result. I still can't get the debugger to work and I keep getting the same stinking error message.
Title: Re: How to use GDB on Windows XP?
Post by: Leviathan569 on October 31, 2005, 11:37:47 am
Here's something I would like to try. Can someone who got the debugger to work on a Windows XP system do the following:

- go to settings/import-export configuration
- uncheck everything but GDB debugger
- export the settings
- mail the file to leviathan569 (at) hotmail (insert a dot here) com

Maybe I can get it to work by importing the settings.

(Moderator note: e-mail address obfuscated by Rick)
Title: Re: How to use GDB on Windows XP?
Post by: thomas on October 31, 2005, 11:59:07 am
- mail the file to (...email...)

Erm, you do know that the troubleshooting forum is publicly accessible without requiring you to login?
Just so you are aware that even the most stupid spambot will collect your address if you post it here (maybe you want to edit your above post? ;))
Title: Re: How to use GDB on Windows XP?
Post by: Michael on October 31, 2005, 12:44:29 pm
Hello,

After have done what you asked for, these are my settings:

[debugger_gdb]
init_commands=
watch_args=1
watch_locals=1
eval_tooltip=1
debug_log=1
add_other_search_dirs=1

Best wishes,
Michael
Title: Re: How to use GDB on Windows XP?
Post by: Leviathan569 on November 01, 2005, 04:38:22 pm
Damned, importing settings is not implemented yet! Ok, so that didn't work either. And about the email address, I already get loads of spam on that, no harm in giving it away.
Title: Re: How to use GDB on Windows XP?
Post by: Israel on November 03, 2005, 03:59:42 pm
I'm getting the same error messages as Fish-Man; even though I set the GDB executable when I try to debug, C::B plays like I didn't specify anything.

Any progress on this?

Thanks,

Israel
Title: Re: How to use GDB on Windows XP?
Post by: Israel on November 03, 2005, 04:06:37 pm
Two notes:

I skipped over the part where it says GDB only works with GCC compilations- DOH!  Ok, I can live with that ;-)

The second thing is when I right-click on the Console Application and set either Build Options or Properties, eventually navigating to the menu which looks like the Compiler Selection Menu, the Programs tab is missing!  Maybe this means something- and it would certainly explain why it can't find the name of the debugger executable...

But when I go through Settings --> Compiler, I do see the Programs tab, and the debugger executable is set properly.

P.S.  Is there a generic debugger that works with DMC?
Title: Re: How to use GDB on Windows XP?
Post by: mandrav on November 03, 2005, 06:45:25 pm
"Settings->Compiler" are the global options. They 're different from "Project->Build options".