Skip to content

Commit 21a597c

Browse files
committed
[lldb/crashlog] Fix module loading for crashed thread behaviour
Before 27f27d1, 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. Differential Revision: https://reviews.llvm.org/D157850 Signed-off-by: Med Ismail Bennani <[email protected]>
1 parent eef5ead commit 21a597c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lldb/examples/python/crashlog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,10 +1590,10 @@ def CreateSymbolicateCrashLogOptions(
15901590
arg_parser.add_argument(
15911591
"--crashed-only",
15921592
"-c",
1593-
action="store_true",
1593+
action=argparse.BooleanOptionalAction,
15941594
dest="crashed_only",
15951595
help="only symbolicate the crashed thread",
1596-
default=False,
1596+
default=True,
15971597
)
15981598
arg_parser.add_argument(
15991599
"--disasm-depth",

0 commit comments

Comments
 (0)