summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
index 677aee34a18..b2730e60129 100644
--- a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
@@ -241,6 +241,9 @@ Status NativeThreadLinux::Resume(uint32_t signo) {
if (signo != LLDB_INVALID_SIGNAL_NUMBER)
data = signo;
+ // Before thread resumes, clear any cached register data structures
+ GetRegisterContext().InvalidateAllRegisters();
+
return NativeProcessLinux::PtraceWrapper(PTRACE_CONT, GetID(), nullptr,
reinterpret_cast<void *>(data));
}
@@ -262,6 +265,9 @@ Status NativeThreadLinux::SingleStep(uint32_t signo) {
if (signo != LLDB_INVALID_SIGNAL_NUMBER)
data = signo;
+ // Before thread resumes, clear any cached register data structures
+ GetRegisterContext().InvalidateAllRegisters();
+
// If hardware single-stepping is not supported, we just do a continue. The
// breakpoint on the next instruction has been setup in
// NativeProcessLinux::Resume.
OpenPOWER on IntegriCloud