GDB/bin/bash无法在Eclipse CDT中执行该应用程序? [英] GDB/bin/bash can't execute the app in Eclipse CDT?

查看:159
本文介绍了GDB/bin/bash无法在Eclipse CDT中执行该应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Mac OS X Mojave上使用Eclipse CDT运行GDB时遇到困难.

Having difficulties running GDB with Eclipse CDT on Mac OS X Mojave.

当我尝试调试项目时,GDB表现得很混乱:我可以进行几次调试,但是在下一个调试会话开始时,它就会开始停止,并显示消息配置GDB".

When I try to debug the project, GDB behaves chaotic: I am able to debug a few times, but then it starts stalling at the begining of the next debug session with the message "Configuring GDB".

可执行文件是/Users/jd/Work/myapp.

当我列出进程ps -al时,我看到有挂起的进程:

When I list the processes ps -al I see there are hanging processes:

/Users/jd/Library/Caches/gdb/bin/bash -c exec /Users/jd/Work/myapp  
/Users/jd/Library/Caches/gdb/bin/bash -c exec /Users/jd/Work/myapp   
/Users/jd/Library/Caches/gdb/bin/bash -c exec /Users/jd/Work/myapp
/Users/jd/Work/myapp    
/Users/jd/Library/Caches/gdb/bin/bash -c exec /Users/jd/Work/myapp
/Users/jd/Library/Caches/gdb/bin/bash -c exec /Users/jd/Work/myapp
/Users/jd/Work/myapp
/usr/local/bin/gdb --interpreter mi2 --nx
/usr/local/bin/gdb --interpreter mi2 --nx
/usr/local/bin/gdb --interpreter mi2 --nx
/usr/local/bin/gdb --interpreter mi2 --nx

可能是什么问题?是GDB还是Bash?

What could be the problem? Is it GDB or Bash?

修改

正在挂起的myapp进程具有TXs+状态,根据man ps页面的意思是:

The hanging myapp processes have a TXs+ state, which, according to man pspage means:

  • T,表示进程已停止
  • X,正在跟踪或调试过程
  • s,该过程是会议负责人
  • "+",该进程在其控制终端的前台进程组中

正在挂起的ggdb进程具有状态:

The hanging ggdbprocesses have a state:

  • S,睡眠少于20秒的进程(从不转为I,这意味着它空闲超过20秒的睡眠).

推荐答案

从问题的细节以及我过去对类似问题的经验来看,这就是我为您准备的一切,

From the details in the question and from my past experience of a similar issue this is all I have for you,

启动GDB后,我看到一条消息,启动gdb终止配置gdb".我的环境是带有Eclipse + gdb(从macports下载的ggdb)的Mac.

After starting GDB, I saw a message, "launching gdb aborting configuring gdb." My environment was Mac with Eclipse + gdb (ggdb downloaded from macports).

对我有用的临时解决方案是以ecroot作为根开始.

Temporary solution that worked for me was to start eclipse as root.

要永久解决此问题, 使用下面的链接查看如何创建证书或进行交叉检查(如果已配置)

To fix the issue permanenty, Use the below link to see how to create a certificate or cross check if already configured,

Mac C ++/Mars eclipse gdb调试在96%的启动测试中挂起

如果我上面的回答和链接没有帮助,请尝试在下面的eclipse论坛中检查您的问题并将其与发布的其他问题进行比较,看看您是否可以使用更多相关信息来进一步确定和解决该问题.

If my response above and link were not helpful then try the below eclipse forum to check and compare your problems to others posted and see if you can identify and curate the question further with more relevant info.

https://bugs.eclipse.org/bugs/show_bug.cgi ?id = 509737

这篇关于GDB/bin/bash无法在Eclipse CDT中执行该应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