This is an archive of the discontinued LLVM Phabricator instance.

[lldb/crashlog] Fix module loading for crashed thread behaviour
ClosedPublic

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

Details

Summary

Before 27f27d15f, the crashlog command would always load images even
if -a or -c was not set by the user.

Since that change, images are loaded only when one of these 2 flags are
set, otherwise, we fallback to parsing the symbols from the report and
load them into a SymbolFileJSON.

Although that makes it way faster than pulling binaries and debug
symbols from build records, that cause a degraded experience since none
of our users are used to set these 2 flags. For instance, that would
symbolicate the backtraces, however the users wouldn't see sources.

To address that change of behavior, this patch changes the default value
for the -c|--crash-only flag to true. On the other hand, thanks to
the move to argparse, we introduced a new --no-only-crashed flag
that will let the user force skipping loading any images, relying only
on the SymbolFileJSON.

This gives the users a good compromise since they would be able to see
sources for the crashed thread if they're available, otherwise, they'll
only get a symbolicated backtrace.

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

Diff Detail

Event Timeline

mib created this revision.Aug 14 2023, 3:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2023, 3:04 AM
mib requested review of this revision.Aug 14 2023, 3:04 AM
This revision is now accepted and ready to land.Aug 15 2023, 10:52 AM
This revision was landed with ongoing or failed builds.Aug 18 2023, 12:51 PM
This revision was automatically updated to reflect the committed changes.