Gdb debug "terminated exit value: 0" error eclipse on mac - eclipse

I've been trying to install gdb to debug using eclipse on my mac with no luck, I followed both of those guides with no success:
https://www.youtube.com/watch?v=JdcpDOf5Sog
[second guide in other comment - can't add more than two links due to new user limitations]
I'm attaching a screenshot to demonstrate:
Gdb "terminated exit value: 0" eclipse on mac
Each time I hit the Debug button I get the same "treminated exit value: 0" error (the code runs perfectly when I hit the run button). Gdb does respond to terminal command "gdb"
I've been researching for quite long and it seems that no one has experienced the same problem I do. (Macbook pro 2016 10.12 Sierra)
I've heard from a friend that I might need to configure my Mac to "developer" mode, I have xcode up and running, but I have no idea what else should I do. Anyway I'm my friend could not guarantee that it is the cause of the problem.

I had issue with terminated exit value: 0 while using older gdb 7.11 because my 7.12.1 does not work on Sierra 10.12.4. There was no solution for my case.
Easy WA is to use LLDB as a debugger for now. Sample instructions here
Another LLDB instruction here

Related

Visual Studio Code with XDebug Getting Stuck

I'm using XDebug with Visual Studio Code on Windows 10 to debug PHP.
The debugger works but from time to time it's getting stuck (hits the breakpoint but doesn't respond to step in, step over commands).
I tried switching to XDebug nts version (Not Thread Safe) but it doesn't help. Restarting the web server (Apache) doesn't resolve it either. Sometimes computer restart helps but not always...
Any solution or workaround? (Even a command line that frees this deadlock)
Having out of context debug expressions in the watch window causing the debugger to get stuck.You should clear the watch window from expressions.I guess the evaluation of out of context expressions make the debugger to get stuck.

Debuggers don't kick in when application crashes

I am trying to debug an application with Immunity debugger. I also tried WinDbg. I have set them as default JIT debugger through the Registry but it doesn`t work.
I tried in Windows XP SP3 and in Windows 7 but it doesn't work.
This might help someone whose immunity debugger does not kick in when the application really crashes like mine.
In regedit, edit the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug
Default: (value not set)
Auto: 1
Debugger: "C:\Program Files\Immunity Inc\Immunity Debugger\ImmunityDebugger.exe" -p %ld
UserDebuggerHotKey: 0
You can install Windbg as the default postmortem debugger by running this from the command line:
windbg -IS
From then on, the next time an application crashes Windbg will appear, attached to the process.
To undo this, see this answer.
If this doesn't work, you'll need to add more details to your question.
If you are using Immunity Debugger, you may want to try to install python 2.7 on your PC.
If it is already installed try reinstalling it

iPhone GDB Segmentation fault when attaching to running process

I have a jailbroken iPhone 5 running iOS 6.0.1. I installed gdb using pod2g's tutorial here: www.pod2g.org/2012/02/working-gnu-debugger-on-ios-43.html
All of the steps worked, and I copied gdb over to my jailbroken iPhone so I could use it there. gdb starts just fine, but when i try to attach to SpringBoard (or any other running process like Twitter) using
(gdb) attach SpringBoard
this happens:
Attaching to process 7366.
Segmentation fault:11
and I'm returned to the MobileTerminal or ssh prompt (not the gdb prompt). It looks like gdb has crashed, not SpringBoard, because my iPhone does not respring (as it normally does when SpringBoard crashes or is killed). I have tried attaching to SpringBoard using the gdb from the cydia.radare.org source as well, and the exact same thing happens each time. About a week ago, the gdb from the cydia.radare.org source worked just fine, but now both the gdb from pod2g's tutorial and the one from the Cydia source produce the above output. I've tried running gdb as root and the same thing happens. I've googled, and I can't seem to find anything like this. What's wrong and how do I fix it?
Apple has added a PTrace option to prevent debuggers (like GDB) from attaching to processes. Fortunately, you can use GDB to circumvent this as well.
Here is an excellent description:
http://iphonedevwiki.net/index.php/Crack_prevention#PT_DENY_ATTACH

nsight eclipse for mac lion debug error

I am using nsight eclipse edition for mac to debug my cuda code. I was able to run cuda-gdb all fine from a terminal but was not able to use the debug function in Nsight. Whenever I started to debug, an error window pops up saying "Error in final launch sequence
Connection is shut down". My OS is Mac Lion (10.7.4).
I understand the big thing in Cuda 5.0 is the interactive debugging with eclipse but sadly I won't be able to use it unless I switch to Windows or Linux. If anybody has seen this or knows a workaround for this, please let me know and your help will be very much appreciated.
Thank you!
I'm afraid you've hit a known issue in CUDA 5.0 Toolkit. Due to some last-minute change, cuda-gdb (which is a shell script) is not entirely valid in Mac OS X. To remedy the problem:
Edit cuda-gdb shell script.
Make line #!/bin/sh the first line in this script.
Save the changes
We apologize for inconvenience. This (and many other) issues will be fixed in the upcoming CUDA 5.0 RC release.
I had this problem in linux recently.
Error in final launch sequence Connection is shut down which means nsight can not start debugger correctly.
first you have to make sure you can run cuda-gdb in terminal. just type cuda-gdb in terminal, if it says like cuda-gdb cannot find some lib in /usr/lib, just download or relink it. after you done this , rerun cuda-gdb in terminal, it should work fine. then you can use nsight debugging tool.

Eclipse CDT, Can't use debugger (Always stuck on 89% process)

If I run debugger then it gets stuck on 89% process...
It shows
Launching : Configuring GDB Aborting configuring GDB
I just wanted to see the debugger is working so all I have is
printf("debug test");
in main function..
Do you guys know what the problem is?
I have spent quite some time on this. It's really annoying and the solution is stupid to me:
Environment:
Mac + Eclipse + gdb (ggdb downloaded from macports).
Symptom:
Debugging hangs at 100% at startup. launching gdb aborting configuring gdb.
Solution: run as root
sudo /Applications/Eclipse.app/Contents/MacOS/eclipse
I believe the answer lies in codesigning, and the problem originates with the system security changes introduced by Apple. Please see this Stack Overflow answer, which fixed the same issue for me. Launching Eclipse with sudo (as recommended above) should probably be discouraged due to potential risks with your IDE going haywire with root permissions.
hello
after experiencing the same, it appeared gdb was missing access to some dll (libexpat-1.dll).
putting it in the current path corrected the problem.
in order to check this, try invoking gdb from the command prompt
all the best
olivier
I also encountered this error on Mac Mavericks. After which gdb I figured out that the path set in Eclipse Debug Configuration is not correct. Somehow I mistakenly set it to /usr/local/bin/gdb which actually should be /usr/bin/gdb