Eclipse CDT, Can't use debugger (Always stuck

2020-06-16 08:26发布

If I run debugger then it gets stuck on 89% process... It shows

 Launching : Configuring GDB Aborting configuring GDB

I just wanted to see the debugger is working so all I have is

printf("debug test");

in main function.. Do you guys know what the problem is?

4条回答
乱世女痞
2楼-- · 2020-06-16 08:57

I also encountered this error on Mac Mavericks. After which gdb I figured out that the path set in Eclipse Debug Configuration is not correct. Somehow I mistakenly set it to /usr/local/bin/gdb which actually should be /usr/bin/gdb

查看更多
地球回转人心会变
3楼-- · 2020-06-16 09:16

I believe the answer lies in codesigning, and the problem originates with the system security changes introduced by Apple. Please see this Stack Overflow answer, which fixed the same issue for me. Launching Eclipse with sudo (as recommended above) should probably be discouraged due to potential risks with your IDE going haywire with root permissions.

查看更多
趁早两清
4楼-- · 2020-06-16 09:17

hello after experiencing the same, it appeared gdb was missing access to some dll (libexpat-1.dll). putting it in the current path corrected the problem. in order to check this, try invoking gdb from the command prompt

all the best

olivier

查看更多
神经病院院长
5楼-- · 2020-06-16 09:19

I have spent quite some time on this. It's really annoying and the solution is stupid to me:

Environment:

Mac + Eclipse + gdb (ggdb downloaded from macports).

Symptom:

Debugging hangs at 100% at startup. launching gdb aborting configuring gdb.

Solution: run as root

sudo /Applications/Eclipse.app/Contents/MacOS/eclipse

查看更多
登录 后发表回答