[Lldb-commits] [PATCH] D68179: [lldb] Fix JSON parser to allow empty arrays

2019-11-09 Thread Alex Cameron via Phabricator via lldb-commits
tetsuo-cpp updated this revision to Diff 228561.
Herald added a subscriber: mgorny.

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

https://reviews.llvm.org/D68179

Files:
  lldb/tools/debugserver/source/JSON.cpp
  lldb/tools/debugserver/source/JSON.h
  lldb/unittests/debugserver/CMakeLists.txt
  lldb/unittests/debugserver/JSONTest.cpp

Index: lldb/unittests/debugserver/JSONTest.cpp
===
--- /dev/null
+++ lldb/unittests/debugserver/JSONTest.cpp
@@ -0,0 +1,89 @@
+//===-- JSONTest.cpp ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+
+#include "JSON.h"
+
+template 
+void TestJSON(JSONValue *json_val, const std::function &test_func) {
+  EXPECT_THAT(json_val, testing::NotNull());
+  EXPECT_TRUE(T::classof(json_val));
+  test_func(static_cast(*json_val));
+}
+
+JSONValue::SP ParseJSON(const char *json_string) {
+  return JSONParser(json_string).ParseJSONValue();
+}
+
+template 
+void ParseAndTestJSON(
+const char *json_string,
+const std::function &test_func = [](T &) {}) {
+  auto json_val = ParseJSON(json_string);
+  TestJSON(json_val.get(), test_func);
+}
+
+TEST(JSON, Parse) {
+  ParseAndTestJSON("\"foo\"", [](JSONString &string_val) {
+EXPECT_EQ(string_val.GetData(), "foo");
+  });
+  EXPECT_THAT(ParseJSON("\"foo"), testing::IsNull());
+  ParseAndTestJSON("3", [](JSONNumber &number_val) {
+EXPECT_EQ(number_val.GetAsSigned(), 3);
+EXPECT_EQ(number_val.GetAsUnsigned(), 3u);
+EXPECT_EQ(number_val.GetAsDouble(), 3.0);
+  });
+  ParseAndTestJSON("-5", [](JSONNumber &number_val) {
+EXPECT_EQ(number_val.GetAsSigned(), -5);
+EXPECT_EQ(number_val.GetAsDouble(), -5.0);
+  });
+  ParseAndTestJSON("-6.4", [](JSONNumber &number_val) {
+EXPECT_EQ(number_val.GetAsSigned(), -6);
+EXPECT_EQ(number_val.GetAsDouble(), -6.4);
+  });
+  EXPECT_THAT(ParseJSON("-1.2.3"), testing::IsNull());
+  ParseAndTestJSON("true");
+  ParseAndTestJSON("false");
+  ParseAndTestJSON("null");
+  ParseAndTestJSON(
+  "{ \"key1\": 4, \"key2\": \"foobar\" }", [](JSONObject &obj_val) {
+TestJSON(obj_val.GetObject("key1").get(),
+ [](JSONNumber &number_val) {
+   EXPECT_EQ(number_val.GetAsSigned(), 4);
+   EXPECT_EQ(number_val.GetAsUnsigned(), 4u);
+   EXPECT_EQ(number_val.GetAsDouble(), 4.0);
+ });
+TestJSON(obj_val.GetObject("key2").get(),
+ [](JSONString &string_val) {
+   EXPECT_EQ(string_val.GetData(), "foobar");
+ });
+  });
+  ParseAndTestJSON("[1, \"bar\", 3.14]", [](JSONArray &array_val) {
+EXPECT_EQ(array_val.GetNumElements(), 3u);
+TestJSON(array_val.GetObject(0).get(),
+ [](JSONNumber &number_val) {
+   EXPECT_EQ(number_val.GetAsSigned(), 1);
+   EXPECT_EQ(number_val.GetAsUnsigned(), 1u);
+   EXPECT_EQ(number_val.GetAsDouble(), 1.0);
+ });
+TestJSON(
+array_val.GetObject(1).get(),
+[](JSONString &string_val) { EXPECT_EQ(string_val.GetData(), "bar"); });
+TestJSON(array_val.GetObject(2).get(),
+ [](JSONNumber &number_val) {
+   EXPECT_EQ(number_val.GetAsSigned(), 3);
+   EXPECT_EQ(number_val.GetAsUnsigned(), 3u);
+   EXPECT_EQ(number_val.GetAsDouble(), 3.14);
+ });
+  });
+  ParseAndTestJSON("[]", [](JSONArray &array_val) {
+EXPECT_EQ(array_val.GetNumElements(), 0u);
+  });
+}
Index: lldb/unittests/debugserver/CMakeLists.txt
===
--- lldb/unittests/debugserver/CMakeLists.txt
+++ lldb/unittests/debugserver/CMakeLists.txt
@@ -8,6 +8,7 @@
 ${LLDB_SOURCE_DIR}/tools/debugserver/source/MacOSX)
 
 add_lldb_unittest(debugserverTests
+  JSONTest.cpp
   RNBSocketTest.cpp
   debugserver_LogCallback.cpp
 
@@ -24,8 +25,9 @@
   WITH_FBS
   WITH_BKS
   )
