zoukankan      html  css  js  c++  java
  • 关于 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...调试,

  • 相关阅读:
    HandlerThread
    handler原理
    死锁简析
    Android序列化
    AsyncTask原理
    【java线程池】
    java创建线程的三种方式
    service相关
    【hashMap】详谈
    【activity任务栈】浅析
  • 原文地址:https://www.cnblogs.com/sanghai/p/6345606.html
Copyright © 2011-2022 走看看