[Lldb-commits] [lldb] c8fbf80 - [lldb] Convert Process KDP Log to the new API

2022-01-31 Thread Pavel Labath via lldb-commits

Author: Pavel Labath
Date: 2022-01-31T08:59:41+01:00
New Revision: c8fbf8037d7ababd686c088461dbb5d52fd33fc7

URL: 
https://github.com/llvm/llvm-project/commit/c8fbf8037d7ababd686c088461dbb5d52fd33fc7
DIFF: 
https://github.com/llvm/llvm-project/commit/c8fbf8037d7ababd686c088461dbb5d52fd33fc7.diff

LOG: [lldb] Convert Process KDP Log to the new API

Added: 


Modified: 
lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h
lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp 
b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
index d397d16876300..ea1893002ddfd 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
@@ -65,7 +65,7 @@ bool CommunicationKDP::SendRequestAndGetReply(
 const CommandType command, const PacketStreamType &request_packet,
 DataExtractor &reply_packet) {
   if (IsRunning()) {
-Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PACKETS));
+Log *log = GetLog(KDPLog::Packets);
 if (log) {
   PacketStreamType log_strm;
   DumpPacket(log_strm, request_packet.GetData(), request_packet.GetSize());
@@ -133,7 +133,7 @@ bool CommunicationKDP::SendRequestPacketNoLock(
 const char *packet_data = request_packet.GetData();
 const size_t packet_size = request_packet.GetSize();
 
-Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PACKETS));
+Log *log = GetLog(KDPLog::Packets);
 if (log) {
   PacketStreamType log_strm;
   DumpPacket(log_strm, packet_data, packet_size);
@@ -178,7 +178,7 @@ size_t 
CommunicationKDP::WaitForPacketWithTimeoutMicroSecondsNoLock(
   uint8_t buffer[8192];
   Status error;
 
-  Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PACKETS));
+  Log *log = GetLog(KDPLog::Packets);
 
   // Check for a packet from our cache first without trying any reading...
   if (CheckForPacket(NULL, 0, packet))
