[C++] Solve "Cannot run program "gdb": Unknown reason" error

In Mac OSX,

The Issue Image:

1. Build the project on Eclipse successfully.

2. Run gdb on command line successfully. So the gdb has been installed on the Mac.

3. To run debug mode on Eclipse, the error appear:
  "Cannot run program "gdb": Unknown reason"

 

Analyse: Eclipse cannot find the gdb, then popups this error.

 

Solution:

1. Find the path of gdb on Mac. e.g. 

/usr/local/Cellar/gdb/7.12.1/bin/gdb

2. Preference -> C/C++ -> Debug -> GDB -> GDB debugger:

set the GDB debugger as the path of gdb, which is found on step1. 

The after Image should like:

 

posted @ 2017-03-30 06:51  TonyYPZhang  阅读(2768)  评论(0编辑  收藏  举报