The next set of GDB definitions to incorporate into your.gdbinit file display useful process information when they're invoked, as shown in Listing 2.
要整合到.gdbinit文件中的下一组gdb定义将在进程被调用时显示有用的进程信息,如清单2所示。
If you have an older version of FreeBSD, you can still use GDB -k to read a core dump file.
如果您有早期版本的FreeBSD,那么仍然可以使用gdb- k来读取核心转储文件。
Listing 9 displays a GDB exception after the mount command to the file system is issued.
清单9在向文件系统发出mount命令之后显示一个gdb异常。
Running programs under GDB makes for easier bug trapping, but usually a program will die outside of the debugger leaving only a core file.
在gd b下运行程序可以使俘获错误变得更容易,但在调试器外运行的程序通常会中止而只留下一个core文件。
When GDB, the GNU Project Debugger, starts up, it looks for a file in the current user's home directory called .
当GDB(即 GNUProjectDebugger)启动时,它在当前用户的主目录中寻找一个名为 .gdbinit 的文件;
After you type the code into the.gdbinit file, fire up GDB and enter the CLS command.
在将该代码键入.gdbinit文件以后,调出gdb并输入cls命令。
If the GDB debugger is able to read the core file, it indicates the address where the failure occurred (for example, Segmentation fault in function_name at 0x10001234).
如果gd b调试器可以读取core文件,它就可以分析出失效发生的地址(例如,Segmentationfault in function_nameat0x10001234)。
To debug with a core file, you need the program executable and source files, as well as the core file. To start GDB with a core file, use the -c option.
要用核心文件进行调试,您不仅需要程序的可执行文件和源文件,还需要核心文件本身。
Start the gdb debugger in the directory where the core file was created
在产生core文件的目录中启动gdb调试器
The resulting file, called gdb-ui.el, tries to use all of these features as well as those in gdba.el.
其成果gdb-ui.el尝试使用这些 新特性,以及gdba.el中的那些特性。
In that case, GDB can fetch values from these sections out of the object file, rather than from the target program.
在这种情况下,GDB可以从对象文件之外的这些段获取变数值,而不是从目标程序。
All file-specifying commands allow both absolute and relative file names as arguments. GDB always converts the file name to an absolute file name and remembers it that way.
所有指定文件的命令允许用绝对路径或相对路径作为参数。GDB总是把他们转换为相对文件名,并且记住他们。
GDB can access the executable file itself for other parts.
GDB可以访问可执行文件以得到其他的部分。
GDB checks under each of these names for a debugging information file whose checksum matches that given in the link, and reads the debugging information from the first one it finds.
GDB检查所给链接中校验数匹配的调试信息文件,检查这些名称,并从找到的第一个文件中读取调试信息。
GDB checks under each of these names for a debugging information file whose checksum matches that given in the link, and reads the debugging information from the first one it finds.
GDB检查所给链接中校验数匹配的调试信息文件,检查这些名称,并从找到的第一个文件中读取调试信息。
应用推荐