[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
Sat Apr 18 04:50:34 PDT 2020
jankratochvil added inline comments.
================
Comment at: lldb/source/Core/SourceManager.cpp:547
+ DebuggerSP debugger_sp(m_debugger_wp.lock());
+ if (debugger_sp) {
+ lldb::TargetSP target_sp(debugger_sp->GetSelectedTarget());
----------------
```
if (!debugger_sp)
return false;
```
================
Comment at: lldb/source/Core/SourceManager.cpp:549
+ lldb::TargetSP target_sp(debugger_sp->GetSelectedTarget());
+ if (target_sp) {
+ lldb::ModuleSP exec_module_sp(target_sp->GetExecutableModule());
----------------
```
if (!target_sp)
return false;
```
================
Comment at: lldb/source/Core/SourceManager.cpp:550
+ if (target_sp) {
+ lldb::ModuleSP exec_module_sp(target_sp->GetExecutableModule());
+ if (exec_module_sp) {
----------------
One should find the `Module` matching current frame. As this will not work for debugging shared libraries.
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