-  
+
   add_lldb_unittest(debugserverNonUITests
+JSONTest.cpp
 RNBSocketTest.cpp
 debugserver_LogCallback.cpp
 
Index: lldb/tools/debugserver/source/JSON.h
===
--- lldb/tools/debugserver/source/JSON.h
+++ lldb/tools/debugserver/source/JSON.h
@@ -292,6 +292,8 @@
   JSONValue::SP ParseJSONValue();
 
 protected:
+  JSONValue::SP ParseJSONValue(const std::

[Lldb-commits] [PATCH] D68179: [lldb] Fix JSON parser to allow empty arrays

2019-11-09 Thread Alex Cameron via Phabricator via lldb-commits
tetsuo-cpp added a comment.

I've had a try at writing some unit tests for the JSON parser in `debugserver`, 
including the empty array case which I'm fixing in this patch.


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

https://reviews.llvm.org/D68179



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D70022: [lldb] [Process/NetBSD] Improve threading support

2019-11-09 Thread Michał Górny via Phabricator via lldb-commits
mgorny marked 7 inline comments as done.
mgorny added a comment.

I've made the changes locally, I'll test and reupload when I finish updating 
the whole batch.




Comment at: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:241
   case TRAP_BRKPT:
-for (const auto &thread : m_threads) {
-  static_cast(*thread).SetStoppedByBreakpoint();
-  FixupBreakpointPCAsNeeded(static_cast(*thread));
+if (thread) {
+  thread->SetStoppedByBreakpoint();

krytarowski wrote:
> This shall be always true unless there is a kernel issue.
> But this check is fine, I would just add a comment.
We already log the issue above.



Comment at: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:248
   case TRAP_TRACE:
-for (const auto &thread : m_threads)
-  static_cast(*thread).SetStoppedByTrace();
+if (thread)
+  thread->SetStoppedByTrace();

krytarowski wrote:
> Same here. Isn't there a fixup for PC?
> 
> It's not needed in x86 and can be delayed into future.
I dunno and I don't want to proactively add something I can't test right now.



Comment at: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:268
+ptrace_state_t pst;
+Status error = PtraceWrapper(PT_GET_PROCESS_STATE, GetID(), &pst,
+ sizeof(pst));

krytarowski wrote:
> Maybe `GetID()` -> `pid`? Same later.
Indeed, good catch.



Comment at: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:314
 
 // If a breakpoint was hit, report it
 uint32_t bp_index = LLDB_INVALID_INDEX32;

Actually, I've decided to remove this block for now rather than adding dummy 
APIs to make it not crash. We will have to update it to match watchpoint logic 
later on anyway, so we may as well copy and modify the watchpoint logic instead.



Comment at: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:790
+void NativeProcessNetBSD::RemoveThread(lldb::tid_t thread_id) {
+  Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD));
+  LLDB_LOG(log, "pid {0} removing thread with tid {1}", GetID(), thread_id);

krytarowski wrote:
> I would add an assert `thread_id > 0`.
Added here and to `AddThread()` as well.


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

https://reviews.llvm.org/D70022



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D70025: [lldb] [Process/NetBSD] Fix handling concurrent watchpoint events

2019-11-09 Thread Michał Górny via Phabricator via lldb-commits
mgorny marked an inline comment as done.
mgorny added inline comments.



Comment at: 
lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:899
+  (dr7_value.GetAsUInt64() & bit_mask) != (rw_bits | size_bits)) {
+// for watchpoints 0, 1, 2, or 3, respectively, clear bits 0, 1, 2, or 3 of
+// the debug status register (DR6)

Just occurred to me I can probably reuse the new function here.


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

https://reviews.llvm.org/D70025



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D70023: [lldb] [Process/NetBSD] Copy watchpoints to newly-created threads

2019-11-09 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment.

In D70023#1739356 , @krytarowski wrote:

> How does it deal with `security.models.extensions.user_set_dbregs`? If there 
> is a handled error than it's fine.


I need to test it. Might turn out it's so broken it's better to address it 
globally in a separate patch.


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

https://reviews.llvm.org/D70023



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D70025: [lldb] [Process/NetBSD] Fix handling concurrent watchpoint events

2019-11-09 Thread Michał Górny via Phabricator via lldb-commits
mgorny marked an inline comment as done.
mgorny added inline comments.



Comment at: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:334
 
 thread->SetStoppedByTrace();
 SetState(StateType::eStateStopped, true);

krytarowski wrote:
> I presume that in this code path we land into a scenario that:
> 
> 1. Trap on a different LWP
> 2. User sets new watchpoints
> 3. We land here with a SIGTRAP on old watchpoint that was wiped out.
> 
> If so, we shall ignore this report, bail out and resume execution with 
> `PT_CONTINUE`.
> 
> I think that this path could be some remnant from Linux shared trap reasons.
I was wondering whether it's better to silently ignore unknown watchpoints or 
stop the process. Decided the latter is better for the user, in case it carried 
some useful information still. Not to mention it has lower risk of crashing 
lldb-server if I get some logic wrong.


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

https://reviews.llvm.org/D70025



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D70025: [lldb] [Process/NetBSD] Fix handling concurrent watchpoint events

2019-11-09 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 228568.
mgorny added a comment.

Updated as noted in comments, particularly reuse `ClearWatchpointHit()` when 
setting new wp.


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

https://reviews.llvm.org/D70025

Files:
  lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
  lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h
  lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
  lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h

Index: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
===
--- lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
+++ lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
@@ -58,6 +58,8 @@
 
   bool ClearHardwareWatchpoint(uint32_t wp_index) override;
 
+  Status ClearWatchpointHit(uint32_t wp_index) override;
+
   Status ClearAllHardwareWatchpoints() override;
 
   Status SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size,
Index: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
===
--- lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
+++ lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
@@ -853,10 +853,10 @@
   if (!is_vacant)
 return Status("Watchpoint index not vacant");
 
-  RegisterValue reg_value;
   const RegisterInfo *const reg_info_dr7 =
   GetRegisterInfoAtIndex(lldb_dr7_x86_64);
-  error = ReadRegister(reg_info_dr7, reg_value);
+  RegisterValue dr7_value;
+  error = ReadRegister(reg_info_dr7, dr7_value);
   if (error.Fail())
 return error;
 
@@ -874,16 +874,28 @@
 
   uint64_t bit_mask = (0x3 << (2 * wp_index)) | (0xF << (16 + 4 * wp_index));
 
-  uint64_t control_bits = reg_value.GetAsUInt64() & ~bit_mask;
+  uint64_t control_bits = dr7_value.GetAsUInt64() & ~bit_mask;
 
   control_bits |= enable_bit | rw_bits | size_bits;
 
   const RegisterInfo *const reg_info_drN =
   GetRegisterInfoAtIndex(lldb_dr0_x86_64 + wp_index);
-  error = WriteRegister(reg_info_drN, RegisterValue(addr));
+  RegisterValue drN_value;
+  error = ReadRegister(reg_info_drN, drN_value);
   if (error.Fail())
 return error;
 
+  // clear dr6 if address or bits changed (i.e. we're not reenabling the same
+  // watchpoint)
+  if (drN_value.GetAsUInt64() != addr ||
+  (dr7_value.GetAsUInt64() & bit_mask) != (rw_bits | size_bits)) {
+ClearWatchpointHit(wp_index);
+
+error = WriteRegister(reg_info_drN, RegisterValue(addr));
+if (error.Fail())
+  return error;
+  }
+
   error = WriteRegister(reg_info_dr7, RegisterValue(control_bits));
   if (error.Fail())
 return error;
@@ -897,32 +909,36 @@
   if (wp_index >= NumSupportedHardwareWatchpoints())
 return false;
 
+  // for watchpoints 0, 1, 2, or 3, respectively, clear bits 0-1, 2-3, 4-5
+  // or 6-7 of the debug control register (DR7)
+  const RegisterInfo *const reg_info_dr7 =
+  GetRegisterInfoAtIndex(lldb_dr7_x86_64);
   RegisterValue reg_value;
+  Status error = ReadRegister(reg_info_dr7, reg_value);
+  if (error.Fail())
+return false;
+  uint64_t bit_mask = 0x3 << (2 * wp_index);
+  uint64_t control_bits = reg_value.GetAsUInt64() & ~bit_mask;
+
+  return WriteRegister(reg_info_dr7, RegisterValue(control_bits)).Success();
+}
 
-  // for watchpoints 0, 1, 2, or 3, respectively, clear bits 0, 1, 2, or 3 of
+Status NativeRegisterContextNetBSD_x86_64::ClearWatchpointHit(uint32_t wp_index) {
+  if (wp_index >= NumSupportedHardwareWatchpoints())
+return Status("Watchpoint index out of range");
+
+  // for watchpoints 0, 1, 2, or 3, respectively, check bits 0, 1, 2, or 3 of
   // the debug status register (DR6)
   const RegisterInfo *const reg_info_dr6 =
   GetRegisterInfoAtIndex(lldb_dr6_x86_64);
+  RegisterValue reg_value;
   Status error = ReadRegister(reg_info_dr6, reg_value);
   if (error.Fail())
-return false;
+return error;
+
   uint64_t bit_mask = 1 << wp_index;
   uint64_t status_bits = reg_value.GetAsUInt64() & ~bit_mask;
-  error = WriteRegister(reg_info_dr6, RegisterValue(status_bits));
-  if (error.Fail())
-return false;
-
-  // for watchpoints 0, 1, 2, or 3, respectively, clear bits {0-1,16-19},
-  // {2-3,20-23}, {4-5,24-27}, or {6-7,28-31} of the debug control register
-  // (DR7)
-  const RegisterInfo *const reg_info_dr7 =
-  GetRegisterInfoAtIndex(lldb_dr7_x86_64);
-  error = ReadRegister(reg_info_dr7, reg_value);
-  if (error.Fail())
-return false;
-  bit_mask = (0x3 << (2 * wp_index)) | (0xF << (16 + 4 * wp_index));
-  uint64_t control_bits = reg_value.GetAsUInt64() & ~bit_mask;
-  return WriteRegister(reg_info_dr7, RegisterValue(control_bits)).Success();
+  return WriteRegister(reg_info_dr6, RegisterValue(status_bits));
 }
 
 Status NativeRegisterContextNetBSD_x86_64::C

[Lldb-commits] [PATCH] D70022: [lldb] [Process/NetBSD] Improve threading support

2019-11-09 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 228567.
mgorny marked 2 inline comments as done.
mgorny added a comment.

Update wrt comments. Also remove non-working hardware breakpoint boilerplate as 
noted.


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

https://reviews.llvm.org/D70022

Files:
  lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
  lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
  lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
  lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h

Index: lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
===
--- lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
+++ lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
@@ -48,11 +48,16 @@
 private:
   // Interface for friend classes
 
+  Status Resume();
+  Status SingleStep();
+  Status Suspend();
+
   void SetStoppedBySignal(uint32_t signo, const siginfo_t *info = nullptr);
   void SetStoppedByBreakpoint();
   void SetStoppedByTrace();
   void SetStoppedByExec();
   void SetStoppedByWatchpoint(uint32_t wp_index);
+  void SetStoppedWithNoReason();
   void SetStopped();
   void SetRunning();
   void SetStepping();
Index: lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
===
--- lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
+++ lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
@@ -17,6 +17,11 @@
 #include "lldb/Utility/RegisterValue.h"
 #include "lldb/Utility/State.h"
 
+// clang-format off
+#include 
+#include 
+// clang-format on
+
 #include 
 
 using namespace lldb;
@@ -30,6 +35,38 @@
 NativeRegisterContextNetBSD::CreateHostNativeRegisterContextNetBSD(process.GetArchitecture(), *this)
 ), m_stop_description() {}
 
+Status NativeThreadNetBSD::Resume() {
+  Status ret = NativeProcessNetBSD::PtraceWrapper(PT_RESUME, m_process.GetID(),
+  nullptr, GetID());
+  if (!ret.Success())
+return ret;
+  ret = NativeProcessNetBSD::PtraceWrapper(PT_CLEARSTEP, m_process.GetID(),
+   nullptr, GetID());
+  if (ret.Success())
+SetRunning();
+  return ret;
+}
+
+Status NativeThreadNetBSD::SingleStep() {
+  Status ret = NativeProcessNetBSD::PtraceWrapper(PT_RESUME, m_process.GetID(),
+  nullptr, GetID());
+  if (!ret.Success())
+return ret;
+  ret = NativeProcessNetBSD::PtraceWrapper(PT_SETSTEP, m_process.GetID(),
+   nullptr, GetID());
+  if (ret.Success())
+SetStepping();
+  return ret;
+}
+
+Status NativeThreadNetBSD::Suspend() {
+  Status ret = NativeProcessNetBSD::PtraceWrapper(PT_SUSPEND, m_process.GetID(),
+  nullptr, GetID());
+  if (ret.Success())
+SetStopped();
+  return ret;
+}
+
 void NativeThreadNetBSD::SetStoppedBySignal(uint32_t signo,
 const siginfo_t *info) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD));
