• GDB常用命令与Visual Studio对比


    GDB常用命令与Visual Studio对比

    命令名称GDBVisual Studio
    运行程序 runs [args] F5:Start Debugging (开始调试)
    启动程序 start [atgs] F10:Step over (逐过程)
    暂停 Ctrl+C Ctrl-Alt+Break:Break All (全部中断)
    继续运行 continue(cont, c) F5:Continue (继续)
    step over next F10:Step over (逐过程)
    step into step F11:Step into (逐语句)
    step out finish F11:Step into ; Shift+F11:Step out
    断点 break file:lineno 右击Breakpoint/Insert Breakpoint (断点/插入断点)
    跟踪点 watch file:lineno 右击Breakpoint/Insert Tracepoint (断点/插入跟踪点)
    观察点 watch expr Debug/New Bkpt/New Dat Bkpt (调试/新建断点/新建数据断点)
    栈跟踪 backtrace(bt), where Call Stack (条用堆栈)
    输出表达式 print expr Immediate Window (及时窗口)
    显示表达式 display expr Watch 监视窗口
    设置环境 set var var=expr Variables 变量窗口
    设置环境变量 set env var[=val] Properties/Debugging/Environment (属性/调试/环境)
    显示机器代码 disassemble 右击Go to Disassembly (转到反汇编)
    在机器代码中执行step-over nexti F10:Step over
    在机器代码中执行step-into stepi F11:Step into

    其他常用调试命令


    命令名称GDBVisual Studio
    命令名称 GDB Visual Studio
    条件断点 conditon bnum 右击Breakpoint/Condition
    事件断点 handle, signal Debug/Exceptions…(调试异常)
    异常断点 catch, throw  
    函数断点 break function Debug/New Bkpt/Break at function
    临时断点 tbreak  
    列出所有断点 info breakpoints F9:Debug/Toggle Brkp,断点窗口
    将命令连接到断点 command bnum 右击Brkp/When hit(断点/命中条件)
    输出到命令行 printf 右击Brkp/When hit(断点/命中条件)
    查找函数 info function expr Debug/New Brkp/Break at function
    调用函数 call expr  
    修改函数返回值 return expr Immediate Window
    输出类型 whatis arg 右击Go to Declaration(转到声明)
    输出类型描述 ptype arg 右击Go to Definition(转到定义)
    输出内存内容 x arg  
    选择帧栈 info fram, fram arg
  • 相关阅读:
    IOS开发之──应用之间调用(2)
    IOS开发之──应用之间调用(1)
    iOS中Cell高度如何能够自动适应需要显示的内容
    IOS仿Android九宫格解锁效果[转]
    开发一个iOS应用没有那么容易
    iOS的动画效果类型及实现方法
    IOS开发一些资源收集
    10大iOS开发者最喜爱的类库
    IOS键盘样式风格有关设置
    Ios拦截手机短信程序
  • 原文地址:https://www.cnblogs.com/cqx6388/p/14479446.html
Copyright © 2020-2023  润新知