mirror of
https://github.com/go-delve/delve.git
synced 2025-11-02 12:59:01 +08:00
terminal: add ability to show disassembly instead of source (#3047)
Adds ability to show current position as disassembly instead of source listing every time execution stops. Change default to show disassembly after step-instruction and source listing in every other case. Fixes #2878
This commit is contained in:
committed by
GitHub
parent
278e4d10c8
commit
1fe03e728c
@ -1331,3 +1331,14 @@ func TestTranscript(t *testing.T) {
|
||||
os.Remove(name)
|
||||
})
|
||||
}
|
||||
|
||||
func TestDisassPosCmd(t *testing.T) {
|
||||
withTestTerminal("testvariables2", t, func(term *FakeTerminal) {
|
||||
term.MustExec("continue")
|
||||
out := term.MustExec("step-instruction")
|
||||
t.Logf("%q\n", out)
|
||||
if !strings.Contains(out, "call $runtime.Breakpoint") && !strings.Contains(out, "CALL runtime.Breakpoint(SB)") {
|
||||
t.Errorf("output doesn't look like disassembly")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user