gdb的使用资料
2、gdb core
用gdb同时调试一个运行程序和core文件,core是程序非法执行后core dump后产生的文件。
3、gdb
如果你的程序是一个服务程序,那么你可以指定这个服务程序运行时的进程ID。gdb会自动attach上去,并调试他。program应该在PATH环境变量中搜索得到。
GDB启动时,可以加上一些GDB的启动开关,详细的开关可以用gdb -help查看。我在下面只例举一些比较常用的参数:
-symbols
-s
从指定文件中读取符号表。
-se file
从指定文件中读取符号表信息,并把他用在可执行文件中。
-core
-c
调试时core dump的core文件。
-directory
-d
加入一个源文件的搜索路径。默认搜索路径是环境变量中PATH所定义的路径。
启动gdb后,就你被带入gdb的调试环境中,就可以使用gdb的命令开始调试程序了,gdb的命令可以使用help命令来查看,如下所示:
/home/hchen> gdb
GNU gdb 5.1.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-suse-linux".
(gdb) help
List of classes of commands:
aliases -- Aliases of other commands
breakpoints -- Making program stop at certain points
data -- Examining data
files -- Specifying and examining files
internals -- Maintenance commands
obscure -- Obscure features
running -- Running the program
stack -- Examining the stack
status -- Status inquiries
support -- Support facilities
tracepoints -- Tracing of program execution without stopping the program
user-defined -- User-defined commands
Type
GDB 中文手册 网上下载的,无偿共享,建议下载后评分,因为评分可以给自己加财富值(本胖经验,百 度文库规则是评分每次加 1 财富值,每天封顶 5 分。。) 时间:...
[转]GDB 使用手册(中文版) START-INFO-DIR-ENTRY * Gdb: (gdb). The GNU debugger. END-INFO-DIR-ENTRY This file documents the GNU debugger GDB. This...
GDB手册中文版_IT/计算机_专业资料。GDB中文手册GDB 用户手册目录目录 ... 1 摘要 ......
GDB中文手册_IT/计算机_专业资料。GDB中文手册使用GDB 一般来说 GDB 主要调试的是 C/C++的程序。要调试 C/C++的程序,首先在编译时,我们必须 要把调试信息加到...
GDB 使用手册(转自 http://baike.baidu.com/view/639266.htm) GDB 是 GNU ... gdb中文使用手册 15页 2下载券 喜欢此文档的还喜欢 linux下GDB教程 26页 1...
GDB使用手册_电力/水利_工程科技_专业资料。GDB使用手册GDB Manual 15 1 15.... gdb中文使用手册 15页 2下载券 喜欢此文档的还喜欢 linux下GDB教程 26页 1...
GDB使用手册.txt GDB Manual 15 1 15.1 Commands to specify files 指定文件... gdb中文使用手册 15页 2下载券 GDB调试的使用手册 17页 1下载券 GDB调试器...
GDB调试手册_IT/计算机_专业资料。GDB 中文手册 /***/ 用 GDB 调试程序 GDB 概述 2 使用 GDB 5 GDB 中运GDB 中文手册 /***/ 用 GDB 调试程序 GDB ...
GDB中文手册 30页 免费GDB不完全手册 暂无评价0人阅读0次下载举报文档不完全手册 GDB 不完全手册巫山霏云使用 GDB 调试程序...
热门文档