[Lldb-commits] [lldb] [lldb][Expression] Encode Module and DIE UIDs into function AsmLabels (PR #148877)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 30 03:51:29 PDT 2025
================
@@ -771,6 +774,81 @@ class LoadAddressResolver {
lldb::addr_t m_best_internal_load_address = LLDB_INVALID_ADDRESS;
};
+/// Find a module by LLDB-specific unique identifier.
+///
+/// \param[in] uid The UID of the module assigned to it on construction.
+///
+/// \returns ModuleSP of module with \c uid. Returns nullptr if no such
+/// module could be found.
+static lldb::ModuleSP FindDebugModule(lldb::user_id_t uid,
+ const ModuleList &modules) {
+ lldb::ModuleSP module_sp;
+ modules.ForEach([&](const lldb::ModuleSP &m) {
+ if (m->GetID() == uid) {
+ module_sp = m;
+ return IterationAction::Stop;
+ }
+
+ auto *sym = m->GetSymbolFile();
+ if (!sym)
+ return IterationAction::Continue;
+
+ auto debug_modules = sym->GetDebugInfoModules();
----------------
Michael137 wrote:
Worked, thanks!
https://github.com/llvm/llvm-project/pull/148877
More information about the lldb-commits
mailing list