From 5df78fa35b75e51014884ec5eae7fc0ff83f7dd8 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Sat, 23 May 2015 03:54:53 +0000 Subject: Did some cleanup to stop us from leaking Pipe file descriptors. The main issue was the Communication::Disconnect() was calling its Connection::Disconnect() but this wouldn't release the pipes that the ConnectionFileDescriptor was using. We also have someone that is holding a strong reference to the Process so that when you re-run, target replaces its m_process_sp, but it doesn't get destructed because someone has a strong reference to it. I need to track that down. But, even if we have a strong reference to the a process that is outstanding, we need to call Process::Finalize() to have it release as much of its resources as possible to avoid memory bloat. Removed the ProcessGDBRemote::SetExitStatus() override and replaced it with ProcessGDBRemote::DidExit(). Now we aren't leaking file descriptors and the stand alone test suite should run much better. llvm-svn: 238089 --- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h') diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h index a6c2d107dc1..59906808322 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h @@ -225,10 +225,10 @@ public: SendEventData(const char *data) override; //---------------------------------------------------------------------- - // Override SetExitStatus so we can disconnect from the remote GDB server + // Override DidExit so we can disconnect from the remote GDB server //---------------------------------------------------------------------- - bool - SetExitStatus (int exit_status, const char *cstr) override; + void + DidExit () override; void SetUserSpecifiedMaxMemoryTransferSize (uint64_t user_specified_max); -- cgit v1.2.3