^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) # Initial commands for kdb, alter to suit your needs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) # These commands are executed in kdb_init() context, no SMP, no
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) # processes. Commands that require process data (including stack or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) # registers) are not reliable this early. set and bp commands should
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) # be safe. Global breakpoint commands affect each cpu as it is booted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) # Standard debugging information for first level support, just type archkdb
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) # or archkdbcpu or archkdbshort at the kdb prompt.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) defcmd dumpcommon "" "Common kdb debugging"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) set BTAPROMPT 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) set LINES 10000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) -summary
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) -cpu
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) -ps
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) -dmesg 600
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) -bt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) endefcmd
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) defcmd dumpall "" "First line debugging"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) pid R
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) -dumpcommon
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) -bta
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) endefcmd
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) defcmd dumpcpu "" "Same as dumpall but only tasks on cpus"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) pid R
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) -dumpcommon
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) -btc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) endefcmd
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)