关于 cgdb & gdbtui 的输入scanf()问题

使用cgdb 和 gdbtui 调试程序时, 遇到scanf函数时 it seems to enter into an infinite loop

According to the info page of cgdb, you need to either:

  • start the program on one terminal, and attach to it with CGDB from another terminal
  • or pass arguments using the tty window

To invoke the tty window, hit 'T' in command mode (escape)

Extracted from the info page:

Sending I/O to the program being debugged

This technique is similar to getting in and out of "GDB mode". The tty window is not visible by default. This is because it is only needed if the user wishes to send data to the program being debugged. To display the tty window, hit `T' while in command mode.

调试到scanf 这行, 进入命令模式(ESC), T 会出现 tty window, 输入要发送给IO的数据, 推出此模式(ESC), 继续n...调试,

 

posted on 2017-01-24 00:42 桑海 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/sanghai/p/6345606.html

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值