0

In brief: How do I change the path to gdb to point to the right location?

Details

I know this topic is a quite common one, but I am desperate. I installed eclipse CDT on my MacOS High Sierra. Then after some time of searching I found out how to install the GDB debugger including code-signing. So I installed gdb 8.1 at /usr/local/bin (forgot which method I exactly used). It all seemed fine (gdb --version in console etc.) but then I found out that gdb 8.1 does not work under MacOS.

The way out of my dilemma seemed this post: https://stackoverflow.com/a/49104154/1552080 which created a parallel installation of gdb at /usr/local/Cellar/gdb/8.0.1/bin.

I did all the code signing stuff and entered the path to gdb 8.0.1. Furthermore I entered the new path in the eclipse debugger settings and modified my .bash_profile to point to the 8.0.1 location.

Nevertheless, eclipse seemed to point to the gdb 8.1 location /usr/local/bin. That's why I deleted the 8.1 gdb executable. Since then I always get an error message:

"Error with command: /usr/local/bin/gdb --version Cannot run program "/usr/local/bin/gdb": Unknown reason"

Obviously, eclipse still looks in the wrong place for a debugger.

Maybe it is important to mention that when installing gdb 8.1 I did some trick in the save mode (see point 14 of https://gist.github.com/gravitylow/fb595186ce6068537a6e9da6d8b5b96d)

any help appreciated

2018-05-13, Update: the error above still persists after I copied the gdb 8.0.1 executable to the location /usr/local/bin

WolfiG
  • 1,059
  • 14
  • 31

0 Answers0