[llvm-bugs] [Bug 45310] New: Save file fails while debugging is active on Windows
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Mar 25 13:27:49 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45310
Bug ID: 45310
Summary: Save file fails while debugging is active on Windows
Product: lldb
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
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.
Background:
LLDB MemoryBuffer uses mmap for files larger than (4 * 4096) bytes. On Windows,
as long as the mapping is active, files cannot be overwritten.
Details:
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
item).
3. SourceFileCache.AddSourceFile is broken: It always adds bogus entry to the
cache, and therefore, cache insertions always conflict and cache lookups never
hit.
// Android Studio reported bug: https://issuetracker.google.com/143436652
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200325/9b4cbed4/attachment-0001.html>
More information about the llvm-bugs
mailing list