Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 17, 2020

Conversation

aarzilli
Copy link
Member

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

Implements #2203

@aarzilli aarzilli force-pushed the substpath branch 2 times, most recently from 3b0e7f6 to 58798a4 Compare October 26, 2020 15:23
@@ -434,6 +438,30 @@ func (loc *NormalLocationSpec) Find(t *proc.Target, processArgs []string, scope
return []api.Location{addressesToLocation(addrs)}, nil
}

func substitutePath(path string, rules [][2]string) string {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a big fan of duplicating this from the terminal package. What are your thoughts on moving this logic here instead and exporting it such that the frontend can use it as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

@derekparker derekparker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Implements go-delve#2203
@aarzilli aarzilli merged commit db93049 into go-delve:master Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants