api: add FrameOffset to Stackframe (#864)

Other debuggers can be instructed to decorate the stacktrace with the
value of SP. Our SP equivalent is the frame offset, since we can add it
to the Stackframe structure without incurring into added costs we
should, so that frontends can use it if they want.
This commit is contained in:
Alessandro Arzilli
2017-06-20 19:39:33 +02:00
committed by Derek Parker
parent a90893f532
commit 04c4b019f7
4 changed files with 14 additions and 4 deletions

View File

@ -216,7 +216,7 @@ func TestExecuteFile(t *testing.T) {
func TestIssue354(t *testing.T) {
printStack([]api.Stackframe{}, "")
printStack([]api.Stackframe{{api.Location{PC: 0, File: "irrelevant.go", Line: 10, Function: nil}, nil, nil}}, "")
printStack([]api.Stackframe{{api.Location{PC: 0, File: "irrelevant.go", Line: 10, Function: nil}, nil, nil, 0}}, "")
}
func TestIssue411(t *testing.T) {