[lldb-dev] [Bug 45310] New: Save file fails while debugging is active on Windows
lldb-dev at lists.llvm.org
Wed Mar 25 13:27:49 PDT 2020
Bug ID: 45310
Summary: Save file fails while debugging is active on Windows
OS: Windows NT
Component: All Bugs
Assignee: lldb-dev at lists.llvm.org
Reporter: emrekultursay at google.com
CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org
On Windows, when LLDB hits a breakpoint in a large source file, the file is
locked and users can no longer edit the file. This causes trouble for users of
IDEs such as Android Studio, where users expect to be able to edit and save
files while they are debugging.
LLDB MemoryBuffer uses mmap for files larger than (4 * 4096) bytes. On Windows,
as long as the mapping is active, files cannot be overwritten.
1. SourceManager keeps m_last_file_sp to remember the most recently used file.
This keeps the mmapped region alive while a breakpoint is hit.
2. SourceFileCache keeps m_file_cache to remember all previously opened files.
This keeps all mmapped regions alive as long as LLDB is running. (see next
3. SourceFileCache.AddSourceFile is broken: It always adds bogus entry to the
cache, and therefore, cache insertions always conflict and cache lookups never
// Android Studio reported bug: https://issuetracker.google.com/143436652
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lldb-dev