@@ -89,6 +126,13 @@
   m_stop_info.details.signal.signo = SIGTRAP;
 }
 
+void NativeThreadNetBSD::SetStoppedWithNoReason() {
+  SetStopped();
+
+  m_stop_info.reason = StopReason::eStopReasonNone;
+  m_stop_info.details.signal.signo = 0;
+}
+
 void NativeThreadNetBSD::SetStopped() {
   const StateType new_state = StateType::eStateStopped;
   m_state = new_state;
Index: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
===
--- lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
+++ lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
@@ -98,6 +98,7 @@
   bool HasThreadNoLock(lldb::tid_t thread_id);
 
   NativeThreadNetBSD &AddThread(lldb::tid_t thread_id);
+  void RemoveThread(lldb::tid_t thread_id);
 
   void MonitorCallback(lldb::pid_t pid, int signal);
   void MonitorExited(lldb::pid_t pid, WaitStatus status);
Index: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
===
--- lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
+++ lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
@@ -9,7 +9,6 @@
 #include "NativeProcessNetBSD.h"
 
 
-
 #include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
 #include "lldb/Host/HostProcess.h"
 #include "lldb/Host/common/NativeRegisterContext.h"
@@ -99,6 +98,17 @@
   pid, launch_info.GetPTY().ReleaseMasterFileDescriptor(), native_delegate,
   Info.GetArchitecture(), mainloop));
 
