[Lldb-commits] [PATCH] D69843: Expression eval lookup - prune methods without parsing

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 5 08:19:22 PST 2019


labath added reviewers: aprantl, clayborg.
labath added a comment.

> A resonable solution would be to change the meaning of
>  eFunctionNameTypeFull to only mean mangled names, and if the caller
>  wanted methods and basenames, they would have to call with
>  eFunctionNameTypeFull | eFunctionNameTypeMethod |
>  eFunctionNameTypeBase. This would require some amount churn at
>  (Get|Find)Functions call sites. Also, I am not sure about implications
>  for Apple's lookup index.

This sounds like a good path forward to me. I remember being bothered by the fact that we were returning `ns::foo`, when someone asked for a function with a "full" name `foo` when I worked on this code last time. However, I didn't do anything about that back when I was working on this code, as it wasn't that relevant for me then...

Unfortunately, just simply removing the

>   m_set.function_basenames.Find(name, offsets);
>   m_set.function_methods.Find(name, offsets);

lines from the manual dwarf index causes a number of tests to fail, so it looks like there are thing which do depend on us returning the extra things here. These need to be tracked down and fixed (possibly by adding ` | eFunctionNameTypeMethod | eFunctionNameTypeBase` to the FindFunctions call, possibly in another way...). As for the Apple (and debug_names) indexes, they can not avoid looking at the dwarf DIE to eliminate methods (because the accelerator tables don't store this information), but they can definitely check whether something is a method *after* looking at the DWARF but *before* returning from the GetFunctions method (which should still be a major improvement over status quo).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69843/new/

https://reviews.llvm.org/D69843





More information about the lldb-commits mailing list