When I'm trying to run "Hello World" in Eclipse CDT Indigo on Windows 7 using MinGW I have the following problems:
While debugging:
I can pass through all lines of the code, but finally I get the message:
warning: FTH: (6052): Fault tolerant heap shim applied to current process. This is usually due to previous crashes.
Quit (expect signal SIGINT when the program is resumed)
While normally running:
Nothing happens, I get only <terminated> in the status bar.
Unfortunately I can't modify register on the computer I am running the program, so I can't globally disable the FTH service.
Has anyone met the same problem?
Related
I'm having remote ARM Linux box which I need to debug.
The server is started:
gdbserver :12345 ./my_app
The client:
./arm-am3354-linux-gnueabihf-gdb ~/
(gdb) target remote dev_r:12345
(gdb) continue
Then I'm trying to pause the app with Ctrl+C, but the gdb stops with:
[Inferior 1 (process 2766) exited with code 01]
And on server:
Child exited with status 1
GDBserver exiting
Story:
I was trying to use remote debugging in QtCreator, but when setting breakpoints in run-time the gdb was crashing in the same way. Also the breakpoints and pause is not working in QtCreator.
I was trying also another gdb like gdb-multiarch and the one from android-sdk.
Update:
Debugging small program aka Hello World works. Local Debugging (on x86) works too. The app itself has hundred thousand lines of code, shared and static libraries.
Partial solution:
Probably the sysroot for embedded platform that I've got was invalid. After copying /lib/ and /usr/ from the target device and setting it as
set sysroot /home/karel/sysroot
I'm able to set breakpoints and the app stops at them. The pause however is still stopping the remote app. The same for QtCreator: Tools->Options->Debugger->GDB->Additional Attach Commands
I had a similar (or even exactly the same?) issue with debugging my application running on the EGLFS platform. Debugging when built with Qt 5.4 was working perfectly fine, debugging with Qt 5.5 did behave as you describe.
After hours of searching, I found that my application on Qt 5.5 exited when receiving a SIGINT, whereas on Qt 5.4, the debugger could pause the application as expected. Since GDB sends SIGINT when trying to pause the application or setting / removing a breakpoint, this was where trouble started.
After some more research, I finally found the following commit to Qt 5.5: Fix up signal handling in QFbVtHandler. At the very end, you see that when receiving SIGINT or SIGTERM, the handleInt() handler is called where we finally run into _exit(1). Setting a breakpoint there confirmed that this is exactly what happens when trying to pause or set a breakpoint with GDB.
Solution that worked for me: I have created a patch to qfbvthandler.cpp, simply removing the #define VTH_ENABLED line.
GDB debugging is now again working like a charm.
Note: Even though qfbvthandler.cpp has been updated in Qt5.6 and upwards, I suspect the behaviour would still be the same. I however don't have a workspace set up in order to test this.
I am trying to remotely debug a linux machine c++ hello world code from a windows client. I am Debuging from windows 7 to Beaglebone Black running ubuntu. I remember i had similar issues when i was debuging from a linux machine to raspberry pi host.
The problem is, when i start debbuging i cant step anywhere because i am getting ths message:
I provided the gdb debugger and executable for the client program within i debug from but i have no clue what else shuld i give? One thing is that when i instead of stepping continue through the code, i finally get to my breakpoint but i get segfault at the end anyways. How can i provide the apropriate info for the debugger?
Any help would be really aprichiated.
In a simple Hello World Project in Eclipse CDT (version: Kepler) on Windows 7, I tried to set breakpoints to debug the program.
However, when the program is launched, the debugger stops at the first line of main(), and when the Resume button is pressed, all the breakpoints are skipped and the program terminates with: expect signal SIGINT when the program is resumed.
A strange thing happened too: the same installation on a second computer in which the username does not include spaces works fine.
The console for gdb traces does not report anything strange. The breakpoints are set and the execution does not report other errors (but I don't assure this is the problem).
The same settings are used on MacOS X too, but here it works fine.
Any hints? Thank you.
I'm running Eclipse on win7. I want to make console applications that can run on either windows or linux. I followed the guide here on how to setup the compiler
I'm trying to compile and run a simple hello world program. It compiles fine, but when I try to debug I get the following error:
'launching test' has encountered a problem.
Error in final launch sequence.
Clicking details reveals the following information.
Error in final launch sequence
Failed to execute MI command:
-exec-run
Error message from debugger back end:
Don't know how to run. Try "help target".
Don't know how to run. Try "help target".
My gdb debugger path is C:\codesourcery\bin\arm-none-eabi-gdb.exe
I'm not exactly sure how to proceed.
If you're creating a windows console then I would think you would need gdb found in c:\minGW or wherever you have your Windows 7 gcc toolchain.
To change your debugger on Eclipse Kepler go to:
Run->Debug Configurations. Select Debugger tab and in the "GDB debugger:" field, enter the path of your Windows gdb.exe file (c:\MinGW\bin\gdb.exe if you're using minGW)
I realize this is an old question, but hoping it will help someone. In my case, there was a breakpoint set with only a memory address (no file name associated with it). Not sure how I got into this situation... Once I removed the breakpoint, I was able to launch my program with debugger. Note, I am using Eclipse Luna CDT (SR2)
I've got a problem with gdb debugger. My console app shows me incorrect action results (some trash instead of normal string which I've got from XML ater the parsing) if I run it under a debugger plus I get SIGINT ( I don't output eol character and don't hit ctrl+c). Running my app with no attached debugger (just double click on .exe or Run menu from IDE) shows me correct results. What is the problem?
Some Info:
Windows 7 Pro Sp1 x86
gdb 7.3.1 (MinGW) and gcc 4.6.2 (MinGW)
Eclipse 3.7.1
Here is a gdb trace.
At this screenshot you can see the settings
Probably you have some memory corruption in your application and and they become visible when you use the debugger. In order to solve the problem we need to take a look on your source code.