Install Gdb For Mac Sierra

Question or issue on macOS:

So it looks like the new ‘System Integrity Protection’ lockdown of /usr (among other directories) makes pear and pecl a non-starter. Has anyone found a workaround short of disabling it?

After I executed ps aux grep taskgated and then killed it with sudo kill -9 xxx just after step 11, gdb worked for me on Sierra 10.12.6, without restarting Mac. Seemed like taskgated was not shut properly by simply typing killall taskgated. The macOS High Sierra 10.13.2 update improves the stability, compatibility and security of your Mac, and is recommended for all users. This update:. Improves compatibility with certain third-party USB audio devices. Improves VoiceOver navigation when viewing PDF documents in Preview. Improves compatibility of Braille displays with Mail. Upgrade your gdb to version 8.0.1 brew upgrade gdb; execute echo 'set startup-with-shell off' /.gdbinit ( I saw this command when I installed gdb by brew ) create a certificate with name gdb-cert and trust this certificate in code signing option; reboot your mac; execute sudo codesign -s gdb-cert /usr/local/bin/gdb; done! Setup gdb on Mac OS Sierra/High Sierra GitHub, Here are the steps to installing and setting up GDB on Mac OS Sierra/High Sierra. Run brew install gdb. On starting gdb, you will get the following error. To install the latest version of gdb, run this command: brew install gdb. Verify that the operation was successfull by running: gdb -version.

How to solve this problem?

Solution no. 1:

There’s a much easier way — no need to disable SIP or download your own copy:

Solution no. 2:

You shouldn’t install binaries into system /usr, use /usr/local instead.

The pecl and pear commands should come along with PHP when installing via Homebrew.

Install Gdb For Mac Sierra

Here is the example installing PHP with the latest Homebrew:

or the specific version:

To find your pecl and pear commands, run:

or:

If you don’t have it, consider uninstalling previous PHP version or run reinstall instead.

You can also try to relink it by:

Otherwise, link it manually:

Alternatively download Pear it directly as a Phar package:

or with this following one-liner (will work on Linux, but not on Unix):

Solution no. 3:

Install Gdb For Mac Sierra Download

From this link: http://jason.pureconcepts.net/2012/10/install-pear-pecl-mac-os-x/ With this instructions, you don’t need to disable ‘System Integrity Protection’


The following instructions install PEAR and PECL on Mac OS X under
/usr/local/. PECL is bundled with PEAR. So this is as simple as
installing PEAR on Mac OS X.
PEAR is PHP’s Package Repository and makes it easy to download and
install PHP tools like PHPUnit and XDebug. I specifically recommend
these two for every PHP developer.
Download PEAR
curl -O https://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar

Install Gdb Mac High Sierra

Configure and Install PEAR
You should now be at a prompt to configure PEAR.

Type 1 and press return.
Enter:
/usr/local/pear

Type 4 and press return.
Enter:
/usr/local/bin

Press return

Verify PEAR.
You should be able to type:
pear version

Eventually, if you use any extensions or applications from PEAR, you
may need to update PHP’s include path.

Solution no. 4:

Install Gdb For Mac Sierra Os

On Mohave I had to run the following commands – thanks go to https://tobschall.de/2018/08/07/pear-on-mojave/

Gdb

Solution no. 5:

Add suffix --with-pear to install pear and pecl
See example below

Solution no. 6:

This worked for me as of MacOS Sierra 10.12.1 for upgrading PHP, installing PEAR and V8

Solution no. 7:

High Sierra setup:

  • install Brew
  • install PHP with Brew

There is preinstalled PEAR PACKAGE in

from there you can run

and you should have working PHP binary with Xdebug.

Solution no. 8:

When brew is used and not linked, use:

Solution no. 9:

For macOS Mojave 10.14.4 just use /local instead of /usr when asked for “Installation base ($prefix)” location.

Hope this helps!

From charlesreid1

  • 1Installing
    • 1.1Mac OS X

Install Gdb For Mac Sierra Free

Mac OS X

Install using homebrew:

Then, you have to give gdb permission to control other processes:

Now create a new certificate for gdb by opening the menu item Keychain Access > Certificate Assistant > Create a Certificate

Call it something like gdb-cert

Mac

Set Identity Type to Self-Signed Root

Set Certificate Type to Code Signing

Select the 'Let me override defaults' option

Most of the other settings can remain the default

Specify the location for the certificate to System (not login)

Now, sign gdb with the certificate:

Install gdb for mac sierra download

Install Gdb For Mac Sierra Update

Mac OS X Sierra

Mac OS X Sierra requires one more thing:

Check Code-Signing

To check whether the binary has been correctly signed, run the following command. If the binary has been successfully signed, this will not print anything out.

Starting with a simple hello world program:

Now compile the program with debug flags:

and load it up into gdb:

Now you can run the program like normal:

and to disassemble the binary into its assembly level instructions,

Homebrew installation and code-signing steps: https://sourceware.org/gdb/wiki/BuildingOnDarwin#Troubleshooting_code-signing




Retrieved from 'https://charlesreid1.com/w/index.php?title=Gdb&oldid=16990'