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

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 20 13:00:16 PDT 2020


jingham added a comment.

I can see the cases where this would help, but the way you are doing it could lead to some odd behavior that might be confusing.

Suppose I have two shared libraries, libBar.dylib and libNotBar.dylib in my project.  I debug the process, find a bug in FileFromNotBar.c.  So I change FileFromNotBar.c and then rebuild libNotBar.dylib.  Then I go back to lldb and hit "run" again.

Suppose the next thing to happen is that I hit a breakpoint in foo.c in libBar.dylib.  If I'm filled with doubt about the change I made in FileNotFromBar.c, so I then do:

(lldb) source list -f FileFromNotBar.c -l 10

So you check the currently selected frame's module - which is libbar.dylib and find that it was built before FileFromNotBar.c and would show me the old version.

Showing me the latest version of the file is not great, but totally explicable.  Whereas this error, when it happens, would be confusing and hard to understand.


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