一万年来谁著史,三千里外欲封侯。这篇文章主要讲述GDB最常用的命令相关的知识,希望能为你提供帮助。
GDB 最常用的命令?b main? - Puts a breakpoint at the beginning of the program
?b? - Puts a breakpoint at the current line
?b N? - Puts a breakpoint at line N
?b +N? - Puts a breakpoint N lines down from the current line
?b fn? - Puts a breakpoint at the beginning of function "fn"
?d N? - Deletes breakpoint number N
?info break? - list breakpoints
?r? - Runs the program until a breakpoint or error
?c? - Continues running the program until the next breakpoint or error
?f? - Runs until the current function is finished
?s? - Runs the next line of the program
?s N? - Runs the next N lines of the program
?n? - Like s, but it does not step into functions
?u N? - Runs until you get N lines in front of the current line
?p var? - Prints the current value of the variable "var"
?bt? - Prints a stack trace
?u? - Goes up a level in the stack
?d? - Goes down a level in the stack
?q? - Quits gdb
【GDB最常用的命令】
推荐阅读
- Ubuntu查看网卡信息
- Ubuntu如何卸载cuda driver
- Ubuntu20.04+vscode快速调试ROS通用程序
- YoloV3源码解析(读取label)
- 文件和文件夹右键菜单添加自定义程序
- Mysql 数据库之高级操作
- #yyds干货盘点#K8S 之资源对象介绍
- Zabbix分布式系统监控+ 试验(搭建一个Zabbix服务器)
- linux的计划任务给大家奉上,希望大家可以多多点赞,收藏。总体感觉可以的话可以加一个关注哟!