diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-05 13:17:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-05 13:17:30 -0400 |
commit | 5717922a1b8cc477f45a0f4f11fe619392ba7133 (patch) | |
tree | eeec6ca67edf27831071cabb8a13665b8001d55c | |
parent | 50f7ad2500b27ce5c42be3a6936f143b158f7bc3 (diff) | |
parent | e024cbd257efc2788b7d21b9353e966267485c87 (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:
kgdb: kconfig fix xconfig/menuconfig element
kgdb: fix signedness mixmatches, add statics, add declaration to header
kgdb: 1000 loops for the single step test in kgdbts
kgdb: trivial sparse fixes in kgdb test-suite
kgdb: minor documentation fixes
-rw-r--r-- | Documentation/DocBook/kgdb.tmpl | 8 | ||||
-rw-r--r-- | drivers/misc/kgdbts.c | 75 | ||||
-rw-r--r-- | include/linux/kgdb.h | 4 | ||||
-rw-r--r-- | kernel/kgdb.c | 8 | ||||
-rw-r--r-- | lib/Kconfig.kgdb | 16 |
5 files changed, 64 insertions, 47 deletions
diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl index 97618bed4d65..028a8444d95e 100644 --- a/Documentation/DocBook/kgdb.tmpl +++ b/Documentation/DocBook/kgdb.tmpl | |||
@@ -72,7 +72,7 @@ | |||
72 | kgdb is a source level debugger for linux kernel. It is used along | 72 | kgdb is a source level debugger for linux kernel. It is used along |
73 | with gdb to debug a linux kernel. The expectation is that gdb can | 73 | with gdb to debug a linux kernel. The expectation is that gdb can |
74 | be used to "break in" to the kernel to inspect memory, variables | 74 | be used to "break in" to the kernel to inspect memory, variables |
75 | and look through a cal stack information similar to what an | 75 | and look through call stack information similar to what an |
76 | application developer would use gdb for. It is possible to place | 76 | application developer would use gdb for. It is possible to place |
77 | breakpoints in kernel code and perform some limited execution | 77 | breakpoints in kernel code and perform some limited execution |
78 | stepping. | 78 | stepping. |
@@ -93,8 +93,10 @@ | |||
93 | <chapter id="CompilingAKernel"> | 93 | <chapter id="CompilingAKernel"> |
94 | <title>Compiling a kernel</title> | 94 | <title>Compiling a kernel</title> |
95 | <para> | 95 | <para> |
96 | To enable <symbol>CONFIG_KGDB</symbol>, look under the "Kernel debugging" | 96 | To enable <symbol>CONFIG_KGDB</symbol> you should first turn on |
97 | and then select "KGDB: kernel debugging with remote gdb". | 97 | "Prompt for development and/or incomplete code/drivers" |
98 | (CONFIG_EXPERIMENTAL) in "General setup", then under the | ||
99 | "Kernel debugging" select "KGDB: kernel debugging with remote gdb". | ||
98 | </para> | 100 | </para> |
99 | <para> | 101 | <para> |
100 | Next you should choose one of more I/O drivers to interconnect debugging | 102 | Next you should choose one of more I/O drivers to interconnect debugging |
diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index 30a1af857c7a..fa394104339c 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c | |||
@@ -47,6 +47,7 @@ | |||
47 | * to test the HW NMI watchdog | 47 | * to test the HW NMI watchdog |
48 | * F## = Break at do_fork for ## iterations | 48 | * F## = Break at do_fork for ## iterations |
49 | * S## = Break at sys_open for ## iterations | 49 | * S## = Break at sys_open for ## iterations |
50 | * I## = Run the single step test ## iterations | ||
50 | * | 51 | * |
51 | * NOTE: that the do_fork and sys_open tests are mutually exclusive. | 52 | * NOTE: that the do_fork and sys_open tests are mutually exclusive. |
52 | * | 53 | * |
@@ -375,7 +376,7 @@ static void emul_sstep_get(char *arg) | |||
375 | break; | 376 | break; |
376 | case 1: | 377 | case 1: |
377 | /* set breakpoint */ | 378 | /* set breakpoint */ |
378 | break_helper("Z0", 0, sstep_addr); | 379 | break_helper("Z0", NULL, sstep_addr); |
379 | break; | 380 | break; |
380 | case 2: | 381 | case 2: |
381 | /* Continue */ | 382 | /* Continue */ |
@@ -383,7 +384,7 @@ static void emul_sstep_get(char *arg) | |||
383 | break; | 384 | break; |
384 | case 3: | 385 | case 3: |
385 | /* Clear breakpoint */ | 386 | /* Clear breakpoint */ |
386 | break_helper("z0", 0, sstep_addr); | 387 | break_helper("z0", NULL, sstep_addr); |
387 | break; | 388 | break; |
388 | default: | 389 | default: |
389 | eprintk("kgdbts: ERROR failed sstep get emulation\n"); | 390 | eprintk("kgdbts: ERROR failed sstep get emulation\n"); |
@@ -465,11 +466,11 @@ static struct test_struct sw_breakpoint_test[] = { | |||
465 | { "?", "S0*" }, /* Clear break points */ | 466 | { "?", "S0*" }, /* Clear break points */ |
466 | { "kgdbts_break_test", "OK", sw_break, }, /* set sw breakpoint */ | 467 | { "kgdbts_break_test", "OK", sw_break, }, /* set sw breakpoint */ |
467 | { "c", "T0*", }, /* Continue */ | 468 | { "c", "T0*", }, /* Continue */ |
468 | { "g", "kgdbts_break_test", 0, check_and_rewind_pc }, | 469 | { "g", "kgdbts_break_test", NULL, check_and_rewind_pc }, |
469 | { "write", "OK", write_regs }, | 470 | { "write", "OK", write_regs }, |
470 | { "kgdbts_break_test", "OK", sw_rem_break }, /*remove breakpoint */ | 471 | { "kgdbts_break_test", "OK", sw_rem_break }, /*remove breakpoint */ |
471 | { "D", "OK" }, /* Detach */ | 472 | { "D", "OK" }, /* Detach */ |
472 | { "D", "OK", 0, got_break }, /* If the test worked we made it here */ | 473 | { "D", "OK", NULL, got_break }, /* On success we made it here */ |
473 | { "", "" }, | 474 | { "", "" }, |
474 | }; | 475 | }; |
475 | 476 | ||
@@ -499,14 +500,14 @@ static struct test_struct singlestep_break_test[] = { | |||
499 | { "?", "S0*" }, /* Clear break points */ | 500 | { "?", "S0*" }, /* Clear break points */ |
500 | { "kgdbts_break_test", "OK", sw_break, }, /* set sw breakpoint */ | 501 | { "kgdbts_break_test", "OK", sw_break, }, /* set sw breakpoint */ |
501 | { "c", "T0*", }, /* Continue */ | 502 | { "c", "T0*", }, /* Continue */ |
502 | { "g", "kgdbts_break_test", 0, check_and_rewind_pc }, | 503 | { "g", "kgdbts_break_test", NULL, check_and_rewind_pc }, |
503 | { "write", "OK", write_regs }, /* Write registers */ | 504 | { "write", "OK", write_regs }, /* Write registers */ |
504 | { "kgdbts_break_test", "OK", sw_rem_break }, /*remove breakpoint */ | 505 | { "kgdbts_break_test", "OK", sw_rem_break }, /*remove breakpoint */ |
505 | { "s", "T0*", emul_sstep_get, emul_sstep_put }, /* Single step */ | 506 | { "s", "T0*", emul_sstep_get, emul_sstep_put }, /* Single step */ |
506 | { "g", "kgdbts_break_test", 0, check_single_step }, | 507 | { "g", "kgdbts_break_test", NULL, check_single_step }, |
507 | { "kgdbts_break_test", "OK", sw_break, }, /* set sw breakpoint */ | 508 | { "kgdbts_break_test", "OK", sw_break, }, /* set sw breakpoint */ |
508 | { "c", "T0*", }, /* Continue */ | 509 | { "c", "T0*", }, /* Continue */ |
509 | { "g", "kgdbts_break_test", 0, check_and_rewind_pc }, | 510 | { "g", "kgdbts_break_test", NULL, check_and_rewind_pc }, |
510 | { "write", "OK", write_regs }, /* Write registers */ | 511 | { "write", "OK", write_regs }, /* Write registers */ |
511 | { "D", "OK" }, /* Remove all breakpoints and continues */ | 512 | { "D", "OK" }, /* Remove all breakpoints and continues */ |
512 | { "", "" }, | 513 | { "", "" }, |
@@ -520,14 +521,14 @@ static struct test_struct do_fork_test[] = { | |||
520 | { "?", "S0*" }, /* Clear break points */ | 521 | { "?", "S0*" }, /* Clear break points */ |
521 | { "do_fork", "OK", sw_break, }, /* set sw breakpoint */ | 522 | { "do_fork", "OK", sw_break, }, /* set sw breakpoint */ |
522 | { "c", "T0*", }, /* Continue */ | 523 | { "c", "T0*", }, /* Continue */ |
523 | { "g", "do_fork", 0, check_and_rewind_pc }, /* check location */ | 524 | { "g", "do_fork", NULL, check_and_rewind_pc }, /* check location */ |
524 | { "write", "OK", write_regs }, /* Write registers */ | 525 | { "write", "OK", write_regs }, /* Write registers */ |
525 | { "do_fork", "OK", sw_rem_break }, /*remove breakpoint */ | 526 | { "do_fork", "OK", sw_rem_break }, /*remove breakpoint */ |
526 | { "s", "T0*", emul_sstep_get, emul_sstep_put }, /* Single step */ | 527 | { "s", "T0*", emul_sstep_get, emul_sstep_put }, /* Single step */ |
527 | { "g", "do_fork", 0, check_single_step }, | 528 | { "g", "do_fork", NULL, check_single_step }, |
528 | { "do_fork", "OK", sw_break, }, /* set sw breakpoint */ | 529 | { "do_fork", "OK", sw_break, }, /* set sw breakpoint */ |
529 | { "7", "T0*", skip_back_repeat_test }, /* Loop based on repeat_test */ | 530 | { "7", "T0*", skip_back_repeat_test }, /* Loop based on repeat_test */ |
530 | { "D", "OK", 0, final_ack_set }, /* detach and unregister I/O */ | 531 | { "D", "OK", NULL, final_ack_set }, /* detach and unregister I/O */ |
531 | { "", "" }, | 532 | { "", "" }, |
532 | }; | 533 | }; |
533 | 534 | ||
@@ -538,14 +539,14 @@ static struct test_struct sys_open_test[] = { | |||
538 | { "?", "S0*" }, /* Clear break points */ | 539 | { "?", "S0*" }, /* Clear break points */ |
539 | { "sys_open", "OK", sw_break, }, /* set sw breakpoint */ | 540 | { "sys_open", "OK", sw_break, }, /* set sw breakpoint */ |
540 | { "c", "T0*", }, /* Continue */ | 541 | { "c", "T0*", }, /* Continue */ |
541 | { "g", "sys_open", 0, check_and_rewind_pc }, /* check location */ | 542 | { "g", "sys_open", NULL, check_and_rewind_pc }, /* check location */ |
542 | { "write", "OK", write_regs }, /* Write registers */ | 543 | { "write", "OK", write_regs }, /* Write registers */ |
543 | { "sys_open", "OK", sw_rem_break }, /*remove breakpoint */ | 544 | { "sys_open", "OK", sw_rem_break }, /*remove breakpoint */ |
544 | { "s", "T0*", emul_sstep_get, emul_sstep_put }, /* Single step */ | 545 | { "s", "T0*", emul_sstep_get, emul_sstep_put }, /* Single step */ |
545 | { "g", "sys_open", 0, check_single_step }, | 546 | { "g", "sys_open", NULL, check_single_step }, |
546 | { "sys_open", "OK", sw_break, }, /* set sw breakpoint */ | 547 | { "sys_open", "OK", sw_break, }, /* set sw breakpoint */ |
547 | { "7", "T0*", skip_back_repeat_test }, /* Loop based on repeat_test */ | 548 | { "7", "T0*", skip_back_repeat_test }, /* Loop based on repeat_test */ |
548 | { "D", "OK", 0, final_ack_set }, /* detach and unregister I/O */ | 549 | { "D", "OK", NULL, final_ack_set }, /* detach and unregister I/O */ |
549 | { "", "" }, | 550 | { "", "" }, |
550 | }; | 551 | }; |
551 | 552 | ||
@@ -556,11 +557,11 @@ static struct test_struct hw_breakpoint_test[] = { | |||
556 | { "?", "S0*" }, /* Clear break points */ | 557 | { "?", "S0*" }, /* Clear break points */ |
557 | { "kgdbts_break_test", "OK", hw_break, }, /* set hw breakpoint */ | 558 | { "kgdbts_break_test", "OK", hw_break, }, /* set hw breakpoint */ |
558 | { "c", "T0*", }, /* Continue */ | 559 | { "c", "T0*", }, /* Continue */ |
559 | { "g", "kgdbts_break_test", 0, check_and_rewind_pc }, | 560 | { "g", "kgdbts_break_test", NULL, check_and_rewind_pc }, |
560 | { "write", "OK", write_regs }, | 561 | { "write", "OK", write_regs }, |
561 | { "kgdbts_break_test", "OK", hw_rem_break }, /*remove breakpoint */ | 562 | { "kgdbts_break_test", "OK", hw_rem_break }, /*remove breakpoint */ |
562 | { "D", "OK" }, /* Detach */ | 563 | { "D", "OK" }, /* Detach */ |
563 | { "D", "OK", 0, got_break }, /* If the test worked we made it here */ | 564 | { "D", "OK", NULL, got_break }, /* On success we made it here */ |
564 | { "", "" }, | 565 | { "", "" }, |
565 | }; | 566 | }; |
566 | 567 | ||
@@ -570,12 +571,12 @@ static struct test_struct hw_breakpoint_test[] = { | |||
570 | static struct test_struct hw_write_break_test[] = { | 571 | static struct test_struct hw_write_break_test[] = { |
571 | { "?", "S0*" }, /* Clear break points */ | 572 | { "?", "S0*" }, /* Clear break points */ |
572 | { "hw_break_val", "OK", hw_write_break, }, /* set hw breakpoint */ | 573 | { "hw_break_val", "OK", hw_write_break, }, /* set hw breakpoint */ |
573 | { "c", "T0*", 0, got_break }, /* Continue */ | 574 | { "c", "T0*", NULL, got_break }, /* Continue */ |
574 | { "g", "silent", 0, check_and_rewind_pc }, | 575 | { "g", "silent", NULL, check_and_rewind_pc }, |
575 | { "write", "OK", write_regs }, | 576 | { "write", "OK", write_regs }, |
576 | { "hw_break_val", "OK", hw_rem_write_break }, /*remove breakpoint */ | 577 | { "hw_break_val", "OK", hw_rem_write_break }, /*remove breakpoint */ |
577 | { "D", "OK" }, /* Detach */ | 578 | { "D", "OK" }, /* Detach */ |
578 | { "D", "OK", 0, got_break }, /* If the test worked we made it here */ | 579 | { "D", "OK", NULL, got_break }, /* On success we made it here */ |
579 | { "", "" }, | 580 | { "", "" }, |
580 | }; | 581 | }; |
581 | 582 | ||
@@ -585,12 +586,12 @@ static struct test_struct hw_write_break_test[] = { | |||
585 | static struct test_struct hw_access_break_test[] = { | 586 | static struct test_struct hw_access_break_test[] = { |
586 | { "?", "S0*" }, /* Clear break points */ | 587 | { "?", "S0*" }, /* Clear break points */ |
587 | { "hw_break_val", "OK", hw_access_break, }, /* set hw breakpoint */ | 588 | { "hw_break_val", "OK", hw_access_break, }, /* set hw breakpoint */ |
588 | { "c", "T0*", 0, got_break }, /* Continue */ | 589 | { "c", "T0*", NULL, got_break }, /* Continue */ |
589 | { "g", "silent", 0, check_and_rewind_pc }, | 590 | { "g", "silent", NULL, check_and_rewind_pc }, |
590 | { "write", "OK", write_regs }, | 591 | { "write", "OK", write_regs }, |
591 | { "hw_break_val", "OK", hw_rem_access_break }, /*remove breakpoint */ | 592 | { "hw_break_val", "OK", hw_rem_access_break }, /*remove breakpoint */ |
592 | { "D", "OK" }, /* Detach */ | 593 | { "D", "OK" }, /* Detach */ |
593 | { "D", "OK", 0, got_break }, /* If the test worked we made it here */ | 594 | { "D", "OK", NULL, got_break }, /* On success we made it here */ |
594 | { "", "" }, | 595 | { "", "" }, |
595 | }; | 596 | }; |
596 | 597 | ||
@@ -599,9 +600,9 @@ static struct test_struct hw_access_break_test[] = { | |||
599 | */ | 600 | */ |
600 | static struct test_struct nmi_sleep_test[] = { | 601 | static struct test_struct nmi_sleep_test[] = { |
601 | { "?", "S0*" }, /* Clear break points */ | 602 | { "?", "S0*" }, /* Clear break points */ |
602 | { "c", "T0*", 0, got_break }, /* Continue */ | 603 | { "c", "T0*", NULL, got_break }, /* Continue */ |
603 | { "D", "OK" }, /* Detach */ | 604 | { "D", "OK" }, /* Detach */ |
604 | { "D", "OK", 0, got_break }, /* If the test worked we made it here */ | 605 | { "D", "OK", NULL, got_break }, /* On success we made it here */ |
605 | { "", "" }, | 606 | { "", "" }, |
606 | }; | 607 | }; |
607 | 608 | ||
@@ -874,18 +875,23 @@ static void kgdbts_run_tests(void) | |||
874 | { | 875 | { |
875 | char *ptr; | 876 | char *ptr; |
876 | int fork_test = 0; | 877 | int fork_test = 0; |
877 | int sys_open_test = 0; | 878 | int do_sys_open_test = 0; |
879 | int sstep_test = 1000; | ||
878 | int nmi_sleep = 0; | 880 | int nmi_sleep = 0; |
881 | int i; | ||
879 | 882 | ||
880 | ptr = strstr(config, "F"); | 883 | ptr = strstr(config, "F"); |
881 | if (ptr) | 884 | if (ptr) |
882 | fork_test = simple_strtol(ptr+1, NULL, 10); | 885 | fork_test = simple_strtol(ptr + 1, NULL, 10); |
883 | ptr = strstr(config, "S"); | 886 | ptr = strstr(config, "S"); |
884 | if (ptr) | 887 | if (ptr) |
885 | sys_open_test = simple_strtol(ptr+1, NULL, 10); | 888 | do_sys_open_test = simple_strtol(ptr + 1, NULL, 10); |
886 | ptr = strstr(config, "N"); | 889 | ptr = strstr(config, "N"); |
887 | if (ptr) | 890 | if (ptr) |
888 | nmi_sleep = simple_strtol(ptr+1, NULL, 10); | 891 | nmi_sleep = simple_strtol(ptr+1, NULL, 10); |
892 | ptr = strstr(config, "I"); | ||
893 | if (ptr) | ||
894 | sstep_test = simple_strtol(ptr+1, NULL, 10); | ||
889 | 895 | ||
890 | /* required internal KGDB tests */ | 896 | /* required internal KGDB tests */ |
891 | v1printk("kgdbts:RUN plant and detach test\n"); | 897 | v1printk("kgdbts:RUN plant and detach test\n"); |
@@ -894,8 +900,13 @@ static void kgdbts_run_tests(void) | |||
894 | run_breakpoint_test(0); | 900 | run_breakpoint_test(0); |
895 | v1printk("kgdbts:RUN bad memory access test\n"); | 901 | v1printk("kgdbts:RUN bad memory access test\n"); |
896 | run_bad_read_test(); | 902 | run_bad_read_test(); |
897 | v1printk("kgdbts:RUN singlestep breakpoint test\n"); | 903 | v1printk("kgdbts:RUN singlestep test %i iterations\n", sstep_test); |
898 | run_singlestep_break_test(); | 904 | for (i = 0; i < sstep_test; i++) { |
905 | run_singlestep_break_test(); | ||
906 | if (i % 100 == 0) | ||
907 | v1printk("kgdbts:RUN singlestep [%i/%i]\n", | ||
908 | i, sstep_test); | ||
909 | } | ||
899 | 910 | ||
900 | /* ===Optional tests=== */ | 911 | /* ===Optional tests=== */ |
901 | 912 | ||
@@ -922,7 +933,7 @@ static void kgdbts_run_tests(void) | |||
922 | repeat_test = fork_test; | 933 | repeat_test = fork_test; |
923 | printk(KERN_INFO "kgdbts:RUN do_fork for %i breakpoints\n", | 934 | printk(KERN_INFO "kgdbts:RUN do_fork for %i breakpoints\n", |
924 | repeat_test); | 935 | repeat_test); |
925 | kthread_run(kgdbts_unreg_thread, 0, "kgdbts_unreg"); | 936 | kthread_run(kgdbts_unreg_thread, NULL, "kgdbts_unreg"); |
926 | run_do_fork_test(); | 937 | run_do_fork_test(); |
927 | return; | 938 | return; |
928 | } | 939 | } |
@@ -931,11 +942,11 @@ static void kgdbts_run_tests(void) | |||
931 | * executed because a kernel thread will be spawned at the very | 942 | * executed because a kernel thread will be spawned at the very |
932 | * end to unregister the debug hooks. | 943 | * end to unregister the debug hooks. |
933 | */ | 944 | */ |
934 | if (sys_open_test) { | 945 | if (do_sys_open_test) { |
935 | repeat_test = sys_open_test; | 946 | repeat_test = do_sys_open_test; |
936 | printk(KERN_INFO "kgdbts:RUN sys_open for %i breakpoints\n", | 947 | printk(KERN_INFO "kgdbts:RUN sys_open for %i breakpoints\n", |
937 | repeat_test); | 948 | repeat_test); |
938 | kthread_run(kgdbts_unreg_thread, 0, "kgdbts_unreg"); | 949 | kthread_run(kgdbts_unreg_thread, NULL, "kgdbts_unreg"); |
939 | run_sys_open_test(); | 950 | run_sys_open_test(); |
940 | return; | 951 | return; |
941 | } | 952 | } |
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h index 9757b1a6d9dc..6adcc297e354 100644 --- a/include/linux/kgdb.h +++ b/include/linux/kgdb.h | |||
@@ -261,10 +261,12 @@ struct kgdb_io { | |||
261 | 261 | ||
262 | extern struct kgdb_arch arch_kgdb_ops; | 262 | extern struct kgdb_arch arch_kgdb_ops; |
263 | 263 | ||
264 | extern unsigned long __weak kgdb_arch_pc(int exception, struct pt_regs *regs); | ||
265 | |||
264 | extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops); | 266 | extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops); |
265 | extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops); | 267 | extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops); |
266 | 268 | ||
267 | extern int kgdb_hex2long(char **ptr, long *long_val); | 269 | extern int kgdb_hex2long(char **ptr, unsigned long *long_val); |
268 | extern int kgdb_mem2hex(char *mem, char *buf, int count); | 270 | extern int kgdb_mem2hex(char *mem, char *buf, int count); |
269 | extern int kgdb_hex2mem(char *buf, char *mem, int count); | 271 | extern int kgdb_hex2mem(char *buf, char *mem, int count); |
270 | 272 | ||
diff --git a/kernel/kgdb.c b/kernel/kgdb.c index 1bd0ec1c80b2..39e31a036f5b 100644 --- a/kernel/kgdb.c +++ b/kernel/kgdb.c | |||
@@ -61,7 +61,7 @@ struct kgdb_state { | |||
61 | int err_code; | 61 | int err_code; |
62 | int cpu; | 62 | int cpu; |
63 | int pass_exception; | 63 | int pass_exception; |
64 | long threadid; | 64 | unsigned long threadid; |
65 | long kgdb_usethreadid; | 65 | long kgdb_usethreadid; |
66 | struct pt_regs *linux_regs; | 66 | struct pt_regs *linux_regs; |
67 | }; | 67 | }; |
@@ -146,7 +146,7 @@ atomic_t kgdb_cpu_doing_single_step = ATOMIC_INIT(-1); | |||
146 | * the other CPUs might interfere with your debugging context, so | 146 | * the other CPUs might interfere with your debugging context, so |
147 | * use this with care: | 147 | * use this with care: |
148 | */ | 148 | */ |
149 | int kgdb_do_roundup = 1; | 149 | static int kgdb_do_roundup = 1; |
150 | 150 | ||
151 | static int __init opt_nokgdbroundup(char *str) | 151 | static int __init opt_nokgdbroundup(char *str) |
152 | { | 152 | { |
@@ -438,7 +438,7 @@ int kgdb_hex2mem(char *buf, char *mem, int count) | |||
438 | * While we find nice hex chars, build a long_val. | 438 | * While we find nice hex chars, build a long_val. |
439 | * Return number of chars processed. | 439 | * Return number of chars processed. |
440 | */ | 440 | */ |
441 | int kgdb_hex2long(char **ptr, long *long_val) | 441 | int kgdb_hex2long(char **ptr, unsigned long *long_val) |
442 | { | 442 | { |
443 | int hex_val; | 443 | int hex_val; |
444 | int num = 0; | 444 | int num = 0; |
@@ -709,7 +709,7 @@ int kgdb_isremovedbreak(unsigned long addr) | |||
709 | return 0; | 709 | return 0; |
710 | } | 710 | } |
711 | 711 | ||
712 | int remove_all_break(void) | 712 | static int remove_all_break(void) |
713 | { | 713 | { |
714 | unsigned long addr; | 714 | unsigned long addr; |
715 | int error; | 715 | int error; |
diff --git a/lib/Kconfig.kgdb b/lib/Kconfig.kgdb index f2e01ac5ab09..a5d4b1dac2a5 100644 --- a/lib/Kconfig.kgdb +++ b/lib/Kconfig.kgdb | |||
@@ -1,4 +1,10 @@ | |||
1 | 1 | ||
2 | config HAVE_ARCH_KGDB_SHADOW_INFO | ||
3 | bool | ||
4 | |||
5 | config HAVE_ARCH_KGDB | ||
6 | bool | ||
7 | |||
2 | menuconfig KGDB | 8 | menuconfig KGDB |
3 | bool "KGDB: kernel debugging with remote gdb" | 9 | bool "KGDB: kernel debugging with remote gdb" |
4 | select FRAME_POINTER | 10 | select FRAME_POINTER |
@@ -10,15 +16,10 @@ menuconfig KGDB | |||
10 | at http://kgdb.sourceforge.net as well as in DocBook form | 16 | at http://kgdb.sourceforge.net as well as in DocBook form |
11 | in Documentation/DocBook/. If unsure, say N. | 17 | in Documentation/DocBook/. If unsure, say N. |
12 | 18 | ||
13 | config HAVE_ARCH_KGDB_SHADOW_INFO | 19 | if KGDB |
14 | bool | ||
15 | |||
16 | config HAVE_ARCH_KGDB | ||
17 | bool | ||
18 | 20 | ||
19 | config KGDB_SERIAL_CONSOLE | 21 | config KGDB_SERIAL_CONSOLE |
20 | tristate "KGDB: use kgdb over the serial console" | 22 | tristate "KGDB: use kgdb over the serial console" |
21 | depends on KGDB | ||
22 | select CONSOLE_POLL | 23 | select CONSOLE_POLL |
23 | select MAGIC_SYSRQ | 24 | select MAGIC_SYSRQ |
24 | default y | 25 | default y |
@@ -28,7 +29,6 @@ config KGDB_SERIAL_CONSOLE | |||
28 | 29 | ||
29 | config KGDB_TESTS | 30 | config KGDB_TESTS |
30 | bool "KGDB: internal test suite" | 31 | bool "KGDB: internal test suite" |
31 | depends on KGDB | ||
32 | default n | 32 | default n |
33 | help | 33 | help |
34 | This is a kgdb I/O module specifically designed to test | 34 | This is a kgdb I/O module specifically designed to test |
@@ -56,3 +56,5 @@ config KGDB_TESTS_BOOT_STRING | |||
56 | boot. See the drivers/misc/kgdbts.c for detailed | 56 | boot. See the drivers/misc/kgdbts.c for detailed |
57 | information about other strings you could use beyond the | 57 | information about other strings you could use beyond the |
58 | default of V1F100. | 58 | default of V1F100. |
59 | |||
60 | endif # KGDB | ||