[Lldb-commits] [PATCH] D140253: [debugserver] Clear memory allocations after exec
Alex Langford via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 11 13:45:00 PST 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG58def623ca46: [debugserver] Clear memory allocations after exec (authored by bulbazord).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140253/new/
https://reviews.llvm.org/D140253
Files:
lldb/tools/debugserver/source/MacOSX/MachProcess.mm
lldb/tools/debugserver/source/MacOSX/MachTask.h
lldb/tools/debugserver/source/MacOSX/MachTask.mm
Index: lldb/tools/debugserver/source/MacOSX/MachTask.mm
===================================================================
--- lldb/tools/debugserver/source/MacOSX/MachTask.mm
+++ lldb/tools/debugserver/source/MacOSX/MachTask.mm
@@ -999,6 +999,13 @@
return false;
}
+//----------------------------------------------------------------------
+// MachTask::ClearAllocations
+//----------------------------------------------------------------------
+void MachTask::ClearAllocations() {
+ m_allocations.clear();
+}
+
void MachTask::TaskPortChanged(task_t task)
{
m_task = task;
Index: lldb/tools/debugserver/source/MacOSX/MachTask.h
===================================================================
--- lldb/tools/debugserver/source/MacOSX/MachTask.h
+++ lldb/tools/debugserver/source/MacOSX/MachTask.h
@@ -61,6 +61,7 @@
nub_addr_t AllocateMemory(nub_size_t size, uint32_t permissions);
nub_bool_t DeallocateMemory(nub_addr_t addr);
+ void ClearAllocations();
mach_port_t ExceptionPort() const;
bool ExceptionPortIsValid() const;
Index: lldb/tools/debugserver/source/MacOSX/MachProcess.mm
===================================================================
--- lldb/tools/debugserver/source/MacOSX/MachProcess.mm
+++ lldb/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -2285,6 +2285,7 @@
m_thread_list.Clear();
m_activities.Clear();
m_breakpoints.DisableAll();
+ m_task.ClearAllocations();
}
if (m_sent_interrupt_signo != 0) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140253.488372.patch
Type: text/x-patch
Size: 1507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230111/24d2df8f/attachment.bin>
More information about the lldb-commits
mailing list