Use Process::IsAlive instead of just checking for eStateExited.

Two minor tweaks to GetLoadedDynamicLibrariesInfos.

llvm-svn: 252242
This commit is contained in:
Jason Molenda 2015-11-05 23:54:29 +00:00
parent 68c2165fd1
commit 1d3b356dde
1 changed files with 4 additions and 4 deletions

View File

@ -2981,7 +2981,7 @@ ProcessGDBRemote::SetUnixSignals(const UnixSignalsSP &signals_sp)
bool
ProcessGDBRemote::IsAlive ()
{
return m_gdb_comm.IsConnected() && m_private_state.GetValue() != eStateExited;
return m_gdb_comm.IsConnected() && Process::IsAlive();
}
addr_t
@ -4169,6 +4169,9 @@ ProcessGDBRemote::GetLoadedDynamicLibrariesInfos (lldb::addr_t image_list_addres
if (m_gdb_comm.GetLoadedDynamicLibrariesInfosSupported())
{
// Scope for the scoped timeout object
GDBRemoteCommunication::ScopedTimeout timeout (m_gdb_comm, 10);
StructuredData::ObjectSP args_dict(new StructuredData::Dictionary());
args_dict->GetAsDictionary()->AddIntegerItem ("image_list_address", image_list_address);
args_dict->GetAsDictionary()->AddIntegerItem ("image_count", image_count);
@ -4192,8 +4195,6 @@ ProcessGDBRemote::GetLoadedDynamicLibrariesInfos (lldb::addr_t image_list_addres
{
if (!response.Empty())
{
// The packet has already had the 0x7d xor quoting stripped out at the
// GDBRemoteCommunication packet receive level.
object_sp = StructuredData::ParseJSON (response.GetStringRef());
}
}
@ -4202,7 +4203,6 @@ ProcessGDBRemote::GetLoadedDynamicLibrariesInfos (lldb::addr_t image_list_addres
return object_sp;
}
// Establish the largest memory read/write payloads we should use.
// If the remote stub has a max packet size, stay under that size.
//