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 bool GetValueForKeyAsInteger(llvm::StringRef key, IntType &result) const { ObjectSP value_sp = GetValueForKey(key); 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; + unsigned int 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());