+  // Enable event reporting
+  ptrace_event_t events;
+  status = PtraceWrapper(PT_GET_EVENT_MASK, pid, &events, sizeof(events));
+  if (status.Fail())
+return status.ToError();
+  // TODO: PTRACE_FORK | PTRACE_VFORK | PTRACE_POSIX_SPAWN?
+  events.pe_set_event |= PTRACE_LWP_CREATE | PTRACE_LWP_EXIT;
+  statu

Re: [Lldb-commits] [PATCH] D62931: [lldb-server] Add setting to force 'g' packet use

2019-11-09 Thread Jan Kratochvil via lldb-commits
On Sat, 09 Nov 2019 03:25:51 +0100, Jason Molenda via lldb-commits wrote:
> I'm switching the default for at least the weekend via 
> 60ab30ebce833c87bd4776f67cd9a82fe162ef9c / 
> https://reviews.llvm.org/rG60ab30ebce83 so the bots aren't failing because of 
> this, we can all look into this next week.  I think the best solution is to 
> get lldb to fall back to p/P if g/G are not supported (which we need to talk 
> to some targets), and disable debugserver's g/G packet support until I can 
> debug where the bug is over there.
> 
> I'm still concerned about some of the macos CI bots which use the installed 
> debugservers, which will continue to have this g/G bug for a while, we'll 
> figure all that out next week.

Linux Fedora 30 x86_64:
d162e02cee74a3dbbfb1317fa9749f5e18610282

  File 
"/home/jkratoch/redhat/llvm-monorepo/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoGPacketSupported.py",
 line 93, in test
self.assertEqual(rax, 0xffe03c778278)
AssertionError: 0 != 18446743937285063288L


Jan

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits