Author Topic: How to use GDB on Windows XP?  (Read 33732 times)

Leviathan569

  • Guest
How to use GDB on Windows XP?
« 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?

Offline Tjaalie

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: How to use GDB on Windows XP?
« Reply #1 on: October 28, 2005, 03:16:19 pm »
Why not download the version of CB with GDB in it??

Tjaalie,

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: How to use GDB on Windows XP?
« Reply #2 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.

Leviathan569

  • Guest
Re: How to use GDB on Windows XP?
« Reply #3 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?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: How to use GDB on Windows XP?
« Reply #4 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.

Leviathan569

  • Guest
Re: How to use GDB on Windows XP?
« Reply #5 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.



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



Do I have to adjust any other settings or what?

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: How to use GDB on Windows XP?
« Reply #6 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.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Leviathan569

  • Guest
Re: How to use GDB on Windows XP?
« Reply #7 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.

Leviathan569

  • Guest
Re: How to use GDB on Windows XP?
« Reply #8 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)
« Last Edit: October 31, 2005, 04:07:15 pm by rickg22 »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: How to use GDB on Windows XP?
« Reply #9 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? ;))
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: How to use GDB on Windows XP?
« Reply #10 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

Leviathan569

  • Guest
Re: How to use GDB on Windows XP?
« Reply #11 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.

Israel

  • Guest
Re: How to use GDB on Windows XP?
« Reply #12 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

Israel

  • Guest
Re: How to use GDB on Windows XP?
« Reply #13 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?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: How to use GDB on Windows XP?
« Reply #14 on: November 03, 2005, 06:45:25 pm »
"Settings->Compiler" are the global options. They 're different from "Project->Build options".
Be patient!
This bug will be fixed soon...