This is an archive of the discontinued LLVM Phabricator instance.

[lldb/crashlog] Add support for Last Exception Backtrace
ClosedPublic

Authored by mib on Aug 14 2023, 3:06 AM.

Details

Summary

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

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>

Diff Detail

Event Timeline

mib created this revision.Aug 14 2023, 3:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2023, 3:06 AM
mib requested review of this revision.Aug 14 2023, 3:06 AM
bulbazord added inline comments.Aug 15 2023, 1:03 PM
lldb/examples/python/crashlog.py
799–815

Conceptually it looks like this is creating a new thread and adding it over and over to the crashlog list of threads? How does this work?

mib added inline comments.Aug 15 2023, 1:05 PM
lldb/examples/python/crashlog.py
799–815

Indeed, this is bogus :p Good catch!

JDevlieghere accepted this revision.Aug 16 2023, 9:54 AM

LGTM with Alex' comment.

This revision is now accepted and ready to land.Aug 16 2023, 9:54 AM
mib marked an inline comment as done.Aug 18 2023, 11:15 AM
This revision was automatically updated to reflect the committed changes.