summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp')
-rw-r--r--lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp39
1 files changed, 37 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
index 5e6604458ad..b46c9375802 100644
--- a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
+++ b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
@@ -353,6 +353,31 @@ ProcessPOSIX::DoDestroy()
}
void
+ProcessPOSIX::DoDidExec()
+{
+ Target *target = &GetTarget();
+ if (target)
+ {
+ PlatformSP platform_sp (target->GetPlatform());
+ assert (platform_sp.get());
+ if (platform_sp)
+ {
+ ProcessInstanceInfo process_info;
+ platform_sp->GetProcessInfo(GetID(), process_info);
+ ModuleSP exe_module_sp;
+ FileSpecList executable_search_paths (Target::GetDefaultExecutableSearchPaths());
+ Error error = platform_sp->ResolveExecutable(process_info.GetExecutableFile(),
+ target->GetArchitecture(),
+ exe_module_sp,
+ executable_search_paths.GetSize() ? &executable_search_paths : NULL);
+ if (!error.Success())
+ return;
+ target->SetExecutableModule(exe_module_sp, true);
+ }
+ }
+}
+
+void
ProcessPOSIX::SendMessage(const ProcessMessage &message)
{
Mutex::Locker lock(m_message_mutex);
@@ -426,7 +451,7 @@ ProcessPOSIX::SendMessage(const ProcessMessage &message)
break;
case ProcessMessage::eNewThreadMessage:
- {
+ {
lldb::tid_t new_tid = message.GetChildTID();
if (WaitingForInitialStop(new_tid))
{
@@ -437,9 +462,19 @@ ProcessPOSIX::SendMessage(const ProcessMessage &message)
StopAllThreads(message.GetTID());
SetPrivateState(eStateStopped);
break;
- }
}
+ case ProcessMessage::eExecMessage:
+ {
+ assert(thread);
+ thread->SetState(eStateStopped);
+ StopAllThreads(message.GetTID());
+ SetPrivateState(eStateStopped);
+ break;
+ }
+ }
+
+
m_message_queue.push(message);
}
OpenPOWER on IntegriCloud