aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Koshy <jkoshy@FreeBSD.org>2000-11-07 09:08:11 +0000
committerJoseph Koshy <jkoshy@FreeBSD.org>2000-11-07 09:08:11 +0000
commit48531a3b884d7be4110e4c840942ecaf874c36c0 (patch)
tree3ace6d0ab9b3712377b0a9c10c16fe6b2f4ed02e
parent35d4754b89852508fdb15be20bac75e05dfb7415 (diff)
downloaddoc-48531a3b884d7be4110e4c840942ecaf874c36c0.tar.gz
doc-48531a3b884d7be4110e4c840942ecaf874c36c0.zip
GDB now needs an explicit `-k' option to switch to kernel debugging mode. The
tactic of invoking GDB under the name of `kgdb' has not worked for a while. Correct the `Kernel Debugging' chapter of the Handbook to reflect this change. Reviewed by: ben
Notes
Notes: svn path=/head/; revision=8308
-rw-r--r--en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml37
-rw-r--r--en_US.ISO8859-1/books/handbook/kerneldebug/chapter.sgml37
-rw-r--r--en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml37
3 files changed, 51 insertions, 60 deletions
diff --git a/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml b/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml
index 3f531f70c7..4cf1b19f75 100644
--- a/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml
+++ b/en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml
@@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
- $FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.24 2000/06/14 00:47:36 jim Exp $
+ $FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.25 2000/07/14 21:57:34 ben Exp $
-->
<chapter id="kerneldebug">
@@ -10,7 +10,7 @@
<para><emphasis>Contributed by &a.paul; and &a.joerg;</emphasis></para>
<sect1>
- <title>Debugging a Kernel Crash Dump with <command>kgdb</command></title>
+ <title>Debugging a Kernel Crash Dump with <command>gdb</command></title>
<para>Here are some instructions for getting kernel debugging working on a
crash dump. They assume that you have enough swap space for a crash
@@ -23,7 +23,7 @@
<filename>/etc/rc.conf</filename>. Typically you want to specify one of
the swap devices specified in <filename>/etc/fstab</filename>. Dumps to
non-swap devices, tapes for example, are currently not supported. Config
- your kernel using <command>config -g</command>. See <link
+ your kernel using <command>config <option>-g</option></command>. See <link
linkend="kernelconfig">Kernel Configuration</link> for details on
configuring the FreeBSD kernel.</para>
@@ -37,15 +37,12 @@
you want a crash dump from a kernel that crashes during booting.</para>
<note>
- <para>In the following, the term <command>kgdb</command> refers to
- <command>gdb</command> run in <quote>kernel debug mode</quote>. This
- can be accomplished by either starting the <command>gdb</command> with
- the option <option>-k</option>, or by linking and starting it under
- the name <command>kgdb</command>. This is not being done by default,
- however, and the idea is basically deprecated since the GNU folks do
- not like their tools to behave differently when called by another
- name. This feature may well be discontinued in further
- releases.</para>
+ <para>In the following, the term <command>gdb</command> refers to
+ the debugger <command>gdb</command> run in <quote>kernel debug
+ mode</quote>. This can be accomplished by starting the
+ <command>gdb</command> with the option <option>-k</option>. In
+ kernel debug mode, <command>gdb</command> changes its prompt to
+ <prompt>(kgdb)</prompt>.</para>
</note>
<tip>
@@ -89,7 +86,7 @@
<para>Now, after a crash dump, go to
<filename>/sys/compile/WHATEVER</filename> and run
- <command>kgdb</command>. From <command>kgdb</command> do:
+ <command>gdb <option>-k</option></command>. From <command>gdb</command> do:
<screen><userinput>symbol-file kernel.debug</userinput>
<userinput>exec-file /var/crash/kernel.0</userinput>
@@ -98,7 +95,7 @@
and voila, you can debug the crash dump using the kernel sources just
like you can for any other program.</para>
- <para>Here is a script log of a <command>kgdb</command> session
+ <para>Here is a script log of a <command>gdb</command> session
illustrating the procedure. Long lines have been folded to improve
readability, and the lines are numbered for reference. Despite this, it
is a real-world error trace taken during the development of the pcvt
@@ -106,7 +103,7 @@
<screen> 1:Script started on Fri Dec 30 23:15:22 1994
2:&prompt.root; <userinput>cd /sys/compile/URIAH</userinput>
- 3:&prompt.root; <userinput>kgdb kernel /var/crash/vmcore.1</userinput>
+ 3:&prompt.root; <userinput>gdb -k kernel /var/crash/vmcore.1</userinput>
4:Reading symbol data from /usr/src/sys/compile/URIAH/kernel
...done.
5:IdlePTD 1f3000
@@ -291,7 +288,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</
might be incomplete for some places, as can be seen in the stack trace
in the example above where some functions are displayed without line
numbers and argument lists. If you need more debugging symbols, remove
- the appropriate object files and repeat the <command>kgdb</command>
+ the appropriate object files and repeat the <command>gdb <option>-k</option></command>
session until you know enough.</para>
<para>All this is not guaranteed to work, but it will do it fine in most
@@ -301,7 +298,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</
<sect1>
<title>On-Line Kernel Debugging Using DDB</title>
- <para>While <command>kgdb</command> as an off-line debugger provides a very
+ <para>While <command>gdb <option>-k</option></command> as an off-line debugger provides a very
high level of user interface, there are some things it cannot do. The
most important ones being breakpointing and single-stepping kernel
code.</para>
@@ -311,7 +308,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</
breakpoints, single-stepping kernel functions, examining and changing
kernel variables, etc. However, it cannot access kernel source files,
and only has access to the global and static symbols, not to the full
- debug information like <command>kgdb</command>.</para>
+ debug information like <command>gdb</command>.</para>
<para>To configure your kernel to include DDB, add the option line
@@ -467,7 +464,7 @@ options DDB</programlisting>
<screen><userinput>panic</userinput></screen>
<para>This will cause your kernel to dump core and reboot, so you can
- later analyze the core on a higher level with kgdb. This command
+ later analyze the core on a higher level with <command>gdb</command>. This command
usually must be followed by another <command>continue</command>
statement.</para>
@@ -517,7 +514,7 @@ options DDB</programlisting>
of the target machine that has "flags 080" set on its sio device
to any serial line of the debugging host.
Now, on the debugging machine, go to the compile directory of the target
- kernel, and start gdb:</para>
+ kernel, and start <command>gdb</command>:</para>
<screen>&prompt.user; <userinput>gdb -k kernel</userinput>
GDB is free software and you are welcome to distribute copies of it
diff --git a/en_US.ISO8859-1/books/handbook/kerneldebug/chapter.sgml b/en_US.ISO8859-1/books/handbook/kerneldebug/chapter.sgml
index 3f531f70c7..4cf1b19f75 100644
--- a/en_US.ISO8859-1/books/handbook/kerneldebug/chapter.sgml
+++ b/en_US.ISO8859-1/books/handbook/kerneldebug/chapter.sgml
@@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
- $FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.24 2000/06/14 00:47:36 jim Exp $
+ $FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.25 2000/07/14 21:57:34 ben Exp $
-->
<chapter id="kerneldebug">
@@ -10,7 +10,7 @@
<para><emphasis>Contributed by &a.paul; and &a.joerg;</emphasis></para>
<sect1>
- <title>Debugging a Kernel Crash Dump with <command>kgdb</command></title>
+ <title>Debugging a Kernel Crash Dump with <command>gdb</command></title>
<para>Here are some instructions for getting kernel debugging working on a
crash dump. They assume that you have enough swap space for a crash
@@ -23,7 +23,7 @@
<filename>/etc/rc.conf</filename>. Typically you want to specify one of
the swap devices specified in <filename>/etc/fstab</filename>. Dumps to
non-swap devices, tapes for example, are currently not supported. Config
- your kernel using <command>config -g</command>. See <link
+ your kernel using <command>config <option>-g</option></command>. See <link
linkend="kernelconfig">Kernel Configuration</link> for details on
configuring the FreeBSD kernel.</para>
@@ -37,15 +37,12 @@
you want a crash dump from a kernel that crashes during booting.</para>
<note>
- <para>In the following, the term <command>kgdb</command> refers to
- <command>gdb</command> run in <quote>kernel debug mode</quote>. This
- can be accomplished by either starting the <command>gdb</command> with
- the option <option>-k</option>, or by linking and starting it under
- the name <command>kgdb</command>. This is not being done by default,
- however, and the idea is basically deprecated since the GNU folks do
- not like their tools to behave differently when called by another
- name. This feature may well be discontinued in further
- releases.</para>
+ <para>In the following, the term <command>gdb</command> refers to
+ the debugger <command>gdb</command> run in <quote>kernel debug
+ mode</quote>. This can be accomplished by starting the
+ <command>gdb</command> with the option <option>-k</option>. In
+ kernel debug mode, <command>gdb</command> changes its prompt to
+ <prompt>(kgdb)</prompt>.</para>
</note>
<tip>
@@ -89,7 +86,7 @@
<para>Now, after a crash dump, go to
<filename>/sys/compile/WHATEVER</filename> and run
- <command>kgdb</command>. From <command>kgdb</command> do:
+ <command>gdb <option>-k</option></command>. From <command>gdb</command> do:
<screen><userinput>symbol-file kernel.debug</userinput>
<userinput>exec-file /var/crash/kernel.0</userinput>
@@ -98,7 +95,7 @@
and voila, you can debug the crash dump using the kernel sources just
like you can for any other program.</para>
- <para>Here is a script log of a <command>kgdb</command> session
+ <para>Here is a script log of a <command>gdb</command> session
illustrating the procedure. Long lines have been folded to improve
readability, and the lines are numbered for reference. Despite this, it
is a real-world error trace taken during the development of the pcvt
@@ -106,7 +103,7 @@
<screen> 1:Script started on Fri Dec 30 23:15:22 1994
2:&prompt.root; <userinput>cd /sys/compile/URIAH</userinput>
- 3:&prompt.root; <userinput>kgdb kernel /var/crash/vmcore.1</userinput>
+ 3:&prompt.root; <userinput>gdb -k kernel /var/crash/vmcore.1</userinput>
4:Reading symbol data from /usr/src/sys/compile/URIAH/kernel
...done.
5:IdlePTD 1f3000
@@ -291,7 +288,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</
might be incomplete for some places, as can be seen in the stack trace
in the example above where some functions are displayed without line
numbers and argument lists. If you need more debugging symbols, remove
- the appropriate object files and repeat the <command>kgdb</command>
+ the appropriate object files and repeat the <command>gdb <option>-k</option></command>
session until you know enough.</para>
<para>All this is not guaranteed to work, but it will do it fine in most
@@ -301,7 +298,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</
<sect1>
<title>On-Line Kernel Debugging Using DDB</title>
- <para>While <command>kgdb</command> as an off-line debugger provides a very
+ <para>While <command>gdb <option>-k</option></command> as an off-line debugger provides a very
high level of user interface, there are some things it cannot do. The
most important ones being breakpointing and single-stepping kernel
code.</para>
@@ -311,7 +308,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</
breakpoints, single-stepping kernel functions, examining and changing
kernel variables, etc. However, it cannot access kernel source files,
and only has access to the global and static symbols, not to the full
- debug information like <command>kgdb</command>.</para>
+ debug information like <command>gdb</command>.</para>
<para>To configure your kernel to include DDB, add the option line
@@ -467,7 +464,7 @@ options DDB</programlisting>
<screen><userinput>panic</userinput></screen>
<para>This will cause your kernel to dump core and reboot, so you can
- later analyze the core on a higher level with kgdb. This command
+ later analyze the core on a higher level with <command>gdb</command>. This command
usually must be followed by another <command>continue</command>
statement.</para>
@@ -517,7 +514,7 @@ options DDB</programlisting>
of the target machine that has "flags 080" set on its sio device
to any serial line of the debugging host.
Now, on the debugging machine, go to the compile directory of the target
- kernel, and start gdb:</para>
+ kernel, and start <command>gdb</command>:</para>
<screen>&prompt.user; <userinput>gdb -k kernel</userinput>
GDB is free software and you are welcome to distribute copies of it
diff --git a/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml b/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml
index 3f531f70c7..4cf1b19f75 100644
--- a/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml
+++ b/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml
@@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
- $FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.24 2000/06/14 00:47:36 jim Exp $
+ $FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.25 2000/07/14 21:57:34 ben Exp $
-->
<chapter id="kerneldebug">
@@ -10,7 +10,7 @@
<para><emphasis>Contributed by &a.paul; and &a.joerg;</emphasis></para>
<sect1>
- <title>Debugging a Kernel Crash Dump with <command>kgdb</command></title>
+ <title>Debugging a Kernel Crash Dump with <command>gdb</command></title>
<para>Here are some instructions for getting kernel debugging working on a
crash dump. They assume that you have enough swap space for a crash
@@ -23,7 +23,7 @@
<filename>/etc/rc.conf</filename>. Typically you want to specify one of
the swap devices specified in <filename>/etc/fstab</filename>. Dumps to
non-swap devices, tapes for example, are currently not supported. Config
- your kernel using <command>config -g</command>. See <link
+ your kernel using <command>config <option>-g</option></command>. See <link
linkend="kernelconfig">Kernel Configuration</link> for details on
configuring the FreeBSD kernel.</para>
@@ -37,15 +37,12 @@
you want a crash dump from a kernel that crashes during booting.</para>
<note>
- <para>In the following, the term <command>kgdb</command> refers to
- <command>gdb</command> run in <quote>kernel debug mode</quote>. This
- can be accomplished by either starting the <command>gdb</command> with
- the option <option>-k</option>, or by linking and starting it under
- the name <command>kgdb</command>. This is not being done by default,
- however, and the idea is basically deprecated since the GNU folks do
- not like their tools to behave differently when called by another
- name. This feature may well be discontinued in further
- releases.</para>
+ <para>In the following, the term <command>gdb</command> refers to
+ the debugger <command>gdb</command> run in <quote>kernel debug
+ mode</quote>. This can be accomplished by starting the
+ <command>gdb</command> with the option <option>-k</option>. In
+ kernel debug mode, <command>gdb</command> changes its prompt to
+ <prompt>(kgdb)</prompt>.</para>
</note>
<tip>
@@ -89,7 +86,7 @@
<para>Now, after a crash dump, go to
<filename>/sys/compile/WHATEVER</filename> and run
- <command>kgdb</command>. From <command>kgdb</command> do:
+ <command>gdb <option>-k</option></command>. From <command>gdb</command> do:
<screen><userinput>symbol-file kernel.debug</userinput>
<userinput>exec-file /var/crash/kernel.0</userinput>
@@ -98,7 +95,7 @@
and voila, you can debug the crash dump using the kernel sources just
like you can for any other program.</para>
- <para>Here is a script log of a <command>kgdb</command> session
+ <para>Here is a script log of a <command>gdb</command> session
illustrating the procedure. Long lines have been folded to improve
readability, and the lines are numbered for reference. Despite this, it
is a real-world error trace taken during the development of the pcvt
@@ -106,7 +103,7 @@
<screen> 1:Script started on Fri Dec 30 23:15:22 1994
2:&prompt.root; <userinput>cd /sys/compile/URIAH</userinput>
- 3:&prompt.root; <userinput>kgdb kernel /var/crash/vmcore.1</userinput>
+ 3:&prompt.root; <userinput>gdb -k kernel /var/crash/vmcore.1</userinput>
4:Reading symbol data from /usr/src/sys/compile/URIAH/kernel
...done.
5:IdlePTD 1f3000
@@ -291,7 +288,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</
might be incomplete for some places, as can be seen in the stack trace
in the example above where some functions are displayed without line
numbers and argument lists. If you need more debugging symbols, remove
- the appropriate object files and repeat the <command>kgdb</command>
+ the appropriate object files and repeat the <command>gdb <option>-k</option></command>
session until you know enough.</para>
<para>All this is not guaranteed to work, but it will do it fine in most
@@ -301,7 +298,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</
<sect1>
<title>On-Line Kernel Debugging Using DDB</title>
- <para>While <command>kgdb</command> as an off-line debugger provides a very
+ <para>While <command>gdb <option>-k</option></command> as an off-line debugger provides a very
high level of user interface, there are some things it cannot do. The
most important ones being breakpointing and single-stepping kernel
code.</para>
@@ -311,7 +308,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols</
breakpoints, single-stepping kernel functions, examining and changing
kernel variables, etc. However, it cannot access kernel source files,
and only has access to the global and static symbols, not to the full
- debug information like <command>kgdb</command>.</para>
+ debug information like <command>gdb</command>.</para>
<para>To configure your kernel to include DDB, add the option line
@@ -467,7 +464,7 @@ options DDB</programlisting>
<screen><userinput>panic</userinput></screen>
<para>This will cause your kernel to dump core and reboot, so you can
- later analyze the core on a higher level with kgdb. This command
+ later analyze the core on a higher level with <command>gdb</command>. This command
usually must be followed by another <command>continue</command>
statement.</para>
@@ -517,7 +514,7 @@ options DDB</programlisting>
of the target machine that has "flags 080" set on its sio device
to any serial line of the debugging host.
Now, on the debugging machine, go to the compile directory of the target
- kernel, and start gdb:</para>
+ kernel, and start <command>gdb</command>:</para>
<screen>&prompt.user; <userinput>gdb -k kernel</userinput>
GDB is free software and you are welcome to distribute copies of it