aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectThread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectThread.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp
index 2edba1d..ccb5122 100644
--- a/lldb/source/Commands/CommandObjectThread.cpp
+++ b/lldb/source/Commands/CommandObjectThread.cpp
@@ -819,13 +819,6 @@ public:
bool DoExecute(Args &command, CommandReturnObject &result) override {
bool synchronous_execution = m_interpreter.GetSynchronous();
- if (!GetDebugger().GetSelectedTarget()) {
- result.AppendError("invalid target, create a debug target using the "
- "'target create' command");
- result.SetStatus(eReturnStatusFailed);
- return false;
- }
-
Process *process = m_exe_ctx.GetProcessPtr();
if (process == nullptr) {
result.AppendError("no process exists. Cannot continue");
@@ -1091,13 +1084,7 @@ protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
bool synchronous_execution = m_interpreter.GetSynchronous();
- Target *target = GetDebugger().GetSelectedTarget().get();
- if (target == nullptr) {
- result.AppendError("invalid target, create a debug target using the "
- "'target create' command");
- result.SetStatus(eReturnStatusFailed);
- return false;
- }
+ Target *target = &GetSelectedTarget();
Process *process = m_exe_ctx.GetProcessPtr();
if (process == nullptr) {