[Lldb-commits] [lldb] [LLDB][FreeBSD] Implement DoStopIDBumped on FreeBSD (PR #195679)
via lldb-commits
lldb-commits at lists.llvm.org
Mon May 4 08:43:26 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: aokblast
<details>
<summary>Changes</summary>
When stopping, we should clear the mmap cache and repopulate all regions to properly handle new mmap syscalls. Without this, binaries loaded via dlopen or user-initiated mmap calls will not be recognized as valid memory regions.
Fixes: https://github.com/llvm/llvm-project/issues/180445
---
Full diff: https://github.com/llvm/llvm-project/pull/195679.diff
2 Files Affected:
- (modified) lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp (+8)
- (modified) lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h (+2)
``````````diff
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp
index 46e9ac1cfd6fa..fc215d1bb7ef5 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp
@@ -1089,3 +1089,11 @@ NativeProcessFreeBSD::SaveCore(llvm::StringRef path_hint) {
"PT_COREDUMP not supported in the FreeBSD version used to build LLDB");
#endif
}
+
+void NativeProcessFreeBSD::DoStopIDBumped(uint32_t newBumpId) {
+ Log *log = GetLog(POSIXLog::Process);
+ LLDB_LOG(log, "newBumpId={0}", newBumpId);
+ LLDB_LOG(log, "clearing {0} entries from memory region cache",
+ m_mem_region_cache.size());
+ m_mem_region_cache.clear();
+}
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h
index fb7372817265d..46e1f6564d3fb 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h
@@ -92,6 +92,8 @@ class NativeProcessFreeBSD : public NativeProcessELF,
llvm::Expected<std::string> SaveCore(llvm::StringRef path_hint) override;
+ void DoStopIDBumped(uint32_t newBumpId) override;
+
protected:
llvm::Expected<llvm::ArrayRef<uint8_t>>
GetSoftwareBreakpointTrapOpcode(size_t size_hint) override;
``````````
</details>
https://github.com/llvm/llvm-project/pull/195679
More information about the lldb-commits
mailing list