mirror of
https://github.com/intel/llvm.git
synced 2026-01-17 06:40:01 +08:00
[lldb/crashlog] Skip non-crashed threads in batch mode
When using the `crashlog` command in batch mode, most users only care about the crashed thread and end up having to scroll past all the non-crashed threads, which is not a good user experience. Now that `-c|--crashed-only` is set by default, we should also apply that behavior for batch mode: Only the crashed thread and "Application Specific Backtrace" threads will be shown to the user in batch mode. The user will still have the ability to show all the threads if they use `--no-crashed-only` which will parse the symbols from the report, or with `-a|--load-all-images` which will fetch binaries and debug info from the build record and symbolicate every thread. rdar://106329893 Differential Revision: https://reviews.llvm.org/D157852 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
This commit is contained in:
@@ -949,6 +949,7 @@ class TextCrashLogParser(CrashLogParser):
|
||||
self.thread.reason += (
|
||||
" (%s)" % self.crashlog.thread_exception_data
|
||||
)
|
||||
self.thread.crashed = True
|
||||
if self.app_specific_backtrace:
|
||||
self.crashlog.backtraces.append(self.thread)
|
||||
else:
|
||||
@@ -1437,6 +1438,10 @@ def SymbolicateCrashLog(crash_log, options):
|
||||
print()
|
||||
|
||||
for thread in crash_log.threads:
|
||||
if options.crashed_only and not (
|
||||
thread.crashed or thread.app_specific_backtrace
|
||||
):
|
||||
continue
|
||||
thread.dump_symbolicated(crash_log, options)
|
||||
print()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user