service/debugger: improve NomalLocationSpec.Find's heuristics (#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.
Showing
想要评论请 注册 或 登录