I want to use gdb to debug a C extension I wrote.
I followed all the steps here to codesign my brew install gdb
version of gdb: https://sourceware.org/gdb/wiki/PermissionsDarwin
However, security dump-trust-settings -d
shows
SecTrustSettingsCopyCertificates: No Trust Settings were found.
Even though I selected "Always Trust" for code signing in Keychain Access. Anyway I continued with the instructions.
gdb still has the same error as when I first tried it:
% gdb -ex r --args zsh python crash.py
GNU gdb (GDB) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin20.2.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
"0x7ffee8d454b0s": not in executable format: file format not recognized
Starting program: python crash.py
No executable file specified.
Use the "file" or "exec-file" command.
(gdb)