mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-10-08 11:44:05 +00:00
[debugserver] Clear memory allocations after exec
After an exec, the inferior is a new process and none of these memory regions are still allocated. Clear them out. Differential Revision: https://reviews.llvm.org/D140253
This commit is contained in:
parent
b4ad387ec5
commit
58def623ca
@ -2285,6 +2285,7 @@ task_t MachProcess::ExceptionMessageBundleComplete() {
|
||||
m_thread_list.Clear();
|
||||
m_activities.Clear();
|
||||
m_breakpoints.DisableAll();
|
||||
m_task.ClearAllocations();
|
||||
}
|
||||
|
||||
if (m_sent_interrupt_signo != 0) {
|
||||
|
@ -61,6 +61,7 @@ public:
|
||||
|
||||
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;
|
||||
|
@ -999,6 +999,13 @@ nub_bool_t MachTask::DeallocateMemory(nub_addr_t addr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// MachTask::ClearAllocations
|
||||
//----------------------------------------------------------------------
|
||||
void MachTask::ClearAllocations() {
|
||||
m_allocations.clear();
|
||||
}
|
||||
|
||||
void MachTask::TaskPortChanged(task_t task)
|
||||
{
|
||||
m_task = task;
|
||||
|
Loading…
Reference in New Issue
Block a user