diff options
| author | Anton Lindqvist <anton@basename.se> | 2018-11-12 17:54:08 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-11-12 12:03:13 -0800 |
| commit | 74dbb8064435de245f8e0a4bf153a6cd21b95d73 (patch) | |
| tree | ccd9fcc255dc486e79a32b44b74a1adf79e11e38 /vm/vmm | |
| parent | 7b5f86212c1bcfb5120dd42086b1c1192468d3b3 (diff) | |
vm/vmm: disable pagination and show panic in Diagnose()
The ddb(4) debugger defaults to showing 24 lines at a time, the next chunk of
lines will be displayed only after receiving keyboard input. Setting maxlines to
0 disables pagination completely.
Diffstat (limited to 'vm/vmm')
| -rw-r--r-- | vm/vmm/vmm.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vm/vmm/vmm.go b/vm/vmm/vmm.go index 11b0b399f..e6b6782b7 100644 --- a/vm/vmm/vmm.go +++ b/vm/vmm/vmm.go @@ -319,7 +319,14 @@ func (inst *instance) Diagnose() bool { // Note: this only works if kernel actually paniced and kernel shows panic console. // If kernel just hanged, we've lost connection or detected some non-panic error, // console still shows normal login prompt. - for _, c := range []string{"\n", "trace\n", "show registers\n"} { + commands := []string{ + "\n", + "set $lines = 0\n", // disable pagination + "show panic", + "trace\n", + "show registers\n", + } + for _, c := range commands { inst.consolew.Write([]byte(c)) time.Sleep(1 * time.Second) } |
