From 74dbb8064435de245f8e0a4bf153a6cd21b95d73 Mon Sep 17 00:00:00 2001 From: Anton Lindqvist Date: Mon, 12 Nov 2018 17:54:08 +0100 Subject: 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. --- vm/vmm/vmm.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'vm') 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) } -- cgit mrf-deployment