User forums > Help
[Solved] Debug won't stop at breakpoints [MinGW and GDB problem]
oBFusCATed:
Are you sure that the executable started by C::B is the one you've installed?
Ripedox:
I don't know which executable you are addressing, but if it's the gdb.exe one, I even got into the settings of the debugger and checked that it leads to exactly the one in the freshly installed MinGW.
Also trying to debug in eclipse stops with the error "Dwarf Error: wrong version in compilation unit header (is 4, should be 2)" same as here except the debug doesn't get interrupted.
My knowledge of GDB, MinGW and other things like that is quite limited. I am quite a newbie in programming, first year learning it in university and following youtube vids I managed to find Codeblocks and configure it, so I don't understand many of the things you're saying :D But still I think the dwarf error has something to do with the fact that it's using version 6.8 instead of the newly installed 7.6 (I dont know why the MinGW installer didn't install the 7.7.1 version).
oBFusCATed:
Do you have gdb 7.x installed?
You can verify that by starting a cmd.exe window, cd to the path where gdb is installed and execute gdb --version.
If it says you have 6.8 then it is:
1. the installer has failed
2. the installer has installed the new gdb in another location (most probable)
If it is 2) search you folders for *gdb*.exe to see where it is. A guess is c:\mingw\bin
Ripedox:
I did it!
In 5 minutes I learned how to use cmd, navigated to the location where MinGW was installed (C:\Compilers\MinGW), opened gdb.exe and it displayed "version 6.8".
I started the MinGW installer (the exe you get for making a fresh install) and I pointed to the MinGW location.
The installer told me that there already in such an installation done there and provided me with the option "Run now" which would run the installer for the current installation (otherwise I don't know how to run it, I would be happy if you tell me since I didn't find it in google).
After that, the new window told me it was version 7.6 for some reason.
I've never installed gdb before, so what I did was - get the "gdb.exe" for the newest version off of the internet and replace the one in MinGW\bin, which didn't work.
Then I thought it shouldn't be so simple, so I downloaded the gdb package and unzipped it.
I tried these instructions - http://www.tutorialspoint.com/gnu_debugger/installing_gdb.htm which failed after the command "$ gdb-6.6> ./configure" didn't work (I think I did everything properly).
The next command "$ gdb-6.6> make" told me there is no makefile (tho there was a makefile file in the directory).
So then I got the bright idea. I started the MinGW installer again which started the currently installed MinGW's installer for me and from the new window I marked "gdb" for removal and applied the changes.
Then I marked "gdb" for installation and I applied the changes.
I tested it with codeblocks and eclipse. VOILA! it's working perfectly on both places with gdb 7.6.1 (that the installer installed).
Whew... that was an adventure. Never knew this would be so hard to do, it's like I am trying to tame a wolf of something, even the internet doesn't know how to do it (at least when you don't know the right questions to ask).
Sorry for the post, I would be happy if you tell me how could I otherwise do it without the MinGW installer, where did I go wrong with unzipping the gdb package (I mean, how do you makefile, build it, where do you put it, what do you do with the outcome, etc.), or if you know a descent tutorial?
Truly a shame. I am close to mastering the level of C for microprocessor programming and yet I don't know how to handle this problem.
Thank you for your help! I hope other people that got this error like me see this.
oBFusCATed:
Building from source is a tough task, especially on windows.
If I were you, I'd contact the developers of mingw to see what they think about this problem.
Navigation
[0] Message Index
[*] Previous page
Go to full version