[Lldb-commits] [PATCH] D151043: [lldb] Add "Trace" stop reason in Scripted Thread

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon May 22 16:14:41 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG8f407b8e6329: [lldb] Add "Trace" stop reason in Scripted Thread (authored by mib).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151043

Files:
  lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
  lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
  lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py


Index: lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py
===================================================================
--- lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py
+++ lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py
@@ -67,9 +67,7 @@
         return lldb.eStateStopped
 
     def get_stop_reason(self) -> Dict[str, Any]:
-        return { "type": lldb.eStopReasonSignal, "data": {
-            "signal": signal.SIGINT
-        } }
+        return { "type": lldb.eStopReasonTrace, "data": {} }
 
     def get_register_context(self) -> str:
         return struct.pack(
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
@@ -186,7 +186,7 @@
         self.assertTrue(thread, "Invalid thread.")
         self.assertEqual(thread.GetThreadID(), 0x19)
         self.assertEqual(thread.GetName(), "DummyScriptedThread.thread-1")
-        self.assertStopReason(thread.GetStopReason(), lldb.eStopReasonSignal)
+        self.assertStopReason(thread.GetStopReason(), lldb.eStopReasonTrace)
 
         self.assertGreater(thread.GetNumFrames(), 0)
 
Index: lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
===================================================================
--- lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
+++ lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
@@ -258,6 +258,9 @@
     stop_info_sp =
         StopInfo::CreateStopReasonWithSignal(*this, signal, description.data());
   } break;
+  case lldb::eStopReasonTrace: {
+    stop_info_sp = StopInfo::CreateStopReasonToTrace(*this);
+  } break;
   case lldb::eStopReasonException: {
 #if defined(__APPLE__)
     StructuredData::Dictionary *mach_exception;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151043.524529.patch
Type: text/x-patch
Size: 1968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230522/28d1b456/attachment.bin>


More information about the lldb-commits mailing list