This patch fixes couple of issues described below:
- A thread tries to lock a mutex which is already locked. This happens in ProcessGDBRemote.cpp
- locks m_last_stop_packet_mutex
- access packet stack to get the stop info and
- call SetThreadStopInfo(stop_info)
- calls UpdateThreadIDList() to get the thread list if the response is old style 'S' packet which does not provide the thread information.
This causes a problem because UpdateThreadIDList() again tries to aquire a lock on m_last_stop_packet_mutex (which is already locked).
This patch fixes this issue by changing the Type of m_last_stop_packet_mutex to eMutexTypeRecursive so that the same thread can enter the mutex recursively.
- The old style 'S' packet isn't handled correctly.
This patch fixes this issue by updating a thread list before the stop packet is parsed so that it can get a valid thread id and allows to set the stop info correctly.