Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

ggdb broken in Sierra

Confirmed by other users online, ggdb no longer work with Sierra. This is not a codesigning issue, as I've resigned and verified my ggdb issue (after updating Macports & ggdb):


(gdb) break main

Breakpoint 1 at 0x100007694: file main.cc, line 21.

(gdb) run

Starting program: /Users/bp/etc/src/mak.O/a.out

During startup program terminated with signal SIG113, Real-time event 113.

(gdb) quit

MacBook Pro with Retina display, macOS Sierra (10.12)

Posted on Sep 26, 2016 1:11 PM

Reply
15 replies

Jul 11, 2017 9:22 AM in response to PNW Guy

Hi,

I have a nigthmare! Nothing work on my MacBook Air with Sierra 10.12.5.

Using Lazarus 1.6.4 with FPC 3.0.2

GDB goes to "-exec-run" ",msg= "During startup program terminated with signal ?, Unknown signal.""

~/.gdbinit contains

set startup-with-shell off

Certificate in System is Ok.

brew update && brew upgrade gdb returns:

Already up-to-date.

Error: gdb 8.0 already installed.


Please any help will be appreciated.


Thanks


Abner

Oct 16, 2016 8:30 PM in response to PNW Guy

I figured this out. The root cause is that gdb sets "startup-with-shell" enabled by default, and this causes gdb to launch your application via a shell invocation, which is disallowed by the operating system (since the shell - assuming you use the system-supplied bash or tcsh - is a protected application and can't be debugged). The solution for me - after doing the proper codesigning - was to set startup-with-shell off in my .gdbinit.

Nov 5, 2016 4:39 AM in response to Gondimc

This is how I easily fixed the issue.



See video instructions here



1. Quit gdb

2. Using your text editor e.g. Sublime Text, save a file called “.gdbinit” [Exclude the quotation marks] in your user folder.

3. In the file add the following: “set startup-with-shell off” [Exclude the quotation marks]

4. Save the file

5. gdb should now work



Sources



https://discussions.apple.com/thread/7684629?start=0&tstart=0



http://stackoverflow.com/questions/9573683/where-is-gdbinit-is-located-and-how-c an-i-edit-it/13637929



https://sourceware.org/gdb/onlinedocs/gdb/Starting.html

Nov 7, 2016 12:40 PM in response to Salamit

Dear Salamit and PNW Guy,


Thank you very much for your attention.


But I forgot to mention that I'm on Netbeans, and I'm afraid that's the reason I'm still stuck on an error that pops up, saying "During startup program terminated with signal ?, Unknown signal.", when the debugger is triggered.


And I can't figure out why this is happening...


Thanks again for all the help given.


My best

Nov 19, 2016 2:32 AM in response to PNW Guy

Is anyone still having this issue? I have followed these simple instructions and am still getting an error. In my case I get the following error after the .gdbinit file is modified: "During startup program terminated with signal ?, unknown signal". I have tried a few things that I have seen online to attempt to resolve this. First was just to modify the .gdbinit file. When only that step is performed I get a codesign error. So then I follow the steps to create a certificate. Now I have the cert and the set startup-with-shell off .gdbinit file modification and the error quoted above happens. When I remove the entry in the .gdbinit file, the error stays the same. This is with using netbeans 8.2 on mac os 10.12.1

ggdb broken in Sierra

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.