Ilio Catallo
Ilio Catallo

Reputation: 3180

MinGW gdb ignoring breakpoints when used with Eclipse CDT

I'm trying to set up a Windows 7 machine with Eclipse CDT (Kepler) and MinGW. Here follow the steps I perfomed:

  1. I downloaded and installed MinGW from the official repository
  2. I downloaded and installed the latest (Kepler) Eclipse CDT from the official website
  3. I updated the PATH global variable so as to include the MinGW bin path C:\MinGW\bin. The PATH variable is also correctly set in the Environment section in Eclipse.

However, when I try to debug (in debug mode) a simple Hello World program, breakpoints are ignored and the execution continues until the end. I tried the following workarounds without success:

Any suggestion? thanks.

Upvotes: 0

Views: 553

Answers (1)

roffez
roffez

Reputation: 315

For me, the problem was that my program's console output messed up gdb's console output, which is parsed by Eclipse.

The solution was to tell gdb to allocate a new console for the program output, by adding "set new-console on" to your .gdbinit file (Make also sure the .gdbinit file is specified under "Debugger options" in Eclipse).

There's also a discussion about this here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=327766

Upvotes: 1

Related Questions