Source string Read only

(itstool) path: sect3/screen
721/7210
Context English State
Examining a Core File with gdb
To examine a core file, start up <command>gdb</command> in the usual way. Instead of typing <command>break</command> or <command>run</command>, type
(gdb) <userinput>core <replaceable>progname</replaceable>.core</userinput>
If the core file is not in the current directory, type <userinput>dir /path/to/core/file</userinput> first.
The debugger should display something like this:
<prompt>%</prompt> <userinput>gdb <filename><replaceable>progname</replaceable></filename></userinput>
GDB is free software and you are welcome to 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.
GDB 4.13 (i386-unknown-freebsd), Copyright 1994 Free Software Foundation, Inc.
(gdb) <userinput>core <filename><replaceable>progname</replaceable>.core</filename></userinput>
Core was generated by `<filename><replaceable>progname</replaceable></filename>'.
Program terminated with signal 11, Segmentation fault.
Cannot access memory at address 0x7020796d.
#0 0x164a in bazz (anint=0x5) at temp.c:17
(gdb)
In this case, the program was called <filename><replaceable>progname</replaceable></filename>, so the core file is called <filename><replaceable>progname</replaceable>.core</filename>. We can see that the program crashed due to trying to access an area in memory that was not available to it in a function called <function>bazz</function>.
Sometimes it is useful to be able to see how a function was called, as the problem could have occurred a long way up the call stack in a complex program. <command>bt</command> causes <command>gdb</command> to print out a back-trace of the call stack:
(gdb) <userinput>bt</userinput>
#0 0x164a in bazz (anint=0x5) at temp.c:17
#1 0xefbfd888 in end ()
#2 0x162c in main () at temp.c:11
(gdb)
The <function>end()</function> function is called when a program crashes; in this case, the <function>bazz()</function> function was called from <function>main()</function>.
Attaching to a Running Program with gdb

Loading…

None

New source string

FreeBSD Doc / books_developers-handbookEnglish

New source string 2 weeks ago
Browse all component changes

Things to check

Multiple failing checks

The translations in several languages have failing checks

Reset

Glossary

English English
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect3/screen
Labels
No labels currently set.
Flags
no-wrap, read-only
Source string location
book.translate.xml:2212
Source string age
2 weeks ago
Translation file
, string 391