uint32_t ar_size; // size in bytes
uint32_t ar_file_offset; // file offset in bytes from the beginning of the file of the object data
uint32_t ar_file_size; // length of the object data
- lldb::ObjectFileSP object_file_sp;
typedef std::vector<Object> collection;
typedef collection::iterator iterator;
//----------------------------------------------------------------------
lldb_private::ArchSpec m_arch;
lldb_private::TimeValue m_time;
- Object::collection m_objects;
+ Object::collection m_objects;
lldb_private::UniqueCStringMap<uint32_t> m_object_name_to_index_map;
};
SetEventName (eBroadcastBitSTDOUT, "stdout-available");
SetEventName (eBroadcastBitSTDERR, "stderr-available");
+ m_private_state_control_broadcaster.SetEventName (eBroadcastInternalStateControlStop , "control-stop" );
+ m_private_state_control_broadcaster.SetEventName (eBroadcastInternalStateControlPause , "control-pause" );
+ m_private_state_control_broadcaster.SetEventName (eBroadcastInternalStateControlResume, "control-resume");
+
listener.StartListeningForEvents (this,
eBroadcastBitStateChanged |
eBroadcastBitInterrupt |
m_allocated_memory_cache.Clear();
m_language_runtimes.clear();
m_next_event_action_ap.reset();
+//#ifdef LLDB_CONFIGURATION_DEBUG
+// StreamFile s(stdout, false);
+// EventSP event_sp;
+// while (m_private_state_listener.GetNextEvent(event_sp))
+// {
+// event_sp->Dump (&s);
+// s.EOL();
+// }
+//#endif
+ // We have to be very careful here as the m_private_state_listener might
+ // contain events that have ProcessSP values in them which can keep this
+ // process around forever. These events need to be cleared out.
+ m_private_state_listener.Clear();
m_finalize_called = true;
}
log->Printf("Process::SetPrivateState (%s) stop_id = %u", StateAsCString(new_state), m_mod_id.GetStopID());
}
// Use our target to get a shared pointer to ourselves...
- m_private_state_broadcaster.BroadcastEvent (eBroadcastBitStateChanged, new ProcessEventData (GetTarget().GetProcessSP(), new_state));
+ if (m_finalize_called && PrivateStateThreadIsValid() == false)
+ BroadcastEvent (eBroadcastBitStateChanged, new ProcessEventData (shared_from_this(), new_state));
+ else
+ m_private_state_broadcaster.BroadcastEvent (eBroadcastBitStateChanged, new ProcessEventData (shared_from_this(), new_state));
}
else
{
{
Mutex::Locker locker (m_stdio_communication_mutex);
m_stdout_data.append (s, len);
- BroadcastEventIfUnique (eBroadcastBitSTDOUT, new ProcessEventData (GetTarget().GetProcessSP(), GetState()));
+ BroadcastEventIfUnique (eBroadcastBitSTDOUT, new ProcessEventData (shared_from_this(), GetState()));
}
void
{
Mutex::Locker locker (m_stdio_communication_mutex);
m_stderr_data.append (s, len);
- BroadcastEventIfUnique (eBroadcastBitSTDERR, new ProcessEventData (GetTarget().GetProcessSP(), GetState()));
+ BroadcastEventIfUnique (eBroadcastBitSTDERR, new ProcessEventData (shared_from_this(), GetState()));
}
//------------------------------------------------------------------