How to get a codesigned gdb on OSX?
It would seem you need to sign the executable. See these links for more information. You should be able to get away with self signing if you don't plan on redistributing that version of gdb
.
https://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man1/codesign.1.html
Alternatively, you could disable code signing on your system, although this presents a security risk. To do so try running sudo spctl --master-disable
in the Terminal.
macOS Mojave: How to achieve codesign to enable debugging (gdb)?
This is related to codesign entitlements. you must add "com.apple.security.cs.debugger" key in signing process.
for example you must change codesign -fs gdbcert /usr/local/bin/gdb
to codesign --entitlements gdb.xml -fs gdbcert /usr/local/bin/gdb
.
gdb.xml content must something like following code.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.debugger</key>
<true/>
</dict>
</plist>
codesigned errors when using gdb on macos Mojave 10.14
gdb codesigning will need proper entitlements in 10.14+:
https://sourceware.org/gdb/wiki/PermissionsDarwin
Edit: Now you are probably duplicating this error which requires downgrading gdb gdb-doesnt-work-on-macos-high-sierra-10-13-3… answer has instructions.
Edit 2: it looks like upgrading to gdb 8.3 should work for you now.
Related Topics
Iterator Adapter to Iterate Just the Values in a Map
How to Draw a Point (On Mouseclick) on a Qgraphicsscene
C++11 Std::Mutex in Visual Studio 2012 Deadlock When Locked from Dllmain()
Boost Asio - How to Write Console Server
Are Variadic MACros Nonstandard
How to Force Inclusion of "Unused" Object Definitions in a Library
C++ Calculating More Precise Than Double or Long Double
Efficiently Convert Between Hex, Binary, and Decimal in C/C++
Glut Deprecation in MAC Osx 10.9, Ide: Qt Creator
Conversion from Derived** to Base**
How to Initialize the Reference Member Variable of a Class
What Is the Purpose of a Declaration Like Int (X); or Int (X) = 10;