关于 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...调试,
关于 cgdb & gdbtui 的输入scanf()问题的更多相关文章
- 关于C语言的输入-scanf、gets、getchar、getch、getline
找工作刷题,重拾C语言,发现对键盘输入掌握很生疏,现总结各类输入函数使用方法和注意事项如下. 1.scanf("格式说明",变量地址列表) scanf("%s" ...
- 【C语言】-数据输入-scanf( )和getchar( )
格式化输入函数scanf( ) scanf( )功能: 按照指定的格式读入键盘上输入的若干个任意类型的数据,存入到argument参数所指向的内存单元,函数返回值为读入并赋给argument的数据个数 ...
- Java中的输入"scanf",Scanner用法
1.输入程序 1)Scnner的初始用法: 1 import java.util.Scanner; 2 public class Textone { 3 public static void main ...
- (Go)06. Printf格式化输出、Scanf格式化输入详解
Print.Println .Printf .Sprintf .Fprintf都是fmt 包中的公共方法,在需要打印信息时需要用到这些函数,那么这些函数有什么区别呢? Print: 输出到控制台(不接 ...
- 【C/C++】【输入】关于scanf:输入空格,多次使用
一.C/C++中带空格字符串的输入 C++中的cin和C中的scanf都是遇到空格或回车结束. 如果要让scanf接收空格,可以用读入字符集合的方式.%[] char a[100]; scanf(&q ...
- scanf()格式化输入
scanf();有种带[]的格式化输出方式 此格式控制符的基本格式为:%[scanfset] #include<stdio.h> int main() { char str[100] ; ...
- 关于char类型的连续输入
这个忘了好久了 先回想吧 一 单字符 ① char m; scanf("%d",&m); ② char m; m=getchar(); putchar(m); 二 字符数 ...
- C语言 gets()和scanf()函数的区别
scanf( )函数和gets( )函数都可用于输入字符串,但在功能上有区别.若想从键盘上输入字符串"hi hello",则应该使用 gets 函数. gets可以接收空格:而sc ...
- 不可或缺 Windows Native (4) - C 语言: 预处理命令,输入,输出
[源码下载] 不可或缺 Windows Native (4) - C 语言: 预处理命令,输入,输出 作者:webabcd 介绍不可或缺 Windows Native 之 C 语言 预处理命令 输入 ...
随机推荐
- ASCII码排序 南阳acm4
ASCII码排序 时间限制:3000 ms | 内存限制:65535 KB 难度:2 描述 输入三个字符(可以重复)后,按各字符的ASCII码从小到大的顺序输出这三个字符. 输入 第一行输 ...
- NOI P1896 互不侵犯 状压DP
题目描述 在N×N的棋盘里面放K个国王,使他们互不攻击,共有多少种摆放方案.国王能攻击到它上下左右,以及左上左下右上右下八个方向上附近的各一个格子,共8个格子. 注:数据有加强(2018/4/25) ...
- Pandas 数值计算和统计基础
1.(1) # 基本参数:axis.skipna import numpy as np import pandas as pd df = pd.DataFrame({'key1':[4,5,3,np. ...
- javascript的js调用
本来从一开始接触编程开始,自己就一直写后端,但是对于前端真的不会,但是没办法呀,公司要做,所以,好吧,开始了写一写简单的javascript的内容其中,在xxx.jsp页面中出现了这个 <a c ...
- 菜鸟学Linux - Tarball安装的一般步骤
所谓的Tarball软件,实际上指的是从网络上下载到的源码包.通常是以.tar.gz和tar.bz2结尾.至于gz和bz2的区别在于压缩算法的不同(bz2的压缩效果好像好一些).源码包下载完成后,需要 ...
- cycling -avoid the vicious cycle
‘Numerous' studies in the past appear to have shown a link between cycling and ED. The researchers a ...
- 《Cracking the Coding Interview》——第11章:排序和搜索——题目8
2014-03-21 22:23 题目:假设你一开始有一个空数组,你在读入一些整数并将其插入到数组中,保证插入之后数组一直按升序排列.在读入的过程中,你还可以进行一种操作:查询某个值val是否存在于数 ...
- Pytest+allure+jenkins生成测试报告
allure集成jenkins下载地址.下载相关版本的allure包 http://updates.jenkins-ci.org/download/plugins/allure-jenkins-plu ...
- leetcode_day02
任务二:删除排序数组中的重复项 原文链接:https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array/ 最开始的解决思路: ...
- 【转】mysql 计划事件
转自:http://www.cnblogs.com/c840136/articles/2388512.html MySQL5.1.x版本中引入了一项新特性EVENT,顾名思义就是事件.定时任务机制,在 ...