augusto2112 wrote: > > @clayborg I can see how a module could be used as a hint, but I'm not sure > > how we'd prioritize lookups using functions or compile unit. The code in > > `SymTab.cpp` does a binary search to find the symbol, how could we restrict > > this further by passing a function hint, for example? > > For symbol lookups, we would only check the Module. If there is not module, > we would just search through the target's image list. If there was a module, > then we search it first, and avoid that module if we search the module list > just by checking the pointer of the module when iterating over the target's > module list. The full symbol context isn't required, but it would be nice to > set the precedent that others can duplicate when doing lookups of other kinds.
If that's the case, personally I think that it would make more sense if `FindFunctions` and `FindSymbolsWithNameAndType` took in a module because it wouldn't be possible to pass in something that doesn't make sense to those functions (like a symbol context with only a compile unit set, for example). https://github.com/llvm/llvm-project/pull/102835 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits