Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » "Breakpoint installation failed: Breakpoint insertion failure" when setting breakpoint aft(MinGW GDB dies with "991,183 *stopped,reason="signal-received",signal-name="SIGINT",signal-meaning="Interrupt",frame={addr="0x761572c7",func="NlsUpdat)
"Breakpoint installation failed: Breakpoint insertion failure" when setting breakpoint aft [message #1625334] Fri, 20 February 2015 09:56 Go to next message
Lars M. is currently offline Lars M.Friend
Messages: 2
Registered: July 2014
Junior Member
I have a reproducible failure of GDB when using MinGW or MinGW-w64 on Windows.

Affects:


  • eclipse-cpp-luna-SR1a-win32-x86_64
  • stable release: mingw64-x64-4.8.1-release-posix-seh-rev5
  • most recent release: mingw64-x86_64-4.9.2-release-posix-seh-rt_v3-rev1
  • MinGW from sourceforge.net/projects/mingw (link edited due to "You can only use links to eclipse.org sites while you have fewer than 5 messages." Sad)
    C:\mingw32\bin>gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    Target: mingw32
    Configured with: ../gcc-4.6.2/configure --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw
    Thread model: win32
    gcc version 4.6.2 (GCC)
    
    C:\mingw32\bin>gdb -v
    GNU gdb (GDB) 7.4

  • Windows 7 64bit


Please note, that there are no issues with this code on Linux.

Test code:

int main(int argc, char **argv)
{
    string line;
    getline(cin, line);
    printf("your line: %s\n", line.c_str());
    return 0;
}


Steps to reproduce:


  1. Build the code with one of the Toolchains mentioned above (using -std=c++0x)
  2. Launch the program in debug mode.
  3. Let it run till getline() is called
  4. Insert a breakpoint at the printf() line


Actual Result:

The program does not respond to user input, GDB does not respond to interrupt or any other commands. An error is thrown: "Breakpoint installation failed: Breakpoint insertion failure"

Significant lines of GDB output:

132,543 31-exec-continue --thread 1
132,547 31^running
132,547 *running,thread-id="all"
132,547 (gdb)
134,596 =thread-created,id="2",group-id="i1"
134,598 ~"[New Thread 3880.0x1258]\n"
134,598 *running,thread-id="all"
134,602 ~"\nProgram received signal "
134,602 ~"SIGINT, Interrupt.\n"
134,603 ~"[Switching to Thread 3880.0x1258]\n"
134,605 ~"0x0000000076ca49f2 in KERNEL32!CtrlRoutine () from C:\\Windows\\system32\\kernel32.dll\n"
134,605 *stopped,reason="signal-received",signal-name="SIGINT",signal-meaning="Interrupt",frame={add\
r="0x0000000076ca49f2",func="KERNEL32!CtrlRoutine",args=[],from="C:\\Windows\\system32\\kernel32.dll\
"},thread-id="2",stopped-threads="all"
134,607 =thread-selected,id="2"
134,607 (gdb)
134,607 32-break-insert -f D:\\app\\main.cpp:147


Expected Result:

Successfully tested with GDB on CMD:


  1. Open CMD and change to directory containing the executable
  2. Start executable and look-up its process number (<PID>)
  3. Open another CMD and start GDB
  4. In GDB execute the following commands
    attach <PID>
    break D:\\app\\main.cpp:147
    continue

  5. Switch to first CMD and enter a line and hit <Enter> key
  6. Switch back to GDB, you should see sth. like:
    Breakpoint 1, main (argc=1, argv=0x4dfe20)
        at D:\10216_wimbus\sources\serial-interface\app\main.cpp:147
    147             printf("your line: %s\n", line.c_str());

  7. Now you can step through the rest of the program by entering step


References:

I selected the Toolchain following the (qt-project.org/wiki/MinGW-64-bit) Qt Project recommondations. (link edited due to "You can only use links to eclipse.org sites while you have fewer than 5 messages." Sad)

I found a mailing list thread that may be related to this issue: (eclipse.1072660.n5.nabble.com/target-unexpectedly-stops-on-a-SIGINT-while-setting-breakpoint-on-running-target-td62921.html) target unexpectedly stops on a SIGINT while setting breakpoint on running target (link edited due to "You can only use links to eclipse.org sites while you have fewer than 5 messages." Sad)

There is a bug report related to this mailing list thread: (bugs.eclipse.org/bugs/show_bug.cgi?id=304721) Bug 304721 - Use GDB async mode for GDB 7.0 (link edited due to "You can only use links to eclipse.org sites while you have fewer than 5 messages." Sad)

Questions:


  • Can please someone confirm this behavior?
  • Or tell me what I am doing wrong?
  • Should I open a bug report?
  • Is the bug mentioned above related to this issue?


Currently to me it looks like developing Windows applications on Windows using MinGW and Eclipse CDT seems to be impossible.
Re: "Breakpoint installation failed: Breakpoint insertion failure" when setting breakpoint [message #1630919 is a reply to message #1625334] Mon, 23 February 2015 13:33 Go to previous message
Lars M. is currently offline Lars M.Friend
Messages: 2
Registered: July 2014
Junior Member
I submitted a bug report:

bugs.eclipse.org/bugs/show_bug.cgi?id=460598
Previous Topic:wish to set a breakpoint, but only get a 'set bookmark name' popup
Next Topic:CDT & Visual Studio tools - how to debug?
Goto Forum:
  


Current Time: Fri Apr 26 02:48:42 GMT 2024

Powered by FUDForum. Page generated in 0.03385 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top