[lldb/crashlog] Add support for Application Specific Backtraces & Information
For an exception crashlog, the thread backtraces aren't usually very helpful and instead, developpers look at the "Application Specific Backtrace" that was generated by `objc_exception_throw`. LLDB could already parse and symbolicate these Application Specific Backtraces for regular textual-based crashlog, so this patch adds support to parse them in JSON crashlogs, and materialize them a HistoryThread extending the crashed ScriptedThread. This patch also includes the Application Specific Information messages as part of the process extended crash information log. To do so, the ScriptedProcess Python interface has a new GetMetadata method that returns an arbitrary dictionary with data related to the process. rdar://93207586 Differential Revision: https://reviews.llvm.org/D126260 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
@@ -485,6 +485,19 @@ ScriptedProcess::GetLoadedDynamicLibrariesInfos() {
|
||||
return loaded_images_sp;
|
||||
}
|
||||
|
||||
lldb_private::StructuredData::DictionarySP ScriptedProcess::GetMetadata() {
|
||||
CheckInterpreterAndScriptObject();
|
||||
|
||||
StructuredData::DictionarySP metadata_sp = GetInterface().GetMetadata();
|
||||
|
||||
Status error;
|
||||
if (!metadata_sp || !metadata_sp->GetSize())
|
||||
return ScriptedInterface::ErrorWithMessage<StructuredData::DictionarySP>(
|
||||
LLVM_PRETTY_FUNCTION, "No metadata.", error);
|
||||
|
||||
return metadata_sp;
|
||||
}
|
||||
|
||||
ScriptedProcessInterface &ScriptedProcess::GetInterface() const {
|
||||
return m_interpreter->GetScriptedProcessInterface();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user