[Lldb-commits] [PATCH] D152848: [lldb] Fix failure in TestStackCoreScriptedProcess on x86_64

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 21 10:57:33 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0c5b6320716b: [lldb] Fix failure in TestStackCoreScriptedProcess on x86_64 (authored by mib).

Changed prior to commit:
  https://reviews.llvm.org/D152848?vs=531017&id=533337#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152848

Files:
  lldb/include/lldb/Utility/StructuredData.h
  lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
  lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py


Index: lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py
===================================================================
--- lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py
+++ lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py
@@ -35,7 +35,6 @@
     @skipIfOutOfTreeDebugserver
     @skipIfRemote
     @skipIfAsan  # On ASAN builds, this test times-out (rdar://98678134)
-    @skipIfDarwin
     def test_launch_scripted_process_stack_frames(self):
         """Test that we can launch an lldb scripted process from the command
         line, check its process ID and read string from memory."""
Index: lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
===================================================================
--- lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
+++ lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
@@ -250,10 +250,12 @@
         StopInfo::CreateStopReasonWithBreakpointSiteID(*this, break_id);
   } break;
   case lldb::eStopReasonSignal: {
-    int signal;
+    uint32_t signal;
     llvm::StringRef description;
-    data_dict->GetValueForKeyAsInteger("signal", signal,
-                                       LLDB_INVALID_SIGNAL_NUMBER);
+    if (!data_dict->GetValueForKeyAsInteger("signal", signal)) {
+        signal = LLDB_INVALID_SIGNAL_NUMBER;
+        return false;
+    }
     data_dict->GetValueForKeyAsString("desc", description);
     stop_info_sp =
         StopInfo::CreateStopReasonWithSignal(*this, signal, description.data());
Index: lldb/include/lldb/Utility/StructuredData.h
===================================================================
--- lldb/include/lldb/Utility/StructuredData.h
+++ lldb/include/lldb/Utility/StructuredData.h
@@ -484,6 +484,7 @@
       }
       return success;
     }
+      
     template <class IntType>
     bool GetValueForKeyAsInteger(llvm::StringRef key, IntType &result) const {
       ObjectSP value_sp = GetValueForKey(key);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152848.533337.patch
Type: text/x-patch
Size: 2023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230621/a5e1d23a/attachment-0001.bin>


More information about the lldb-commits mailing list