aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook
diff options
context:
space:
mode:
authorGraham Whaley <graham.whaley@linux.intel.com>2015-02-03 11:38:02 -0500
committerJonathan Corbet <corbet@lwn.net>2015-02-04 16:17:37 -0500
commitbb485c289ce8902807d20ffedeceb91640c4d317 (patch)
tree843c5c244ca33ca93bf40c5664cfa26add904f93 /Documentation/DocBook
parent9ed330d39ee9e589d6a54e6b020ae1e14b7eca8b (diff)
kgdb,docs: Fix typo and minor style issues
Fix up a number of small typos, duplications and formatting issues. Signed-off-by: Graham Whaley <graham.whaley@linux.intel.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> [jc: did s/kgdbdoc/kgdboc/] Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r--Documentation/DocBook/kgdb.tmpl81
1 files changed, 41 insertions, 40 deletions
diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl
index f77358f96930..2428cc04dbc8 100644
--- a/Documentation/DocBook/kgdb.tmpl
+++ b/Documentation/DocBook/kgdb.tmpl
@@ -75,7 +75,7 @@
75 a development machine and the other is the target machine. The 75 a development machine and the other is the target machine. The
76 kernel to be debugged runs on the target machine. The development 76 kernel to be debugged runs on the target machine. The development
77 machine runs an instance of gdb against the vmlinux file which 77 machine runs an instance of gdb against the vmlinux file which
78 contains the symbols (not boot image such as bzImage, zImage, 78 contains the symbols (not a boot image such as bzImage, zImage,
79 uImage...). In gdb the developer specifies the connection 79 uImage...). In gdb the developer specifies the connection
80 parameters and connects to kgdb. The type of connection a 80 parameters and connects to kgdb. The type of connection a
81 developer makes with gdb depends on the availability of kgdb I/O 81 developer makes with gdb depends on the availability of kgdb I/O
@@ -95,7 +95,7 @@
95 <title>Kernel config options for kgdb</title> 95 <title>Kernel config options for kgdb</title>
96 <para> 96 <para>
97 To enable <symbol>CONFIG_KGDB</symbol> you should look under 97 To enable <symbol>CONFIG_KGDB</symbol> you should look under
98 "Kernel debugging" and select "KGDB: kernel debugger". 98 "Kernel hacking" / "Kernel debugging" and select "KGDB: kernel debugger".
99 </para> 99 </para>
100 <para> 100 <para>
101 While it is not a hard requirement that you have symbols in your 101 While it is not a hard requirement that you have symbols in your
@@ -105,7 +105,7 @@
105 kernel with debug info" in the config menu. 105 kernel with debug info" in the config menu.
106 </para> 106 </para>
107 <para> 107 <para>
108 It is advised, but not required that you turn on the 108 It is advised, but not required, that you turn on the
109 <symbol>CONFIG_FRAME_POINTER</symbol> kernel option which is called "Compile the 109 <symbol>CONFIG_FRAME_POINTER</symbol> kernel option which is called "Compile the
110 kernel with frame pointers" in the config menu. This option 110 kernel with frame pointers" in the config menu. This option
111 inserts code to into the compiled executable which saves the frame 111 inserts code to into the compiled executable which saves the frame
@@ -181,7 +181,7 @@
181 <para>This section describes the various runtime kernel 181 <para>This section describes the various runtime kernel
182 parameters that affect the configuration of the kernel debugger. 182 parameters that affect the configuration of the kernel debugger.
183 The following chapter covers using kdb and kgdb as well as 183 The following chapter covers using kdb and kgdb as well as
184 provides some examples of the configuration parameters.</para> 184 providing some examples of the configuration parameters.</para>
185 <sect1 id="kgdboc"> 185 <sect1 id="kgdboc">
186 <title>Kernel parameter: kgdboc</title> 186 <title>Kernel parameter: kgdboc</title>
187 <para>The kgdboc driver was originally an abbreviation meant to 187 <para>The kgdboc driver was originally an abbreviation meant to
@@ -219,8 +219,8 @@
219 <listitem><para>kbd = Keyboard</para></listitem> 219 <listitem><para>kbd = Keyboard</para></listitem>
220 </itemizedlist> 220 </itemizedlist>
221 </para> 221 </para>
222 <para>You can configure kgdboc to use the keyboard, and or a serial 222 <para>You can configure kgdboc to use the keyboard, and/or a serial
223 device depending on if you are using kdb and or kgdb, in one of the 223 device depending on if you are using kdb and/or kgdb, in one of the
224 following scenarios. The order listed above must be observed if 224 following scenarios. The order listed above must be observed if
225 you use any of the optional configurations together. Using kms + 225 you use any of the optional configurations together. Using kms +
226 only gdb is generally not a useful combination.</para> 226 only gdb is generally not a useful combination.</para>
@@ -261,11 +261,8 @@
261 </sect3> 261 </sect3>
262 <sect3 id="kgdbocArgs3"> 262 <sect3 id="kgdbocArgs3">
263 <title>More examples</title> 263 <title>More examples</title>
264 <para>You can configure kgdboc to use the keyboard, and or a serial 264 <para>You can configure kgdboc to use the keyboard, and/or a serial device
265 device depending on if you are using kdb and or kgdb, in one of the 265 depending on if you are using kdb and/or kgdb, in one of the
266 following scenarios.</para>
267 <para>You can configure kgdboc to use the keyboard, and or a serial device
268 depending on if you are using kdb and or kgdb, in one of the
269 following scenarios. 266 following scenarios.
270 <orderedlist> 267 <orderedlist>
271 <listitem><para>kdb and kgdb over only a serial port</para> 268 <listitem><para>kdb and kgdb over only a serial port</para>
@@ -315,7 +312,7 @@
315 <para> 312 <para>
316 The Kernel command line option <constant>kgdbwait</constant> makes 313 The Kernel command line option <constant>kgdbwait</constant> makes
317 kgdb wait for a debugger connection during booting of a kernel. You 314 kgdb wait for a debugger connection during booting of a kernel. You
318 can only use this option you compiled a kgdb I/O driver into the 315 can only use this option if you compiled a kgdb I/O driver into the
319 kernel and you specified the I/O driver configuration as a kernel 316 kernel and you specified the I/O driver configuration as a kernel
320 command line option. The kgdbwait parameter should always follow the 317 command line option. The kgdbwait parameter should always follow the
321 configuration parameter for the kgdb I/O driver in the kernel 318 configuration parameter for the kgdb I/O driver in the kernel
@@ -354,7 +351,7 @@
354 </listitem> 351 </listitem>
355 </orderedlist> 352 </orderedlist>
356 <para>IMPORTANT NOTE: You cannot use kgdboc + kgdbcon on a tty that is an 353 <para>IMPORTANT NOTE: You cannot use kgdboc + kgdbcon on a tty that is an
357 active system console. An example incorrect usage is <constant>console=ttyS0,115200 kgdboc=ttyS0 kgdbcon</constant> 354 active system console. An example of incorrect usage is <constant>console=ttyS0,115200 kgdboc=ttyS0 kgdbcon</constant>
358 </para> 355 </para>
359 <para>It is possible to use this option with kgdboc on a tty that is not a system console. 356 <para>It is possible to use this option with kgdboc on a tty that is not a system console.
360 </para> 357 </para>
@@ -386,12 +383,12 @@
386 <title>Quick start for kdb on a serial port</title> 383 <title>Quick start for kdb on a serial port</title>
387 <para>This is a quick example of how to use kdb.</para> 384 <para>This is a quick example of how to use kdb.</para>
388 <para><orderedlist> 385 <para><orderedlist>
389 <listitem><para>Boot kernel with arguments: 386 <listitem><para>Configure kgdboc at boot using kernel parameters:
390 <itemizedlist> 387 <itemizedlist>
391 <listitem><para><constant>console=ttyS0,115200 kgdboc=ttyS0,115200</constant></para></listitem> 388 <listitem><para><constant>console=ttyS0,115200 kgdboc=ttyS0,115200</constant></para></listitem>
392 </itemizedlist></para> 389 </itemizedlist></para>
393 <para>OR</para> 390 <para>OR</para>
394 <para>Configure kgdboc after the kernel booted; assuming you are using a serial port console: 391 <para>Configure kgdboc after the kernel has booted; assuming you are using a serial port console:
395 <itemizedlist> 392 <itemizedlist>
396 <listitem><para><constant>echo ttyS0 &gt; /sys/module/kgdboc/parameters/kgdboc</constant></para></listitem> 393 <listitem><para><constant>echo ttyS0 &gt; /sys/module/kgdboc/parameters/kgdboc</constant></para></listitem>
397 </itemizedlist> 394 </itemizedlist>
@@ -442,12 +439,12 @@
442 <title>Quick start for kdb using a keyboard connected console</title> 439 <title>Quick start for kdb using a keyboard connected console</title>
443 <para>This is a quick example of how to use kdb with a keyboard.</para> 440 <para>This is a quick example of how to use kdb with a keyboard.</para>
444 <para><orderedlist> 441 <para><orderedlist>
445 <listitem><para>Boot kernel with arguments: 442 <listitem><para>Configure kgdboc at boot using kernel parameters:
446 <itemizedlist> 443 <itemizedlist>
447 <listitem><para><constant>kgdboc=kbd</constant></para></listitem> 444 <listitem><para><constant>kgdboc=kbd</constant></para></listitem>
448 </itemizedlist></para> 445 </itemizedlist></para>
449 <para>OR</para> 446 <para>OR</para>
450 <para>Configure kgdboc after the kernel booted: 447 <para>Configure kgdboc after the kernel has booted:
451 <itemizedlist> 448 <itemizedlist>
452 <listitem><para><constant>echo kbd &gt; /sys/module/kgdboc/parameters/kgdboc</constant></para></listitem> 449 <listitem><para><constant>echo kbd &gt; /sys/module/kgdboc/parameters/kgdboc</constant></para></listitem>
453 </itemizedlist> 450 </itemizedlist>
@@ -501,12 +498,12 @@
501 <title>Connecting with gdb to a serial port</title> 498 <title>Connecting with gdb to a serial port</title>
502 <orderedlist> 499 <orderedlist>
503 <listitem><para>Configure kgdboc</para> 500 <listitem><para>Configure kgdboc</para>
504 <para>Boot kernel with arguments: 501 <para>Configure kgdboc at boot using kernel parameters:
505 <itemizedlist> 502 <itemizedlist>
506 <listitem><para><constant>kgdboc=ttyS0,115200</constant></para></listitem> 503 <listitem><para><constant>kgdboc=ttyS0,115200</constant></para></listitem>
507 </itemizedlist></para> 504 </itemizedlist></para>
508 <para>OR</para> 505 <para>OR</para>
509 <para>Configure kgdboc after the kernel booted: 506 <para>Configure kgdboc after the kernel has booted:
510 <itemizedlist> 507 <itemizedlist>
511 <listitem><para><constant>echo ttyS0 &gt; /sys/module/kgdboc/parameters/kgdboc</constant></para></listitem> 508 <listitem><para><constant>echo ttyS0 &gt; /sys/module/kgdboc/parameters/kgdboc</constant></para></listitem>
512 </itemizedlist></para> 509 </itemizedlist></para>
@@ -536,7 +533,7 @@
536 </para> 533 </para>
537 </listitem> 534 </listitem>
538 <listitem> 535 <listitem>
539 <para>Connect from from gdb</para> 536 <para>Connect from gdb</para>
540 <para> 537 <para>
541 Example (using a directly connected port): 538 Example (using a directly connected port):
542 </para> 539 </para>
@@ -584,7 +581,7 @@
584 <para> 581 <para>
585 There are two ways to switch from kgdb to kdb: you can use gdb to 582 There are two ways to switch from kgdb to kdb: you can use gdb to
586 issue a maintenance packet, or you can blindly type the command $3#33. 583 issue a maintenance packet, or you can blindly type the command $3#33.
587 Whenever kernel debugger stops in kgdb mode it will print the 584 Whenever the kernel debugger stops in kgdb mode it will print the
588 message <constant>KGDB or $3#33 for KDB</constant>. It is important 585 message <constant>KGDB or $3#33 for KDB</constant>. It is important
589 to note that you have to type the sequence correctly in one pass. 586 to note that you have to type the sequence correctly in one pass.
590 You cannot type a backspace or delete because kgdb will interpret 587 You cannot type a backspace or delete because kgdb will interpret
@@ -704,7 +701,7 @@ Task Addr Pid Parent [*] cpu State Thread Command
704 <listitem><para>Registration and unregistration of architecture specific trap hooks</para></listitem> 701 <listitem><para>Registration and unregistration of architecture specific trap hooks</para></listitem>
705 <listitem><para>Any special exception handling and cleanup</para></listitem> 702 <listitem><para>Any special exception handling and cleanup</para></listitem>
706 <listitem><para>NMI exception handling and cleanup</para></listitem> 703 <listitem><para>NMI exception handling and cleanup</para></listitem>
707 <listitem><para>(optional)HW breakpoints</para></listitem> 704 <listitem><para>(optional) HW breakpoints</para></listitem>
708 </itemizedlist> 705 </itemizedlist>
709 </para> 706 </para>
710 </listitem> 707 </listitem>
@@ -760,7 +757,7 @@ Task Addr Pid Parent [*] cpu State Thread Command
760 a kgdb I/O driver for characters when it needs input. The I/O 757 a kgdb I/O driver for characters when it needs input. The I/O
761 driver is expected to return immediately if there is no data 758 driver is expected to return immediately if there is no data
762 available. Doing so allows for the future possibility to touch 759 available. Doing so allows for the future possibility to touch
763 watch dog hardware in such a way as to have a target system not 760 watchdog hardware in such a way as to have a target system not
764 reset when these are enabled. 761 reset when these are enabled.
765 </para> 762 </para>
766 </listitem> 763 </listitem>
@@ -779,21 +776,25 @@ Task Addr Pid Parent [*] cpu State Thread Command
779 their &lt;asm/kgdb.h&gt; file. These are: 776 their &lt;asm/kgdb.h&gt; file. These are:
780 <itemizedlist> 777 <itemizedlist>
781 <listitem> 778 <listitem>
782 <para> 779 <para>
783 NUMREGBYTES: The size in bytes of all of the registers, so 780 NUMREGBYTES: The size in bytes of all of the registers, so
784 that we can ensure they will all fit into a packet. 781 that we can ensure they will all fit into a packet.
785 </para> 782 </para>
786 <para> 783 </listitem>
787 BUFMAX: The size in bytes of the buffer GDB will read into. 784 <listitem>
788 This must be larger than NUMREGBYTES. 785 <para>
789 </para> 786 BUFMAX: The size in bytes of the buffer GDB will read into.
790 <para> 787 This must be larger than NUMREGBYTES.
791 CACHE_FLUSH_IS_SAFE: Set to 1 if it is always safe to call 788 </para>
792 flush_cache_range or flush_icache_range. On some architectures, 789 </listitem>
793 these functions may not be safe to call on SMP since we keep other 790 <listitem>
794 CPUs in a holding pattern. 791 <para>
795 </para> 792 CACHE_FLUSH_IS_SAFE: Set to 1 if it is always safe to call
796 </listitem> 793 flush_cache_range or flush_icache_range. On some architectures,
794 these functions may not be safe to call on SMP since we keep other
795 CPUs in a holding pattern.
796 </para>
797 </listitem>
797 </itemizedlist> 798 </itemizedlist>
798 </para> 799 </para>
799 <para> 800 <para>
@@ -812,8 +813,8 @@ Task Addr Pid Parent [*] cpu State Thread Command
812 <para> 813 <para>
813 The kgdboc driver is actually a very thin driver that relies on the 814 The kgdboc driver is actually a very thin driver that relies on the
814 underlying low level to the hardware driver having "polling hooks" 815 underlying low level to the hardware driver having "polling hooks"
815 which the to which the tty driver is attached. In the initial 816 to which the tty driver is attached. In the initial
816 implementation of kgdboc it the serial_core was changed to expose a 817 implementation of kgdboc the serial_core was changed to expose a
817 low level UART hook for doing polled mode reading and writing of a 818 low level UART hook for doing polled mode reading and writing of a
818 single character while in an atomic context. When kgdb makes an I/O 819 single character while in an atomic context. When kgdb makes an I/O
819 request to the debugger, kgdboc invokes a callback in the serial 820 request to the debugger, kgdboc invokes a callback in the serial