Can't set watchpoints on launching threads on Linux LLGS.
authorChaoren Lin <chaorenl@google.com>
Thu, 26 Feb 2015 19:48:15 +0000 (19:48 +0000)
committerChaoren Lin <chaorenl@google.com>
Thu, 26 Feb 2015 19:48:15 +0000 (19:48 +0000)
Summary:
They'll be set anyway when the thread starts running, so the launching threads
should just ignore the set request.

Reviewers: ovyalov

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D7914

llvm-svn: 230671

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

index ff52bf9..891155f 100644 (file)
@@ -218,6 +218,8 @@ NativeThreadLinux::SetWatchpoint (lldb::addr_t addr, size_t size, uint32_t watch
 {
     if (!hardware)
         return Error ("not implemented");
+    if (m_state == eStateLaunching)
+        return Error ();
     Error error = RemoveWatchpoint(addr);
     if (error.Fail()) return error;
     NativeRegisterContextSP reg_ctx = GetRegisterContext ();