aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
diff options
context:
space:
mode:
authorEmmmer <yjhdandan@163.com>2022-08-16 15:37:23 +0800
committerEmmmer <yjhdandan@163.com>2022-08-16 23:43:28 +0800
commit8ed3e75c96d987e294067e2fe0ab5b02a5bcc89d (patch)
tree70c0a359c83bc45927d035cd54345218fb901593 /lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
parent95e2949a5352aea0182ba5295bf9ba46080c261e (diff)
downloadllvm-8ed3e75c96d987e294067e2fe0ab5b02a5bcc89d.zip
llvm-8ed3e75c96d987e294067e2fe0ab5b02a5bcc89d.tar.gz
llvm-8ed3e75c96d987e294067e2fe0ab5b02a5bcc89d.tar.bz2
[LLDB] Handle possible resume thread error
In this switch case we didn't handle possible errors in `ResumeThread()`, it's hard to get helpful information when it goes wrong. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D131946
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index 5556f69..a0f9f476 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -933,8 +933,14 @@ Status NativeProcessLinux::Resume(const ResumeActionList &resume_actions) {
case eStateStepping: {
// Run the thread, possibly feeding it the signal.
const int signo = action->signal;
- ResumeThread(static_cast<NativeThreadLinux &>(*thread), action->state,
- signo);
+ Status error = ResumeThread(static_cast<NativeThreadLinux &>(*thread),
+ action->state, signo);
+ if (error.Fail())
+ return Status("NativeProcessLinux::%s: failed to resume thread "
+ "for pid %" PRIu64 ", tid %" PRIu64 ", error = %s",
+ __FUNCTION__, GetID(), thread->GetID(),
+ error.AsCString());
+
break;
}