@@ -1162,14 +1162,16 @@ bool Process::SetExitStatus(int status, const char *cstr) {
1162
1162
std::lock_guard<std::mutex> guard (m_exit_status_mutex);
1163
1163
1164
1164
Log *log (GetLog (LLDBLog::State | LLDBLog::Process));
1165
- LLDB_LOGF (
1166
- log, " Process::SetExitStatus (status=%i (0x%8.8x ), description=%s%s%s) " ,
1167
- status, status, cstr ? " \" " : " " , cstr ? cstr : " NULL" , cstr ? " \" " : " " );
1165
+ LLDB_LOG (log, " (plugin = %s status=%i (0x%8.8x), description=%s%s%s) " ,
1166
+ GetPluginName (). data ( ), status, status, cstr ? " \" " : " " ,
1167
+ cstr ? cstr : " NULL" , cstr ? " \" " : " " );
1168
1168
1169
1169
// We were already in the exited state
1170
1170
if (m_private_state.GetValue () == eStateExited) {
1171
- LLDB_LOGF (log, " Process::SetExitStatus () ignoring exit status because "
1172
- " state was already set to eStateExited" );
1171
+ LLDB_LOG (log,
1172
+ " (plugin = %s) ignoring exit status because state was already set "
1173
+ " to eStateExited" ,
1174
+ GetPluginName ().data ());
1173
1175
return false ;
1174
1176
}
1175
1177
@@ -1453,8 +1455,8 @@ void Process::SetPublicState(StateType new_state, bool restarted) {
1453
1455
}
1454
1456
1455
1457
Log *log (GetLog (LLDBLog::State | LLDBLog::Process));
1456
- LLDB_LOGF (log, " Process::SetPublicState ( state = %s, restarted = %i)" ,
1457
- StateAsCString (new_state), restarted);
1458
+ LLDB_LOG (log, " (plugin = %s, state = %s, restarted = %i)" ,
1459
+ GetPluginName (). data (), StateAsCString (new_state), restarted);
1458
1460
const StateType old_state = m_public_state.GetValue ();
1459
1461
m_public_state.SetValue (new_state);
1460
1462
@@ -1463,16 +1465,16 @@ void Process::SetPublicState(StateType new_state, bool restarted) {
1463
1465
// program to run.
1464
1466
if (!StateChangedIsExternallyHijacked ()) {
1465
1467
if (new_state == eStateDetached) {
1466
- LLDB_LOGF (log,
1467
- " Process::SetPublicState ( %s) -- unlocking run lock for detach" ,
1468
- StateAsCString (new_state));
1468
+ LLDB_LOG (log,
1469
+ " (plugin = %s, state = %s) -- unlocking run lock for detach" ,
1470
+ GetPluginName (). data (), StateAsCString (new_state));
1469
1471
m_public_run_lock.SetStopped ();
1470
1472
} else {
1471
1473
const bool old_state_is_stopped = StateIsStoppedState (old_state, false );
1472
1474
if ((old_state_is_stopped != new_state_is_stopped)) {
1473
1475
if (new_state_is_stopped && !restarted) {
1474
- LLDB_LOGF (log, " Process::SetPublicState ( %s) -- unlocking run lock" ,
1475
- StateAsCString (new_state));
1476
+ LLDB_LOG (log, " (plugin = %s, state = %s) -- unlocking run lock" ,
1477
+ GetPluginName (). data (), StateAsCString (new_state));
1476
1478
m_public_run_lock.SetStopped ();
1477
1479
}
1478
1480
}
@@ -1482,10 +1484,11 @@ void Process::SetPublicState(StateType new_state, bool restarted) {
1482
1484
1483
1485
Status Process::Resume () {
1484
1486
Log *log (GetLog (LLDBLog::State | LLDBLog::Process));
1485
- LLDB_LOGF (log, " Process::Resume -- locking run lock" );
1487
+ LLDB_LOG (log, " (plugin = %s) -- locking run lock" , GetPluginName (). data () );
1486
1488
if (!m_public_run_lock.TrySetRunning ()) {
1487
1489
Status error (" Resume request failed - process still running." );
1488
- LLDB_LOGF (log, " Process::Resume: -- TrySetRunning failed, not resuming." );
1490
+ LLDB_LOG (log, " (plugin = %s) -- TrySetRunning failed, not resuming." ,
1491
+ GetPluginName ().data ());
1489
1492
return error;
1490
1493
}
1491
1494
Status error = PrivateResume ();
@@ -1558,7 +1561,8 @@ void Process::SetPrivateState(StateType new_state) {
1558
1561
Log *log (GetLog (LLDBLog::State | LLDBLog::Process | LLDBLog::Unwind));
1559
1562
bool state_changed = false ;
1560
1563
1561
- LLDB_LOGF (log, " Process::SetPrivateState (%s)" , StateAsCString (new_state));
1564
+ LLDB_LOG (log, " (plugin = %s, state = %s)" , GetPluginName ().data (),
1565
+ StateAsCString (new_state));
1562
1566
1563
1567
std::lock_guard<std::recursive_mutex> thread_guard (m_thread_list.GetMutex ());
1564
1568
std::lock_guard<std::recursive_mutex> guard (m_private_state.GetMutex ());
@@ -1599,15 +1603,15 @@ void Process::SetPrivateState(StateType new_state) {
1599
1603
if (!m_mod_id.IsLastResumeForUserExpression ())
1600
1604
m_mod_id.SetStopEventForLastNaturalStopID (event_sp);
1601
1605
m_memory_cache.Clear ();
1602
- LLDB_LOGF (log, " Process::SetPrivateState (%s) stop_id = %u" ,
1603
- StateAsCString (new_state), m_mod_id.GetStopID ());
1606
+ LLDB_LOG (log, " (plugin = %s, state = %s, stop_id = %u" ,
1607
+ GetPluginName ().data (), StateAsCString (new_state),
1608
+ m_mod_id.GetStopID ());
1604
1609
}
1605
1610
1606
1611
m_private_state_broadcaster.BroadcastEvent (event_sp);
1607
1612
} else {
1608
- LLDB_LOGF (log,
1609
- " Process::SetPrivateState (%s) state didn't change. Ignoring..." ,
1610
- StateAsCString (new_state));
1613
+ LLDB_LOG (log, " (plugin = %s, state = %s) state didn't change. Ignoring..." ,
1614
+ GetPluginName ().data (), StateAsCString (new_state));
1611
1615
}
1612
1616
}
1613
1617
0 commit comments