diff options
| author | Jim Ingham <jingham@apple.com> | 2012-11-01 01:15:33 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2012-11-01 01:15:33 +0000 |
| commit | 455fa5ccc6ad7a5a6227166f74474124d614e8ea (patch) | |
| tree | fbc785341c505e0fb1c73c012b8034f262ace604 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h | |
| parent | 4e45abf0aeb7957e1bd7b58785383d0d753c9e23 (diff) | |
| download | bcm5719-llvm-455fa5ccc6ad7a5a6227166f74474124d614e8ea.tar.gz bcm5719-llvm-455fa5ccc6ad7a5a6227166f74474124d614e8ea.zip | |
There seems to be some odd corner case where we shut down the ProcessGDBRemote, but we haven't managed to shut down the async thread. That causes the ProcessGDBRemote::AsyncThread to crash when it wakes up. So I changed StartAsyncThread and StopAsyncThread to be callable multiple times (only the first one does anything) so that we can just shut it down unequivocally in the ProcessGDBRemote destructor.
<rdar://problem/12602981>
llvm-svn: 167197
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h')
| -rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h index 5c642d44597..4cf2a4f94fb 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h @@ -307,6 +307,13 @@ protected: eBroadcastBitAsyncThreadDidExit = (1 << 2) }; + typedef enum AsyncThreadState + { + eAsyncThreadNotStarted, + eAsyncThreadRunning, + eAsyncThreadDone + } AsyncThreadState; + lldb_private::Flags m_flags; // Process specific flags (see eFlags enums) GDBRemoteCommunicationClient m_gdb_comm; lldb::pid_t m_debugserver_pid; @@ -315,6 +322,8 @@ protected: GDBRemoteDynamicRegisterInfo m_register_info; lldb_private::Broadcaster m_async_broadcaster; lldb::thread_t m_async_thread; + AsyncThreadState m_async_thread_state; + lldb_private::Mutex m_async_thread_state_mutex; typedef std::vector<lldb::tid_t> tid_collection; typedef std::vector< std::pair<lldb::tid_t,int> > tid_sig_collection; typedef std::map<lldb::addr_t, lldb::addr_t> MMapMap; |

