================
@@ -4281,25 +4281,31 @@ void
Process::CalculateExecutionContext(ExecutionContext &exe_ctx) {
// return Host::GetArchSpecForExistingProcess (process_name);
//}
+EventSP Process::CreateEventFromProcessState(uint32_t event_type) {
+ auto event_data_sp =
+ std::make_shared<ProcessEventData>(shared_from_this(), GetState());
+ return std::make_shared<Event>(event_type, event_data_sp);
+}
+
void Process::AppendSTDOUT(const char *s, size_t len) {
std::lock_guard<std::recursive_mutex> guard(m_stdio_communication_mutex);
m_stdout_data.append(s, len);
- BroadcastEventIfUnique(eBroadcastBitSTDOUT,
- new ProcessEventData(shared_from_this(), GetState()));
+ auto event_sp = CreateEventFromProcessState(eBroadcastBitSTDOUT);
+ BroadcastEventIfUnique(event_sp);
----------------
bulbazord wrote:
I didn't really think about it tbh, but I like the inlining so I'll update this
before landing.
https://github.com/llvm/llvm-project/pull/79045
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits