[lldb/crashlog] Add support for Last Exception Backtrace

This patch adds support to the "Last Exception Backtrace" to the
`crashlog` command.

This metadata is homologous to the "Application Specific Backtrace",
however the format is closer to a regular stack frame.

Since the thread that "contains" the "Last Exception Backtrace" doesn't
really exist, this information is displayed when requesting an extended
backtrace of the crashed thread, similarly to the "Application Specific
Backtrace".

To achieve that, this patch includes some refactors and fixes to the
existing "Application Specific Backtrace" handling.

rdar://113046509

Differential Revision: https://reviews.llvm.org/D157851

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
This commit is contained in:
Med Ismail Bennani
2023-08-18 20:47:35 +01:00
parent 3054a0c4bc
commit 4c4f0d81f4
5 changed files with 206 additions and 8 deletions

View File

@@ -178,7 +178,7 @@ class CrashLogScriptedThread(ScriptedThread):
self.idx = self.backing_thread.index
self.tid = self.backing_thread.id
if self.backing_thread.app_specific_backtrace:
self.name = "Application Specific Backtrace - " + str(self.idx)
self.name = "Application Specific Backtrace"
else:
self.name = self.backing_thread.name
self.queue = self.backing_thread.queue