[all-commits] [llvm/llvm-project] 760264: [lldb/crashlog] Add test for 8f75c4d01eff3c65d7ae4...

Med Ismail Bennani via All-commits all-commits at lists.llvm.org
Fri Aug 18 12:51:04 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7602641d7bf96b727e1739e2f68db1cadc27324a
      https://github.com/llvm/llvm-project/commit/7602641d7bf96b727e1739e2f68db1cadc27324a
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2023-08-18 (Fri, 18 Aug 2023)

  Changed paths:
    M lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/interactive_crashlog/multithread-test.crash

  Log Message:
  -----------
  [lldb/crashlog] Add test for 8f75c4d01eff3c65d7ae40bfd05582de7dffa590 (NFC)

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


  Commit: eef5eadbe617a9530d982a9ea3cfc284d2a52858
      https://github.com/llvm/llvm-project/commit/eef5eadbe617a9530d982a9ea3cfc284d2a52858
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2023-08-18 (Fri, 18 Aug 2023)

  Changed paths:
    M lldb/examples/python/crashlog.py
    M lldb/test/Shell/ScriptInterpreter/Python/Crashlog/no-args.test

  Log Message:
  -----------
  [lldb/crashlog] Replace deprecated optparse by argparse (NFC)

This patch replace the deprecated `optparse` module used for the
`crashlog`& `save_crashlog` commands with the new `argparse` from the
python standard library. This provides many benefits such as showing the
default values for each option in the help description, but also greatly
improve the handling of position arguments.

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

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


  Commit: 21a597c31cb8ad03e18a293c73ecd7c498387ef8
      https://github.com/llvm/llvm-project/commit/21a597c31cb8ad03e18a293c73ecd7c498387ef8
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2023-08-18 (Fri, 18 Aug 2023)

  Changed paths:
    M lldb/examples/python/crashlog.py

  Log Message:
  -----------
  [lldb/crashlog] Fix module loading for crashed thread behaviour

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.

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

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


  Commit: 3054a0c4bc50856156f26b528895ddcfba4210fa
      https://github.com/llvm/llvm-project/commit/3054a0c4bc50856156f26b528895ddcfba4210fa
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2023-08-18 (Fri, 18 Aug 2023)

  Changed paths:
    M lldb/examples/python/crashlog.py

  Log Message:
  -----------
  [lldb/crashlog] Remove dead code (NFC)

This patch cleans up the crashlog.py script and removes dead code.

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


  Commit: 4c4f0d81f47cf9ad785dc2ea323ec2f0aedb72df
      https://github.com/llvm/llvm-project/commit/4c4f0d81f47cf9ad785dc2ea323ec2f0aedb72df
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2023-08-18 (Fri, 18 Aug 2023)

  Changed paths:
    M lldb/examples/python/crashlog.py
    M lldb/examples/python/scripted_process/crashlog_scripted_process.py
    M lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/application_specific_info/asi.txt
    A lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/application_specific_info/leb.txt
    A lldb/test/Shell/ScriptInterpreter/Python/Crashlog/last_exception_backtrace_crashlog.test

  Log Message:
  -----------
  [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 at bennani.ma>


  Commit: 9a44eedb842d03b0e4d24f8dcc57a49e1a9cc1ac
      https://github.com/llvm/llvm-project/commit/9a44eedb842d03b0e4d24f8dcc57a49e1a9cc1ac
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2023-08-18 (Fri, 18 Aug 2023)

  Changed paths:
    M lldb/examples/python/crashlog.py

  Log Message:
  -----------
  [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 at bennani.ma>


Compare: https://github.com/llvm/llvm-project/compare/078eb4bd85dd...9a44eedb842d


More information about the All-commits mailing list