File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1221,8 +1221,8 @@ void Debugger::RedrawStatusline(bool update) {
1221
1221
}
1222
1222
1223
1223
ExecutionContext Debugger::GetSelectedExecutionContext () {
1224
- bool adopt_selected = true ;
1225
- ExecutionContextRef exe_ctx_ref ( GetSelectedTarget (). get (), adopt_selected);
1224
+ ExecutionContextRef exe_ctx_ref (& GetSelectedOrDummyTarget (),
1225
+ /* adopt_selected= */ true );
1226
1226
return ExecutionContext (exe_ctx_ref);
1227
1227
}
1228
1228
Original file line number Diff line number Diff line change @@ -134,11 +134,7 @@ void Statusline::Redraw(bool update) {
134
134
}
135
135
136
136
ExecutionContext exe_ctx = m_debugger.GetSelectedExecutionContext ();
137
-
138
- // For colors and progress events, the format entity needs access to the
139
- // debugger, which requires a target in the execution context.
140
- if (!exe_ctx.HasTargetScope ())
141
- exe_ctx.SetTargetPtr (&m_debugger.GetSelectedOrDummyTarget ());
137
+ assert (exe_ctx.HasTargetScope () && " format entity needs a target" );
142
138
143
139
SymbolContext symbol_ctx;
144
140
if (ProcessSP process_sp = exe_ctx.GetProcessSP ()) {
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ bool CommandObject::CheckRequirements(CommandReturnObject &result) {
147
147
// we don't want any CommandObject instances to keep any of these objects
148
148
// around longer than for a single command. Every command should call
149
149
// CommandObject::Cleanup() after it has completed.
150
- assert (!m_exe_ctx.GetTargetPtr ());
150
+ assert (!m_exe_ctx.GetTargetPtr () || m_exe_ctx. GetTargetRef (). IsDummyTarget () );
151
151
assert (!m_exe_ctx.GetProcessPtr ());
152
152
assert (!m_exe_ctx.GetThreadPtr ());
153
153
assert (!m_exe_ctx.GetFramePtr ());
You can’t perform that action at this time.
0 commit comments