From 68d964d02418576c7b9ecbe5e8426d9681a1d3a8 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Tue, 13 Jun 2023 13:45:59 -0700 Subject: [PATCH] Revert "[lldb] Fix failure in TestStackCoreScriptedProcess on x86_64" This reverts commit 4177b490358432a457935ba5d6d076ae60de588f, since I landed it by mistake. --- lldb/include/lldb/Utility/StructuredData.h | 1 - lldb/source/Plugins/Process/scripted/ScriptedThread.cpp | 8 +++----- .../scripted_process/TestStackCoreScriptedProcess.py | 1 + 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lldb/include/lldb/Utility/StructuredData.h b/lldb/include/lldb/Utility/StructuredData.h index a9df052..d6b51f7 100644 --- a/lldb/include/lldb/Utility/StructuredData.h +++ b/lldb/include/lldb/Utility/StructuredData.h @@ -484,7 +484,6 @@ public: } return success; } - template bool GetValueForKeyAsInteger(llvm::StringRef key, IntType &result) const { ObjectSP value_sp = GetValueForKey(key); diff --git a/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp b/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp index 920c66f..ac707ff 100644 --- a/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp +++ b/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp @@ -250,12 +250,10 @@ bool ScriptedThread::CalculateStopInfo() { StopInfo::CreateStopReasonWithBreakpointSiteID(*this, break_id); } break; case lldb::eStopReasonSignal: { - unsigned int signal; + int signal; llvm::StringRef description; - if (!data_dict->GetValueForKeyAsInteger("signal", signal)) { - signal = LLDB_INVALID_SIGNAL_NUMBER; - return false; - } + data_dict->GetValueForKeyAsInteger("signal", signal, + LLDB_INVALID_SIGNAL_NUMBER); data_dict->GetValueForKeyAsString("desc", description); stop_info_sp = StopInfo::CreateStopReasonWithSignal(*this, signal, description.data()); diff --git a/lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py b/lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py index 28f8630..bf9681a 100644 --- a/lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py +++ b/lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py @@ -35,6 +35,7 @@ class StackCoreScriptedProcesTestCase(TestBase): @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.""" -- 2.7.4