[Lldb-commits] [PATCH] D76188: [lldb/Target] Support more than 2 symbols in StackFrameRecognizer

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 16 10:20:39 PDT 2020


jingham added a comment.

In D76188#1924083 <https://reviews.llvm.org/D76188#1924083>, @labath wrote:

> Being able to match multiple symbols sounds useful in its own right, but the motivating case is a bit shady. `raise`, `__GI_raise` and `gsignal` are all aliases to one another (they have the same address). The reason you're sometimes getting `gsignal` here is not because some glibcs really call this function from their assert macro. It's because we happen to pick that symbol (maybe because it comes first in the symtab, depending on how the library was linked) when doing address resolution.
>
> I'm wondering if that doesn't signal a flaw in the recognizer infrastructure. If we changed the matching logic so that it resolves the name it is supposed to search for, and then does a match by address, then only one name would be sufficient here.


Note that a frame recognizer should trigger any time the you stop in a recognized frame, not just at the beginning.  So if you wanted to do address matching, you would have to get the symbol address and its extent, and then match the incoming address against that.  This seems like a nice optimization, with the side effect that it handles aliased symbols transparently.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76188





More information about the lldb-commits mailing list