Community
Participate
Working Groups
Build Identifier: 20100218-1602 I currently use Eclipse C/C++ Development Tooling undex Windows XP SP2. To compile and debug, I installed MinGW and MSYS. MinGW version is 5.1.6 but I use GCC version 4.4.0 provided by MinGW. I also installed GDB 7.0.1 from the MinGW website and libexpat-1.dll. I programmed a simple C++ shared library together with a simple caller program also written in C++. Compilation and linking is alright under Windows (I also tried under Linux) and I can debug both caller and library from the Windows command line. The problem arise when trying to debug from Eclipse CDT using MI under Windows (same operation under Linux is OK). gdb is launched with several commands but as soon as -exec-run is issued, gdb stops with the message : ../../gdb-7.0.1/gdb/thread.c:79: internal-error: inferior_thread: Assertion `tp' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. I then tried to paste the extact same commands in command line using "gdb --interpreter=mi program.exe" and everything runs fine. I have no problem debugging a single program or a program with statically linked library inside. Bug also reported at GDB : http://sourceware.org/bugzilla/show_bug.cgi?id=11362 Reproducible: Always Steps to Reproduce: 1. Shared library 2. Under Windows 3. Using GDB (MI interpreter, whatever command set is used)
Created attachment 161492 [details] The complete input/output log when failing (For version 7.0.1)
I'm not sure what is happening, but you could try using the other CDT debugger: DSF-GDB. In the main tab, when you launch, there is a hyperlink at the bottom. Click on it and select the GDB (DSF) debugger and try it out.
Unfortunately, I have the same error with DSF: [New Thread 1140.0x1a0] gdb: unknown target exception 0xc0000135 at 0x7c974ed1 ../../gdb-7.0.1/gdb/thread.c:79: internal-error: inferior_thread: Assertion `tp' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) [answered Y; input not from terminal] ../../gdb-7.0.1/gdb/thread.c:79: internal-error: inferior_thread: Assertion `tp' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Create a core file of GDB? (y or n) [answered Y; input not from terminal] But I can't find the core dump ? Maybe this would help you.
Created attachment 162253 [details] Eclipse log when using GDB (DSF)
I had the exact same error and it turns out the executable couldn't find my dll so I copied it to the executable working directory and it worked. Does the executable work if you run it (not debug) from Eclipse? If it terminates immediately then a dll is probably missing (see bug 207183). I can also reproduce this outside Eclipse, in Command Prompt. You said you could debug from the command line, are you sure you debugged from the same working dir as Eclipse? For example, if you had project/Debug/myexe.exe project/Debug/mydll.dll and debugged from the project/Debug directory than it would work from command line. But in Eclipse, the default working dir would be project/ and it wouldn't work. My steps to reproduce (inside or outside Eclipse): 1. Create a dll with a simple function 2. Create an executable calling the function in the dll (link with the dll) 3. Launch MinGW gdb 7.0.1 without the dll available in the working dir or in PATH 4. Start debugging the executable
(In reply to comment #5) Of course, PATH is set correctly and executable runs fine, either from Eclipse or from console. Usually, if a dll is missing and the executable is run outside froim eclipse, a message box appears to inform that the dll was not found.
Would it be possible to attach a small test project(s?) that triggers the bug? Thanks!
Created attachment 165389 [details] Source of a project triggering the bug The archive is constituted of two components : a Dll lib and an exe program. This program compiles, runs and debugs well under Linux unmodified.