[Lldb-commits] [PATCH] D84501: NativeThreadLinux invalidate register cache on stop

Muhammad Omair Javaid via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 19 00:31:16 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGaf4f40c376f5: [LLDB] NativeThreadLinux invalidate register cache on stop (authored by omjavaid).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84501/new/

https://reviews.llvm.org/D84501

Files:
  lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp


Index: lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
===================================================================
--- lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
+++ lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
@@ -241,9 +241,6 @@
   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));
 }
@@ -265,9 +262,6 @@
   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.
@@ -325,6 +319,9 @@
   if (m_state == StateType::eStateStepping)
     m_step_workaround.reset();
 
+  // On every stop, clear any cached register data structures
+  GetRegisterContext().InvalidateAllRegisters();
+
   const StateType new_state = StateType::eStateStopped;
   MaybeLogStateChange(new_state);
   m_state = new_state;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84501.286495.patch
Type: text/x-patch
Size: 1324 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200819/abc057e8/attachment-0001.bin>


More information about the lldb-commits mailing list