The command to install GDB is as follows, after installation, you need to sign GDB, and the signature is reproduced from: http://plotcup.com/a/129
Brew Install HTTPS://RAW.GITHUB.COM/HOMEBREW/HOMEBREW-DUPES/MASTER/GDB.RB
Production Certificate
Open Keychain Access
Create a certificate
Enter a name and select a type
Enter the validity period, the general default of 365 is good, that is, a year
Then continue straight on until you create the screen, select the system, and create
Select the Gdb-cert certificate that you just generated, and double-click
In the certificate introduction, open Trust, and use this certificate when you choose to always trust
To sign GdB
With the certificate you just created, open the shell and execute the following code:
Codesign-s Gdb-cert/usr/local/bin/gdb
TIP: You may have to restart your computer before performing this
Make it possible for ordinary users to use GDB
Since the previously produced certificate is under the system, each execution of GDB will prompt the administrator password, the solution is also very simple, open keychain access to the system below the Gdb-cert copy to the log on the line.
Mac installation GdB