Commit 2366e04
committed
kgdb,debug-core,gdbstub: Hook the reboot notifier for debugger detach
The gdbstub and kdb should get detached if the system is rebooting.
Calling gdbstub_exit() will set the proper debug core state and send a
message to any debugger that is connected to correctly detach.
An attached debugger will receive the exit code from
include/linux/reboot.h based on SYS_HALT, SYS_REBOOT, etc...
Reported-by: Jan Kiszka <[email protected]>
Signed-off-by: Jason Wessel <[email protected]>1 parent 9fbe465 commit 2366e04
2 files changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
784 | 785 | | |
785 | 786 | | |
786 | 787 | | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
787 | 802 | | |
788 | 803 | | |
789 | 804 | | |
790 | 805 | | |
791 | 806 | | |
792 | 807 | | |
793 | 808 | | |
| 809 | + | |
794 | 810 | | |
795 | 811 | | |
796 | 812 | | |
| |||
812 | 828 | | |
813 | 829 | | |
814 | 830 | | |
| 831 | + | |
815 | 832 | | |
816 | 833 | | |
817 | 834 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1111 | 1111 | | |
1112 | 1112 | | |
1113 | 1113 | | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
1114 | 1121 | | |
1115 | 1122 | | |
1116 | 1123 | | |
| |||
0 commit comments