GDB command not found when installed from MacPorts Mavericks

Jameo picture Jameo · Nov 12, 2013 · Viewed 14.5k times · Source

I am trying to install GDB to work with LiteIDE, on Mavericks.

After some research, I found out that GDB does not come with Xcode anymore, and that you have to install it yourself. Short of actually installing GDB from source, and self code signing (id rather not do this), I would like to use MacPorts to get this done.

I did port install gdb, which ran and succeeded as far as I know. After the install, I closed terminal and then typed gdb and I get -bash: gdb: command not found

Does anyone have a solution for this, using MacPorts???

Answer

xryl669 picture xryl669 · Nov 13, 2013

You should use the command "ggdb" to start the MacPorts' build of gdb.

I don't know why they have renamed it, probably a transient bug/change that will be fixed somehow, I suspect they wanted to avoid a collision with the alias "gdb" launching LLDB.

Edit: Reworded the answer to avoid ambiguities as reported by @trojanfoe