File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1212#include " lldb/Host/StreamFile.h"
1313#include " lldb/Interpreter/CommandInterpreter.h"
1414#include " lldb/Symbol/SymbolContext.h"
15+ #include " lldb/Target/Process.h"
1516#include " lldb/Target/StackFrame.h"
1617#include " lldb/Utility/AnsiTerminal.h"
1718#include " lldb/Utility/StreamString.h"
@@ -134,8 +135,15 @@ void Statusline::Redraw(bool update) {
134135 exe_ctx.SetTargetPtr (&m_debugger.GetSelectedOrDummyTarget ());
135136
136137 SymbolContext symbol_ctx;
137- if (auto frame_sp = exe_ctx.GetFrameSP ())
138- symbol_ctx = frame_sp->GetSymbolContext (eSymbolContextEverything);
138+ if (ProcessSP process_sp = exe_ctx.GetProcessSP ()) {
139+ // Check if the process is stopped, and if it is, make sure it remains
140+ // stopped until we've computed the symbol context.
141+ Process::StopLocker stop_locker;
142+ if (stop_locker.TryLock (&process_sp->GetRunLock ())) {
143+ if (auto frame_sp = exe_ctx.GetFrameSP ())
144+ symbol_ctx = frame_sp->GetSymbolContext (eSymbolContextEverything);
145+ }
146+ }
139147
140148 StreamString stream;
141149 if (auto *format = m_debugger.GetStatuslineFormat ())
You can’t perform that action at this time.
0 commit comments