[PATCH] D51830: Add a way to make scripted breakpoints
Jim Ingham via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 12:23:48 PST 2019
jingham marked an inline comment as done.
jingham added inline comments.
================
Comment at: source/Core/SearchFilter.cpp:757
+ }
+ if (m_cu_spec_list.FindFileIndex(0, sym_ctx.comp_unit, false) == UINT32_MAX)
+ return false; // Fails the file check
----------------
kwk wrote:
> @jingham Do you know why you check for the CU again here? I mean there's CompUnitPasses, that should do this, right?
The way the interaction between the Breakpoint Resolvers and the Search Filters work is that the SearchFilter asks the Resolver at what level it wants to be presented Symbol Containers (the module, the CU, Functions, etc.). Then the Search Filter iterates over the Symbol Container space handing the Resolver entities at the level the Resolver requested. Of course, the SearchFilter will only pass the resolver entities at that level that pass its test. But there is no guarantee that the an object passed at the level the Resolver requested is passes the SearchFilter in its entirety. So when the Resolver finds an address it was looking for in the search entity, it still needs to make sure that address actually passes SearchFilter. So the Resolver always needs to call AddressPasses before it accepts that address.
For instance, name breakpoints are searched at the Module level, because name tables are per module, so that is the convenient level to do the search. That means the by-name BreakpointResolver is going to get passed Modules. But if the SearchFilter was actually a by CU one, when the resolver finds a name some Module it was passed, it still needs to be sure that it's in the SearchFilter's CU, which it does by calling back into AddressPasses before setting a breakpoint on that address.
Was that what you were asking?
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D51830/new/
https://reviews.llvm.org/D51830
More information about the llvm-commits
mailing list