@@ -407,8 +407,8 @@ ProcessSP Process::FindPlugin(lldb::TargetSP target_sp,
407
407
create_callback =
408
408
PluginManager::GetProcessCreateCallbackForPluginName (plugin_name);
409
409
if (create_callback) {
410
- process_sp = create_callback (target_sp, listener_sp, crash_file_path,
411
- can_connect);
410
+ process_sp =
411
+ create_callback (target_sp, listener_sp, crash_file_path, can_connect);
412
412
if (process_sp) {
413
413
if (process_sp->CanDebug (target_sp, true )) {
414
414
process_sp->m_process_unique_id = ++g_process_unique_id;
@@ -421,8 +421,8 @@ ProcessSP Process::FindPlugin(lldb::TargetSP target_sp,
421
421
(create_callback =
422
422
PluginManager::GetProcessCreateCallbackAtIndex (idx)) != nullptr ;
423
423
++idx) {
424
- process_sp = create_callback (target_sp, listener_sp, crash_file_path,
425
- can_connect);
424
+ process_sp =
425
+ create_callback (target_sp, listener_sp, crash_file_path, can_connect);
426
426
if (process_sp) {
427
427
if (process_sp->CanDebug (target_sp, false )) {
428
428
process_sp->m_process_unique_id = ++g_process_unique_id;
@@ -541,8 +541,7 @@ Process::~Process() {
541
541
ProcessProperties &Process::GetGlobalProperties () {
542
542
// NOTE: intentional leak so we don't crash if global destructor chain gets
543
543
// called as other threads still use the result of this function
544
- static ProcessProperties *g_settings_ptr =
545
- new ProcessProperties (nullptr );
544
+ static ProcessProperties *g_settings_ptr = new ProcessProperties (nullptr );
546
545
return *g_settings_ptr;
547
546
}
548
547
@@ -647,7 +646,7 @@ StateType Process::GetNextEvent(EventSP &event_sp) {
647
646
StateType state = eStateInvalid;
648
647
649
648
if (GetPrimaryListener ()->GetEventForBroadcaster (this , event_sp,
650
- std::chrono::seconds (0 )) &&
649
+ std::chrono::seconds (0 )) &&
651
650
event_sp)
652
651
state = Process::ProcessEventData::GetStateFromEvent (event_sp.get ());
653
652
@@ -745,8 +744,7 @@ StateType Process::WaitForProcessToStop(
745
744
746
745
bool Process::HandleProcessStateChangedEvent (
747
746
const EventSP &event_sp, Stream *stream,
748
- SelectMostRelevant select_most_relevant,
749
- bool &pop_process_io_handler) {
747
+ SelectMostRelevant select_most_relevant, bool &pop_process_io_handler) {
750
748
const bool handle_pop = pop_process_io_handler;
751
749
752
750
pop_process_io_handler = false ;
@@ -937,8 +935,7 @@ bool Process::HandleProcessStateChangedEvent(
937
935
process_sp->GetStatus (*stream);
938
936
process_sp->GetThreadStatus (*stream, only_threads_with_stop_reason,
939
937
start_frame, num_frames,
940
- num_frames_with_source,
941
- stop_format);
938
+ num_frames_with_source, stop_format);
942
939
if (curr_thread_stop_info_sp) {
943
940
lldb::addr_t crashing_address;
944
941
ValueObjectSP valobj_sp = StopInfo::GetCrashingDereference (
@@ -1141,7 +1138,7 @@ bool Process::SetProcessExitStatus(
1141
1138
lldb::pid_t pid, bool exited,
1142
1139
int signo, // Zero for no signal
1143
1140
int exit_status // Exit value of process if signal is zero
1144
- ) {
1141
+ ) {
1145
1142
Log *log = GetLog (LLDBLog::Process);
1146
1143
LLDB_LOGF (log,
1147
1144
" Process::SetProcessExitStatus (pid=%" PRIu64
@@ -1346,7 +1343,7 @@ void Process::SetPublicState(StateType new_state, bool restarted) {
1346
1343
1347
1344
Log *log (GetLog (LLDBLog::State | LLDBLog::Process));
1348
1345
LLDB_LOGF (log, " (plugin = %s, state = %s, restarted = %i)" ,
1349
- GetPluginName ().data (), StateAsCString (new_state), restarted);
1346
+ GetPluginName ().data (), StateAsCString (new_state), restarted);
1350
1347
const StateType old_state = m_public_state.GetValue ();
1351
1348
m_public_state.SetValue (new_state);
1352
1349
@@ -1356,15 +1353,15 @@ void Process::SetPublicState(StateType new_state, bool restarted) {
1356
1353
if (!StateChangedIsExternallyHijacked ()) {
1357
1354
if (new_state == eStateDetached) {
1358
1355
LLDB_LOGF (log,
1359
- " (plugin = %s, state = %s) -- unlocking run lock for detach" ,
1360
- GetPluginName ().data (), StateAsCString (new_state));
1356
+ " (plugin = %s, state = %s) -- unlocking run lock for detach" ,
1357
+ GetPluginName ().data (), StateAsCString (new_state));
1361
1358
m_public_run_lock.SetStopped ();
1362
1359
} else {
1363
1360
const bool old_state_is_stopped = StateIsStoppedState (old_state, false );
1364
1361
if ((old_state_is_stopped != new_state_is_stopped)) {
1365
1362
if (new_state_is_stopped && !restarted) {
1366
1363
LLDB_LOGF (log, " (plugin = %s, state = %s) -- unlocking run lock" ,
1367
- GetPluginName ().data (), StateAsCString (new_state));
1364
+ GetPluginName ().data (), StateAsCString (new_state));
1368
1365
m_public_run_lock.SetStopped ();
1369
1366
}
1370
1367
}
@@ -1378,7 +1375,7 @@ Status Process::Resume() {
1378
1375
if (!m_public_run_lock.TrySetRunning ()) {
1379
1376
Status error (" Resume request failed - process still running." );
1380
1377
LLDB_LOGF (log, " (plugin = %s) -- TrySetRunning failed, not resuming." ,
1381
- GetPluginName ().data ());
1378
+ GetPluginName ().data ());
1382
1379
return error;
1383
1380
}
1384
1381
Status error = PrivateResume ();
@@ -1458,7 +1455,7 @@ void Process::SetPrivateState(StateType new_state) {
1458
1455
bool state_changed = false ;
1459
1456
1460
1457
LLDB_LOGF (log, " (plugin = %s, state = %s)" , GetPluginName ().data (),
1461
- StateAsCString (new_state));
1458
+ StateAsCString (new_state));
1462
1459
1463
1460
std::lock_guard<std::recursive_mutex> thread_guard (m_thread_list.GetMutex ());
1464
1461
std::lock_guard<std::recursive_mutex> guard (m_private_state.GetMutex ());
@@ -1500,14 +1497,14 @@ void Process::SetPrivateState(StateType new_state) {
1500
1497
m_mod_id.SetStopEventForLastNaturalStopID (event_sp);
1501
1498
m_memory_cache.Clear ();
1502
1499
LLDB_LOGF (log, " (plugin = %s, state = %s, stop_id = %u" ,
1503
- GetPluginName ().data (), StateAsCString (new_state),
1504
- m_mod_id.GetStopID ());
1500
+ GetPluginName ().data (), StateAsCString (new_state),
1501
+ m_mod_id.GetStopID ());
1505
1502
}
1506
1503
1507
1504
m_private_state_broadcaster.BroadcastEvent (event_sp);
1508
1505
} else {
1509
1506
LLDB_LOGF (log, " (plugin = %s, state = %s) state didn't change. Ignoring..." ,
1510
- GetPluginName ().data (), StateAsCString (new_state));
1507
+ GetPluginName ().data (), StateAsCString (new_state));
1511
1508
}
1512
1509
}
1513
1510
@@ -1523,7 +1520,8 @@ addr_t Process::GetImageInfoAddress() { return LLDB_INVALID_ADDRESS; }
1523
1520
1524
1521
const lldb::ABISP &Process::GetABI () {
1525
1522
if (!m_abi_sp)
1526
- m_abi_sp = ABI::FindPlugin (shared_from_this (), GetTarget ().GetArchitecture ());
1523
+ m_abi_sp =
1524
+ ABI::FindPlugin (shared_from_this (), GetTarget ().GetArchitecture ());
1527
1525
return m_abi_sp;
1528
1526
}
1529
1527
@@ -1570,7 +1568,8 @@ LanguageRuntime *Process::GetLanguageRuntime(lldb::LanguageType language) {
1570
1568
// for example, CPPLanguageRuntime will support eLanguageTypeC_plus_plus,
1571
1569
// eLanguageTypeC_plus_plus_03, etc. Because of this, we should get the
1572
1570
// primary language type and make sure that our runtime supports it.
1573
- assert (runtime->GetLanguageType () == Language::GetPrimaryLanguage (language));
1571
+ assert (runtime->GetLanguageType () ==
1572
+ Language::GetPrimaryLanguage (language));
1574
1573
1575
1574
return runtime;
1576
1575
}
@@ -1961,7 +1960,7 @@ Status Process::DisableSoftwareBreakpoint(BreakpointSite *bp_site) {
1961
1960
1962
1961
// Uncomment to verify memory caching works after making changes to caching
1963
1962
// code
1964
- // #define VERIFY_MEMORY_READS
1963
+ // #define VERIFY_MEMORY_READS
1965
1964
1966
1965
size_t Process::ReadMemory (addr_t addr, void *buf, size_t size, Status &error) {
1967
1966
if (ABISP abi_sp = GetABI ())
@@ -2818,9 +2817,7 @@ ListenerSP ProcessAttachInfo::GetListenerForProcess(Debugger &debugger) {
2818
2817
return debugger.GetListener ();
2819
2818
}
2820
2819
2821
- Status Process::WillLaunch (Module *module ) {
2822
- return DoWillLaunch (module );
2823
- }
2820
+ Status Process::WillLaunch (Module *module ) { return DoWillLaunch (module ); }
2824
2821
2825
2822
Status Process::WillAttachToProcessWithID (lldb::pid_t pid) {
2826
2823
return DoWillAttachToProcessWithID (pid);
@@ -3710,8 +3707,8 @@ void Process::ControlPrivateStateThread(uint32_t signal) {
3710
3707
while (!receipt_received) {
3711
3708
// Check for a receipt for n seconds and then check if the private
3712
3709
// state thread is still around.
3713
- receipt_received =
3714
- event_receipt_sp-> WaitForEventReceived ( GetUtilityExpressionTimeout ());
3710
+ receipt_received = event_receipt_sp-> WaitForEventReceived (
3711
+ GetUtilityExpressionTimeout ());
3715
3712
if (!receipt_received) {
3716
3713
// Check if the private state thread is still around. If it isn't
3717
3714
// then we are done waiting
@@ -4758,7 +4755,8 @@ HandleStoppedEvent(lldb::tid_t thread_id, const ThreadPlanSP &thread_plan_sp,
4758
4755
StopInfoSP stop_info_sp = thread_sp->GetStopInfo ();
4759
4756
if (stop_info_sp && stop_info_sp->GetStopReason () == eStopReasonBreakpoint &&
4760
4757
stop_info_sp->ShouldNotify (event_sp.get ())) {
4761
- LLDB_LOG (log, " stopped for breakpoint: {0}." , stop_info_sp->GetDescription ());
4758
+ LLDB_LOG (log, " stopped for breakpoint: {0}." ,
4759
+ stop_info_sp->GetDescription ());
4762
4760
if (!options.DoesIgnoreBreakpoints ()) {
4763
4761
// Restore the plan state and then force Private to false. We are going
4764
4762
// to stop because of this plan so we need it to become a public plan or
@@ -5010,8 +5008,8 @@ Process::RunThreadPlan(ExecutionContext &exe_ctx,
5010
5008
// coalescing to cause us to lose OUR running event...
5011
5009
ForceNextEventDelivery ();
5012
5010
5013
- // This while loop must exit out the bottom, there's cleanup that we need to do
5014
- // when we are done. So don't call return anywhere within it.
5011
+ // This while loop must exit out the bottom, there's cleanup that we need to
5012
+ // do when we are done. So don't call return anywhere within it.
5015
5013
5016
5014
#ifdef LLDB_RUN_THREAD_HALT_WITH_EVENT
5017
5015
// It's pretty much impossible to write test cases for things like: One
@@ -5235,12 +5233,14 @@ Process::RunThreadPlan(ExecutionContext &exe_ctx,
5235
5233
LLDB_LOG (log,
5236
5234
" Running function with one thread timeout timed out." );
5237
5235
} else
5238
- LLDB_LOG (log, " Restarting function with all threads enabled and "
5239
- " timeout: {0} timed out, abandoning execution." ,
5236
+ LLDB_LOG (log,
5237
+ " Restarting function with all threads enabled and "
5238
+ " timeout: {0} timed out, abandoning execution." ,
5240
5239
timeout);
5241
5240
} else
5242
- LLDB_LOG (log, " Running function with timeout: {0} timed out, "
5243
- " abandoning execution." ,
5241
+ LLDB_LOG (log,
5242
+ " Running function with timeout: {0} timed out, "
5243
+ " abandoning execution." ,
5244
5244
timeout);
5245
5245
}
5246
5246
@@ -5663,8 +5663,7 @@ size_t Process::GetThreadStatus(Stream &strm,
5663
5663
continue ;
5664
5664
}
5665
5665
thread_sp->GetStatus (strm, start_frame, num_frames,
5666
- num_frames_with_source,
5667
- stop_format);
5666
+ num_frames_with_source, stop_format);
5668
5667
++num_thread_infos_dumped;
5669
5668
} else {
5670
5669
Log *log = GetLog (LLDBLog::Process);
@@ -5703,14 +5702,14 @@ bool Process::RunPreResumeActions() {
5703
5702
5704
5703
void Process::ClearPreResumeActions () { m_pre_resume_actions.clear (); }
5705
5704
5706
- void Process::ClearPreResumeAction (PreResumeActionCallback callback, void *baton)
5707
- {
5708
- PreResumeCallbackAndBaton element (callback, baton);
5709
- auto found_iter = std::find (m_pre_resume_actions.begin (), m_pre_resume_actions. end (), element);
5710
- if (found_iter != m_pre_resume_actions.end ())
5711
- {
5712
- m_pre_resume_actions.erase (found_iter);
5713
- }
5705
+ void Process::ClearPreResumeAction (PreResumeActionCallback callback,
5706
+ void *baton) {
5707
+ PreResumeCallbackAndBaton element (callback, baton);
5708
+ auto found_iter = std::find (m_pre_resume_actions.begin (),
5709
+ m_pre_resume_actions.end (), element);
5710
+ if (found_iter != m_pre_resume_actions. end ()) {
5711
+ m_pre_resume_actions.erase (found_iter);
5712
+ }
5714
5713
}
5715
5714
5716
5715
ProcessRunLock &Process::GetRunLock () {
@@ -5720,12 +5719,10 @@ ProcessRunLock &Process::GetRunLock() {
5720
5719
return m_public_run_lock;
5721
5720
}
5722
5721
5723
- bool Process::CurrentThreadIsPrivateStateThread ()
5724
- {
5722
+ bool Process::CurrentThreadIsPrivateStateThread () {
5725
5723
return m_private_state_thread.EqualsThread (Host::GetCurrentThread ());
5726
5724
}
5727
5725
5728
-
5729
5726
void Process::Flush () {
5730
5727
m_thread_list.Flush ();
5731
5728
m_extended_thread_list.Flush ();
@@ -5924,7 +5921,9 @@ void Process::PrintWarningUnsupportedLanguage(const SymbolContext &sc) {
5924
5921
if (!sc.module_sp )
5925
5922
return ;
5926
5923
LanguageType language = sc.GetLanguage ();
5927
- if (language == eLanguageTypeUnknown)
5924
+ if (language == eLanguageTypeUnknown ||
5925
+ language == lldb::eLanguageTypeAssembly ||
5926
+ language == lldb::eLanguageTypeMipsAssembler)
5928
5927
return ;
5929
5928
LanguageSet plugins =
5930
5929
PluginManager::GetAllTypeSystemSupportedLanguagesForTypes ();
@@ -6429,7 +6428,7 @@ static void GetCoreFileSaveRangesFull(Process &process,
6429
6428
std::set<addr_t > &stack_ends) {
6430
6429
6431
6430
// Don't add only dirty pages, add full regions.
6432
- const bool try_dirty_pages = false ;
6431
+ const bool try_dirty_pages = false ;
6433
6432
for (const auto ®ion : regions)
6434
6433
if (stack_ends.count (region.GetRange ().GetRangeEnd ()) == 0 )
6435
6434
AddRegion (region, try_dirty_pages, ranges);
0 commit comments