[Lldb-commits] [PATCH] D78421: Fix out of sync source code/executable when debugging

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon May 4 11:48:58 PDT 2020


jankratochvil added inline comments.


================
Comment at: lldb/source/Core/SourceManager.cpp:579
+
+  const Address pc_addr(stackframe_sp->GetFrameCodeAddress());
+
----------------
Please do not consider this as some requirement for LLDB project.
But I do not like much this guessing what module it really belongs to.
Couldn't we save the Module where `m_file_spec` came from? For example `DisplaySourceLinesWithLineNumbers` would then have another `Module &` parameter that it would save with `m_last_file_spec`. Then `ModuleList::FindSourceFile` could be replaced+simplified.
Another possibility would be to return `Module &` from `ModuleList::FindSourceFile` which is already being used in `SourceManager.cpp`.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78421





More information about the lldb-commits mailing list