• 【应用】Linux内存调试工具:gdb 命令大全


    ALL GDB commands:

    COMMANDDESCRIPTION
    help List gdb command categories
    help category List gdb commands of category
    help command Displays description of command
    apropos search-word Display commands list containing search-word in their help description
    info args
    i args
    Displays arguments of current function
    info breakpoints
    info break
    info b
    i b
    Displays list of breakpoints
    info break breakpoint-number
    i b breakpoint-number
    Displays description of breakpoint having breakpoint-number
    info watchpoints
    i watchpoints
    Displays list of watchpoints
    info registers
    i r
    Display processor's register contents
    info threads
    i threads
    Display information about current thread
    info set
    i set
    List set-able options
    r Start running program until a breakpoint or end of program
    Breakpoints and Watchpoints
    break funname
    break line-no
    break ClassName::funcName
    Set a breakpoint at specified function or line number.
    break +line-offset
    break -line-offset
    Set a breakpoint at specified number of lines forward or backward from current line of execution.
    break filename:funcname Set a breapoint at specified funcname of given filename.
    break filename:line-no Set a breakpoint at given line-no of specified filename.
    break *address Set a breakpoint at specified instrunction address.
    break line-no if condition Set a conditional breakpoint at line-no of current file. Program will suspend only when condition is true.
    break line thread thread-no Set a breakpoint at line in thread with thread-no.
    tbreak tbreak is similar to break but it will temporary breakpoint. i.e. Breakpoint will be deleted once it is hit.
    watch condition Set a watchpoint for given condition. Program will suspend when condition is true.
    clear
    clear function
    clear line-number
    Delete breakpoints as identified by command option.
    Delete all breakpoints in function
    Delete breakpoints at given line
    delete Delete all breakpoints, watchpoints, or catchpoints.
    delete breakpoint-number
    delete range
    Delete the breakpoints, watchpoints, or catchpoints specified by number or ranges.
    disable breakpoint-number
    disable range
    enable breakpoint-number
    enable range
    Enable/Disable breakpoints, watchpoints or catchpoints specified by number or ranges.
    enable breakpoint-number once Enables given breakpoint once. And disables it after it is hit.
    Program Execution
    continue
    c
    Continues/Resumes running the program until the next breakpoint or end of program
    continue number Continue but ignore current breakpoint  number times.
    finish Continue until the current function is finished
    step Runs the next line of the program
    step N Runs the next N lines of program
    next Like s, but it does not step into functions
    print var Prints the current value of the variable "var"
    set var=val Assign "val" value to the variable "var"
    backtrace Prints a stack trace
    q Quit from gdb

    From:www.gdbtutorial.com/gdb_commands

  • 相关阅读:
    【转】C#使用PrintDocument打印 多页 打印预览
    【转】线程间操作无效: 从不是创建控件“textBox2” 的线程访问它。
    C# 定时执行方法: System.Timers.Timer用法示例
    SQL查找数据库中所有没有主键的数据表脚本
    linux之shell编程基本语法
    Linux之shell编程条件判断-if,while,for,case
    Linux之shell编程函数使用
    2.sparkSQL--DataFrames与RDDs的相互转换
    Spark2.1集群安装(standalone模式)
    storm1.0节点间消息传递过久分析及调优
  • 原文地址:https://www.cnblogs.com/GyForever1004/p/13940771.html
Copyright © 2020-2023  润新知