forked from go-delve/delve
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
service/debugger: improve NomalLocationSpec.Find's heuristics (go-del…
…ve#923) When location spec is given and the base can be interpreted either in source file name or function name, NomalLocationSpec searches both the source file list and the function symbol list, and selects matching candidates. Previously, all the matching candidates were added to one single list regardless whether the candidate was from the source file list or not. Then, later, Find tries to guess whether the candiate was a function or a file based on a heuristic, i.e, whether the candidate is an absolute file path. The heuristic is fragile - since there is no guarantee that the included source file name is an absolute path. Instead, this CL preserves where the candidate was found; file list or function symbol list. Then, use that info to determine whether the candidate is a source file name or not.
- Loading branch information
1 parent
0cea7cc
commit 809bdca
Showing
1 changed file
with
42 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters