aboutsummaryrefslogtreecommitdiff
path: root/kernel/debug/kdb
AgeCommit message (Collapse)AuthorFilesLines
2010-05-20kgdboc,keyboard: Keyboard driver for kdb with kgdbJason Wessel2-0/+213
This patch adds in the kdb PS/2 keyboard driver. This was mostly a direct port from the original kdb where I cleaned up the code against checkpatch.pl and added the glue to stitch it into kgdb. This patch also enables early kdb debug via kgdbwait and the keyboard. All the access to configure kdb using either a serial console or the keyboard is done via kgdboc. If you want to use only the keyboard and want to break in early you would add to your kernel command arguments: kgdboc=kbd kgdbwait If you wanted serial and or the keyboard access you could use: kgdboc=kbd,ttyS0 You can also configure kgdboc as a kernel module or at run time with the sysfs where you can activate and deactivate kgdb. Turn it on: echo kbd,ttyS0 > /sys/module/kgdboc/parameters/kgdboc Turn it off: echo "" > /sys/module/kgdboc/parameters/kgdboc Signed-off-by: Jason Wessel <[email protected]> Reviewed-by: Dmitry Torokhov <[email protected]>
2010-05-20kgdb: gdb "monitor" -> kdb passthroughJason Wessel2-5/+9
One of the driving forces behind integrating another front end (kdb) to the debug core is to allow front end commands to be accessible via gdb's monitor command. It is true that you could write gdb macros to get certain data, but you may want to just use gdb to access the commands that are available in the kdb front end. This patch implements the Rcmd gdb stub packet. In gdb you access this with the "monitor" command. For instance you could type "monitor help", "monitor lsmod" or "monitor ps A" etc... There is no error checking or command restrictions on what you can and cannot access at this point. Doing something like trying to set breakpoints with the monitor command is going to cause nothing but problems. Perhaps in the future only the commands that are actually known to work with the gdb monitor command will be available. Signed-off-by: Jason Wessel <[email protected]>
2010-05-20kgdb,8250,pl011: Return immediately from console pollJason Wessel1-0/+10
The design of the kdb shell requires that every device that can provide input to kdb have a polling routine that exits immediately if there is no character available. This is required in order to get the page scrolling mechanism working. Changing the kernel debugger I/O API to require all polling character routines to exit immediately if there is no data allows the kernel debugger to process multiple input channels. NO_POLL_CHAR will be the return code to the polling routine when ever there is no character available. CC: [email protected] Signed-off-by: Jason Wessel <[email protected]>
2010-05-20kdb: core for kgdb back end (1 of 2)Jason Wessel10-0/+5853
This patch contains only the kdb core. Because the change set was large, it was split. The next patch in the series includes the instrumentation into the core kernel which are mainly helper functions for kdb. This work is directly derived from kdb v4.4 found at: ftp://oss.sgi.com/projects/kdb/download/v4.4/ The kdb internals have been re-organized to make them mostly platform independent and to connect everything to the debug core which is used by gdbstub (which has long been known as kgdb). The original version of kdb was 58,000 lines worth of changes to support x86. From that implementation only the kdb shell, and basic commands for memory access, runcontrol, lsmod, and dmesg where carried forward. This is a generic implementation which aims to cover all the current architectures using the kgdb core: ppc, arm, x86, mips, sparc, sh and blackfin. More archictectures can be added by implementing the architecture specific kgdb functions. [[email protected]: Compile fix with hugepages enabled] [[email protected]: Clean breakpoint code renaming kdba_ -> kdb_] [[email protected]: fix new line after printing registers] [[email protected]: Remove the concept of global vs. local breakpoints] [[email protected]: Rework kdb_si_swapinfo to use more generic name] [[email protected]: fix the information dump macros, remove 'arch' from the names] [[email protected]: include fixup to include linux/slab.h] CC: [email protected] Signed-off-by: Jason Wessel <[email protected]> Signed-off-by: Martin Hicks <[email protected]>