service,terminal: apply substitute path to trace/break argument

Change FindLocation to apply substitute path rules to location
expressions. Changes terminal to always print paths after applying
substitutions.

Implements #2203
This commit is contained in:
aarzilli
2020-10-26 13:36:52 +01:00
committed by Alessandro Arzilli
parent 6ab6929b9a
commit db93049813
13 changed files with 174 additions and 116 deletions

View File

@ -247,8 +247,8 @@ func TestExecuteFile(t *testing.T) {
}
func TestIssue354(t *testing.T) {
printStack(os.Stdout, []api.Stackframe{}, "", false)
printStack(os.Stdout, []api.Stackframe{
printStack(&Term{}, os.Stdout, []api.Stackframe{}, "", false)
printStack(&Term{}, os.Stdout, []api.Stackframe{
{Location: api.Location{PC: 0, File: "irrelevant.go", Line: 10, Function: nil},
Bottom: true}}, "", false)
}