History

kgdb: gdb "monitor" -> kdb passthrough

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.

Jason Wessel committed 16 years ago

Commit a0de0551 parent 6d45a1a5 files · +34 −6Browse files

Showing the changes to kernel/debug/debug_core.h (1 of 5 files). Show all

Unified · Split

kernel/debug/debug_core.h+2−0
@@ -66,9 +66,11 @@ extern void gdbstub_msg_write(const char *s, int len); · 65 unmodified lines
6666
6767 /* gdbstub functions used for kdb <-> gdbstub transition */
6868 extern int gdbstub_state(struct kgdb_state *ks, char *cmd);
69+extern int dbg_kdb_mode;
6970
7071 #ifdef CONFIG_KGDB_KDB
7172 extern int kdb_stub(struct kgdb_state *ks);
73+extern int kdb_parse(const char *cmdstr);
7274 #else /* ! CONFIG_KGDB_KDB */
7375 static inline int kdb_stub(struct kgdb_state *ks)
7476 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t