@@ -231,7 +231,7 @@ bool CommunicationKDP::CheckForPacket(const uint8_t *src, 
size_t src_len,
   // Put the packet data into the buffer in a thread safe fashion
   std::lock_guard guard(m_bytes_mutex);
 
-  Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PACKETS));
+  Log *log = GetLog(KDPLog::Packets);
 
   if (src && src_len > 0) {
 if (log && log->GetVerbose()) {

diff  --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp 
b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index df046bf1f0755..6752ba3f69c8f 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -381,7 +381,7 @@ ProcessKDP::DoAttachToProcessWithName(const char 
*process_name,
 void ProcessKDP::DidAttach(ArchSpec &process_arch) {
   Process::DidAttach(process_arch);
 
-  Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
+  Log *log = GetLog(KDPLog::Process);
   LLDB_LOGF(log, "ProcessKDP::DidAttach()");
   if (GetID() != LLDB_INVALID_PROCESS_ID) {
 GetHostArchitecture(process_arch);
@@ -400,7 +400,7 @@ Status ProcessKDP::WillResume() { return Status(); }
 
 Status ProcessKDP::DoResume() {
   Status error;
-  Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
+  Log *log = GetLog(KDPLog::Process);
   // Only start the async thread if we try to do any process control
   if (!m_async_thread.IsJoinable())
 StartAsyncThread();
@@ -492,7 +492,7 @@ lldb::ThreadSP ProcessKDP::GetKernelThread() {
 bool ProcessKDP::DoUpdateThreadList(ThreadList &old_thread_list,
 ThreadList &new_thread_list) {
   // locker will keep a mutex locked until it goes out of scope
-  Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_THREAD));
+  Log *log = GetLog(KDPLog::Thread);
   LLDB_LOGV(log, "pid = {0}", GetID());
 
   // Even though there is a CPU mask, it doesn't mean we can see each CPU
@@ -530,7 +530,7 @@ Status ProcessKDP::DoHalt(bool &caused_stop) {
 
 Status ProcessKDP::DoDetach(bool keep_stopped) {
   Status error;
-  Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
+  Log *log = GetLog(KDPLog::Process);
   LLDB_LOGF(log, "ProcessKDP::DoDetach(keep_stopped = %i)", keep_stopped);
 
   if (m_comm.IsRunning()) {
@@ -715,7 +715,7 @@ void ProcessKDP::DebuggerInitialize(lldb_private::Debugger 
&debugger) {
 }
 
 bool ProcessKDP::StartAsyncThread() {
-  Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
+  Log *log = GetLog(KDPLog::Process);
 
   LLDB_LOGF(log, "ProcessKDP::StartAsyncThread ()");
 
@@ -725,9 +725,8 @@ bool ProcessKDP::StartAsyncThread() {
   llvm::Expected async_thread = ThreadLauncher::LaunchThread(
 

[Lldb-commits] [lldb] e1cad13 - [lldb] Support Rosetta registers in crashlog.py

2022-01-31 Thread Jonas Devlieghere via lldb-commits

Author: Jonas Devlieghere
Date: 2022-01-31T10:50:16-08:00
New Revision: e1cad1303bf9d2a77546469dc0987502692f80d9

URL: 
https://github.com/llvm/llvm-project/commit/e1cad1303bf9d2a77546469dc0987502692f80d9
DIFF: 
https://github.com/llvm/llvm-project/commit/e1cad1303bf9d2a77546469dc0987502692f80d9.diff

LOG: [lldb] Support Rosetta registers in crashlog.py

Rosetta crashlogs can have their own thread register state. Unlike the
other registers which ware directly listed under "threadState", the
Rosetta registers are nested under their own key in the JSON, as
illustrated below:

  {
  "threadState":
  {
  "rosetta":
  {
  "tmp2":
  {
  "value": 4935057216
  },
  "tmp1":
  {
  "value": 4365863188
  },
  "tmp0":
  {
  "value": 18446744073709551615
  }
  }
  }
  }

Added: 


Modified: 
lldb/examples/python/crashlog.py
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/a.out.ips
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test

Removed: 




diff  --git a/lldb/examples/python/crashlog.py 
b/lldb/examples/python/crashlog.py
index bdb9ae12b33ce..370b46a90bd99 100755
--- a/lldb/examples/python/crashlog.py
+++ b/lldb/examples/python/crashlog.py
@@ -523,10 +523,13 @@ def parse_threads(self, json_threads):
 def parse_thread_registers(self, json_thread_state):
 registers = dict()
 for key, state in json_thread_state.items():
+if key == "rosetta":
+   registers.update(self.parse_thread_registers(state))
+   continue
 try:
value = int(state['value'])
registers[key] = value
-except (TypeError, ValueError):
+except (KeyError, ValueError, TypeError):
pass
 return registers
 

diff  --git 
a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/a.out.ips 
b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/a.out.ips
index 109ac2ba24858..af72bba8c6d7c 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/a.out.ips
+++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/a.out.ips
@@ -106,6 +106,17 @@
   "rcx": {
 "value": 140732860114656
   },
+  "rosetta": {
+"tmp2": {
+  "value": 8
+},
+"tmp1": {
+  "value": 20
+},
+"tmp0": {
+  "value": 92
+}
+  },
   "flavor": "x86_THREAD_STATE",
   "rdi": {
 "value": 1

diff  --git a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test 
b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test
index b70cd44c0c8e8..1669b40f3aea0 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test
+++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test
@@ -13,5 +13,6 @@
 # CHECK: [  1] {{.*}}out`bar + 8 at test.c
 # CHECK: [  2] {{.*}}out`main + 19 at test.c
 # CHECK: rbp = 0x7ffeec22a530
+# CHECK: tmp2 = 0x0008
 # CHECK: invalid foo
 # CHECK: invalid bar



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


[Lldb-commits] [PATCH] D118482: [lldb/Plugins] Add lldb.ScriptedProcess.get_most_relevant_thread_index interpreter method

2022-01-31 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 404707.
mib retitled this revision from "[lldb/Plugins] Add 
ScriptedProcessInterface::GetSelectedThreadIndex method" to "[lldb/Plugins] Add 
lldb.ScriptedProcess.get_most_relevant_thread_index interpreter method".
mib edited the summary of this revision.
mib added a comment.

Following an offline discussion with @jingham, we agreed that we should leave 
the internal lldb machinery deal with selecting the right thread to be stopped 
at.

However, the interpreter `ScriptedProcess` method to let the user provide the 
most relevant thread index can still be very useful, for instance when creating 
the appropriate stop reason from the `ScriptedThread` instances to fetch the 
`most_relevant_thread_index` from `ScriptedProcess`.

This is why this update removes all the thread selecting logic from the 
ScriptedProcess plugin and makes it so `get_most_relevant_thread_index` cannot 
be accessed from the debugger.


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

https://reviews.llvm.org/D118482

Files:
  lldb/examples/python/scripted_process/scripted_process.py
  lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py


Index: 
lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py
===
--- 
lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py
+++ 
lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py
@@ -57,6 +57,9 @@
 
 return data
 
+def get_most_relevant_thread_index(self):
+return 3
+
 def get_loaded_images(self):
 # TODO: Iterate over corefile_target modules and build a data structure
 # from it.
Index: lldb/examples/python/scripted_process/scripted_process.py
===
--- lldb/examples/python/scripted_process/scripted_process.py
+++ lldb/examples/python/scripted_process/scripted_process.py
@@ -76,6 +76,15 @@
 """
 pass
 
+def get_most_relevant_thread_index(self):
+""" Get the index of the most releveant scripted process thread.
+
+Returns:
+Int: The most relevant thread index according to the user.
+ (default: 0)
+"""
+return 0
+
 @abstractmethod
 def get_registers_for_thread(self, tid):
 """ Get the register context dictionary for a certain thread of


Index: lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py
===
--- lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py
+++ lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py
@@ -57,6 +57,9 @@
 
 return data
 
+def get_most_relevant_thread_index(self):
+return 3
+
 def get_loaded_images(self):
 # TODO: Iterate over corefile_target modules and build a data structure
 # from it.
Index: lldb/examples/python/scripted_process/scripted_process.py
===
--- lldb/examples/python/scripted_process/scripted_process.py
+++ lldb/examples/python/scripted_process/scripted_process.py
@@ -76,6 +76,15 @@
 """
 pass
 
+def get_most_relevant_thread_index(self):
+""" Get the index of the most releveant scripted process thread.
+
+Returns:
+Int: The most relevant thread index according to the user.
+ (default: 0)
+"""
+return 0
+
 @abstractmethod
 def get_registers_for_thread(self, tid):
 """ Get the register context dictionary for a certain thread of
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D118484: [lldb/test] Fix TestScriptedProcess.py timeout on x86_64

2022-01-31 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib updated this revision to Diff 404726.
mib added a comment.

Update following D118482  latest change


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118484

Files:
  lldb/examples/python/scripted_process/scripted_process.py
  lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
  lldb/test/API/functionalities/scripted_process/invalid_scripted_process.py
  lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py

Index: lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py
===
--- lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py
+++ lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py
@@ -122,17 +122,19 @@
 def get_stop_reason(self) -> Dict[str, Any]:
 stop_reason = { "type": lldb.eStopReasonInvalid, "data": {  }}
 
-if self.corefile_thread and self.corefile_thread.IsValid:
-stop_reason["type"] = self.corefile_thread.GetStopReason()
-
-if self.corefile_thread.GetStopReasonDataCount() > 0:
-if stop_reason["type"] == lldb.eStopReasonBreakpoint:
-stop_reason["data"]["break_id"] = self.corefile_thread.GetStopReasonDataAtIndex(0)
-stop_reason["data"]["break_loc_id"] = self.corefile_thread.GetStopReasonDataAtIndex(1)
-elif stop_reason["type"] == lldb.eStopReasonSignal:
-stop_reason["data"]["signal"] = signal.SIGINT
-elif stop_reason["type"] == lldb.eStopReasonException:
+if self.corefile_thread and self.corefile_thread.IsValid():
+stop_reason["type"] = lldb.eStopReasonNone
+
+selected_thread_idx = self.scripted_process.get_most_relevant_thread_index()
+if selected_thread_idx == self.corefile_thread.GetIndexID():
+if 'arm64' in self.scripted_process.arch:
+stop_reason["type"] = lldb.eStopReasonException
 stop_reason["data"]["desc"] = self.corefile_thread.GetStopDescription(100)
+elif self.scripted_process.arch == 'x86_64':
+stop_reason["type"] = lldb.eStopReasonSignal
+stop_reason["data"]["signal"] = signal.SIGTRAP
+else:
+stop_reason["type"] = self.corefile_thread.GetStopReason()
 
 return stop_reason
 
Index: lldb/test/API/functionalities/scripted_process/invalid_scripted_process.py
===
--- lldb/test/API/functionalities/scripted_process/invalid_scripted_process.py
+++ lldb/test/API/functionalities/scripted_process/invalid_scripted_process.py
@@ -54,7 +54,7 @@
 
 def get_stop_reason(self) -> Dict[str, Any]:
 return { "type": lldb.eStopReasonSignal, "data": {
-"signal": signal.SIGINT
+"signal": signal.SIGTRAP
 } }
 
 def get_stackframes(self):
Index: lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
===
--- lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
+++ lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
@@ -142,7 +142,6 @@
 self.assertTrue(self.dbg.DeleteTarget(target), "Couldn't delete target")
 
 @skipUnlessDarwin
-@skipIf(archs=no_match(['arm64', 'arm64e']))
 @skipIfOutOfTreeDebugserver
 def test_launch_scripted_process_stack_frames(self):
 """Test that we can launch an lldb scripted process from the command
@@ -196,6 +195,22 @@
 self.assertTrue(thread, "Invalid thread.")
 self.assertEqual(thread.GetName(), "StackCoreScriptedThread.thread-2")
 
+self.assertTrue(target.triple, "Invalid target triple")
+arch = target.triple.split('-')[0]
+supported_arch = ['x86_64', 'arm64', 'arm64e']
+self.assertIn(arch, supported_arch)
+# When creating a corefile of a arm process, lldb saves the exception
+# that triggers the breakpoint in the LC_NOTES of the corefile, so they
+# can be reloaded with the corefile on the next debug session.
+if arch in 'arm64e':
+self.assertTrue(thread.GetStopReason(), lldb.eStopReasonException)
+# However, it's architecture specific, and corefiles made from intel
+# process don't save any metadata to retrieve to stop reason.
+# To mitigate this, the StackCoreScriptedProcess will report a
+# eStopReasonSignal with a SIGTRAP, mimicking what debugserver does.
+else:
+self.assertTrue(thread.GetStopReason(), lldb.eStopReasonSignal)
+
 self.assertEqual(thread.GetNumFrames(), 6)
 frame = thread.GetSelectedFrame()
 self.assert

[Lldb-commits] [PATCH] D118482: [lldb/Plugins] Add lldb.ScriptedProcess.get_most_relevant_thread_index interpreter method

2022-01-31 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment.

As an implementation detail for stack_core_scripted_process this seems fine.  
I'm not sure whether it belongs in the generic scripted_process.py example 
however.  If you do have reasons for keeping it there as well, I think you need 
to say what it means for a thread to be the "most relevant" from a scripted 
process's point of view.


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

https://reviews.llvm.org/D118482

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


[Lldb-commits] [lldb] d329dfd - [lldb] Use the build's python interpreter in the shell tests

2022-01-31 Thread Jonas Devlieghere via lldb-commits

Author: Jonas Devlieghere
Date: 2022-01-31T16:53:42-08:00
New Revision: d329dfd0c8576f022ce851a41d9555884b876390

URL: 
https://github.com/llvm/llvm-project/commit/d329dfd0c8576f022ce851a41d9555884b876390
DIFF: 
https://github.com/llvm/llvm-project/commit/d329dfd0c8576f022ce851a41d9555884b876390.diff

LOG: [lldb] Use the build's python interpreter in the shell tests

Make sure that the shell tests use the same python interpreter as the
rest of the build instead of picking up `python` from the PATH.

It would be nice if we could use the _disallow helper, but that triggers
on invocations that specify python as the scripting language.

Added: 


Modified: 
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/no_threadState.test
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/text.test

Removed: 




diff  --git a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test 
b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test
index 1669b40f3aea0..068e8ef776575 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test
+++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test
@@ -1,11 +1,11 @@
 # RUN: %clang_host -g %S/Inputs/test.c -o %t.out
 
 # RUN: cp %S/Inputs/a.out.ips %t.crash
-# RUN: python %S/patch-crashlog.py --binary %t.out --crashlog %t.crash 
--offsets '{"main":20, "bar":9, "foo":16}' --json
+# RUN: %python %S/patch-crashlog.py --binary %t.out --crashlog %t.crash 
--offsets '{"main":20, "bar":9, "foo":16}' --json
 # RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 
'crashlog %t.crash' 2>&1 | FileCheck %s
 
 # RUN: cp %S/Inputs/a.out.ips %t.nometadata.crash
-# RUN: python %S/patch-crashlog.py --binary %t.out --crashlog 
%t.nometadata.crash --offsets '{"main":20, "bar":9, "foo":16}' --json 
--no-metadata
+# RUN: %python %S/patch-crashlog.py --binary %t.out --crashlog 
%t.nometadata.crash --offsets '{"main":20, "bar":9, "foo":16}' --json 
--no-metadata
 # RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 
'crashlog %t.nometadata.crash' 2>&1 | FileCheck %s
 
 # CHECK: Thread[0] Crashing Thread Name EXC_BAD_ACCESS (SIGSEGV) 
(KERN_INVALID_ADDRESS at 0x)

diff  --git 
a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/no_threadState.test 
b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/no_threadState.test
index 4092efe6de02e..6d147e7274fb4 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/no_threadState.test
+++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/no_threadState.test
@@ -1,7 +1,7 @@
 # RUN: %clang_host -g %S/Inputs/test.c -o %t.out
 
 # RUN: cp %S/Inputs/no_threadState.ips %t.crash
-# RUN: python %S/patch-crashlog.py --binary %t.out --crashlog %t.crash 
--offsets '{"main":20, "bar":9, "foo":16}' --json
+# RUN: %python %S/patch-crashlog.py --binary %t.out --crashlog %t.crash 
--offsets '{"main":20, "bar":9, "foo":16}' --json
 # RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 
'crashlog %t.crash' 2>&1 | FileCheck %s
 
 # CHECK: Thread[0] Crashing Thread Name EXC_BAD_ACCESS (SIGSEGV) 
(KERN_INVALID_ADDRESS at 0x)

diff  --git a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/text.test 
b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/text.test
index 44ee5cb80431f..df8dcaad4f0ee 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/text.test
+++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/text.test
@@ -1,6 +1,6 @@
 # RUN: %clang_host -g %S/Inputs/test.c -o %t.out
 # RUN: cp %S/Inputs/a.out.crash %t.crash
-# RUN: python %S/patch-crashlog.py --binary %t.out --crashlog %t.crash 
--offsets '{"main":20, "bar":9, "foo":16}'
+# RUN: %python %S/patch-crashlog.py --binary %t.out --crashlog %t.crash 
--offsets '{"main":20, "bar":9, "foo":16}'
 # RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 
'crashlog %t.crash' 2>&1 | FileCheck %s
 
 # CHECK: Thread[0] EXC_BAD_ACCESS (SIGSEGV) (KERN_INVALID_ADDRESS at 
0x)



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