diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-22 14:44:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-22 14:44:26 -0400 |
commit | e916beab22e00d95345bfa4f48981f2c88885f61 (patch) | |
tree | 8a50022d6ad51fe3d328f6987adf61a210fd3b08 | |
parent | 4c0c03ca54f72fdd5912516ad0a23ec5cf01bda7 (diff) | |
parent | edd63cb6b91024332d6983fc51058ac1ef0c081e (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
sysrq,kdb: Use __handle_sysrq() for kdb's sysrq function
debug_core,kdb: fix kgdb_connected bit set in the wrong place
Fix merge regression from external kdb to upstream kdb
repair gdbstub to match the gdbserial protocol specification
kdb: break out of kdb_ll() when command is terminated
-rw-r--r-- | drivers/char/sysrq.c | 2 | ||||
-rw-r--r-- | include/linux/sysrq.h | 1 | ||||
-rw-r--r-- | kernel/debug/debug_core.c | 2 | ||||
-rw-r--r-- | kernel/debug/gdbstub.c | 9 | ||||
-rw-r--r-- | kernel/debug/kdb/kdb_main.c | 7 |
5 files changed, 11 insertions, 10 deletions
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 5d64e3acb000..878ac0c2cc68 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -493,7 +493,7 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p) | |||
493 | sysrq_key_table[i] = op_p; | 493 | sysrq_key_table[i] = op_p; |
494 | } | 494 | } |
495 | 495 | ||
496 | static void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) | 496 | void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) |
497 | { | 497 | { |
498 | struct sysrq_key_op *op_p; | 498 | struct sysrq_key_op *op_p; |
499 | int orig_log_level; | 499 | int orig_log_level; |
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 4496322e28dd..609e8ca5f534 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h | |||
@@ -45,6 +45,7 @@ struct sysrq_key_op { | |||
45 | */ | 45 | */ |
46 | 46 | ||
47 | void handle_sysrq(int key, struct tty_struct *tty); | 47 | void handle_sysrq(int key, struct tty_struct *tty); |
48 | void __handle_sysrq(int key, struct tty_struct *tty, int check_mask); | ||
48 | int register_sysrq_key(int key, struct sysrq_key_op *op); | 49 | int register_sysrq_key(int key, struct sysrq_key_op *op); |
49 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); | 50 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); |
50 | struct sysrq_key_op *__sysrq_get_key_op(int key); | 51 | struct sysrq_key_op *__sysrq_get_key_op(int key); |
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index 5cb7cd1de10c..8bc5eeffec8a 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c | |||
@@ -605,13 +605,13 @@ cpu_master_loop: | |||
605 | if (dbg_kdb_mode) { | 605 | if (dbg_kdb_mode) { |
606 | kgdb_connected = 1; | 606 | kgdb_connected = 1; |
607 | error = kdb_stub(ks); | 607 | error = kdb_stub(ks); |
608 | kgdb_connected = 0; | ||
608 | } else { | 609 | } else { |
609 | error = gdb_serial_stub(ks); | 610 | error = gdb_serial_stub(ks); |
610 | } | 611 | } |
611 | 612 | ||
612 | if (error == DBG_PASS_EVENT) { | 613 | if (error == DBG_PASS_EVENT) { |
613 | dbg_kdb_mode = !dbg_kdb_mode; | 614 | dbg_kdb_mode = !dbg_kdb_mode; |
614 | kgdb_connected = 0; | ||
615 | } else if (error == DBG_SWITCH_CPU_EVENT) { | 615 | } else if (error == DBG_SWITCH_CPU_EVENT) { |
616 | dbg_cpu_switch(cpu, dbg_switch_cpu); | 616 | dbg_cpu_switch(cpu, dbg_switch_cpu); |
617 | goto cpu_loop; | 617 | goto cpu_loop; |
diff --git a/kernel/debug/gdbstub.c b/kernel/debug/gdbstub.c index 4b17b3269525..e8fd6868682d 100644 --- a/kernel/debug/gdbstub.c +++ b/kernel/debug/gdbstub.c | |||
@@ -621,10 +621,8 @@ static void gdb_cmd_query(struct kgdb_state *ks) | |||
621 | switch (remcom_in_buffer[1]) { | 621 | switch (remcom_in_buffer[1]) { |
622 | case 's': | 622 | case 's': |
623 | case 'f': | 623 | case 'f': |
624 | if (memcmp(remcom_in_buffer + 2, "ThreadInfo", 10)) { | 624 | if (memcmp(remcom_in_buffer + 2, "ThreadInfo", 10)) |
625 | error_packet(remcom_out_buffer, -EINVAL); | ||
626 | break; | 625 | break; |
627 | } | ||
628 | 626 | ||
629 | i = 0; | 627 | i = 0; |
630 | remcom_out_buffer[0] = 'm'; | 628 | remcom_out_buffer[0] = 'm'; |
@@ -665,10 +663,9 @@ static void gdb_cmd_query(struct kgdb_state *ks) | |||
665 | pack_threadid(remcom_out_buffer + 2, thref); | 663 | pack_threadid(remcom_out_buffer + 2, thref); |
666 | break; | 664 | break; |
667 | case 'T': | 665 | case 'T': |
668 | if (memcmp(remcom_in_buffer + 1, "ThreadExtraInfo,", 16)) { | 666 | if (memcmp(remcom_in_buffer + 1, "ThreadExtraInfo,", 16)) |
669 | error_packet(remcom_out_buffer, -EINVAL); | ||
670 | break; | 667 | break; |
671 | } | 668 | |
672 | ks->threadid = 0; | 669 | ks->threadid = 0; |
673 | ptr = remcom_in_buffer + 17; | 670 | ptr = remcom_in_buffer + 17; |
674 | kgdb_hex2long(&ptr, &ks->threadid); | 671 | kgdb_hex2long(&ptr, &ks->threadid); |
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index 184cd8209c36..ebe4a287419e 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c | |||
@@ -1820,9 +1820,8 @@ static int kdb_sr(int argc, const char **argv) | |||
1820 | { | 1820 | { |
1821 | if (argc != 1) | 1821 | if (argc != 1) |
1822 | return KDB_ARGCOUNT; | 1822 | return KDB_ARGCOUNT; |
1823 | sysrq_toggle_support(1); | ||
1824 | kdb_trap_printk++; | 1823 | kdb_trap_printk++; |
1825 | handle_sysrq(*argv[1], NULL); | 1824 | __handle_sysrq(*argv[1], NULL, 0); |
1826 | kdb_trap_printk--; | 1825 | kdb_trap_printk--; |
1827 | 1826 | ||
1828 | return 0; | 1827 | return 0; |
@@ -1883,6 +1882,7 @@ static int kdb_lsmod(int argc, const char **argv) | |||
1883 | kdb_printf(" (Loading)"); | 1882 | kdb_printf(" (Loading)"); |
1884 | else | 1883 | else |
1885 | kdb_printf(" (Live)"); | 1884 | kdb_printf(" (Live)"); |
1885 | kdb_printf(" 0x%p", mod->module_core); | ||
1886 | 1886 | ||
1887 | #ifdef CONFIG_MODULE_UNLOAD | 1887 | #ifdef CONFIG_MODULE_UNLOAD |
1888 | { | 1888 | { |
@@ -2291,6 +2291,9 @@ static int kdb_ll(int argc, const char **argv) | |||
2291 | while (va) { | 2291 | while (va) { |
2292 | char buf[80]; | 2292 | char buf[80]; |
2293 | 2293 | ||
2294 | if (KDB_FLAG(CMD_INTERRUPT)) | ||
2295 | return 0; | ||
2296 | |||
2294 | sprintf(buf, "%s " kdb_machreg_fmt "\n", command, va); | 2297 | sprintf(buf, "%s " kdb_machreg_fmt "\n", command, va); |
2295 | diag = kdb_parse(buf); | 2298 | diag = kdb_parse(buf); |
2296 | if (diag) | 2299 | if (diag) |