[all-commits] [llvm/llvm-project] a633c5: [lldb/crashlog] Add '-t|--target' option to intera...

Med Ismail Bennani via All-commits all-commits at lists.llvm.org
Tue Aug 9 21:02:09 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a633c5e11b4443000aa199a2df41eda4e2c6851b
      https://github.com/llvm/llvm-project/commit/a633c5e11b4443000aa199a2df41eda4e2c6851b
  Author: Med Ismail Bennani <medismail.bennani at gmail.com>
  Date:   2022-08-09 (Tue, 09 Aug 2022)

  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/scripted_crashlog_json.test

  Log Message:
  -----------
  [lldb/crashlog] Add '-t|--target' option to interactive mode

This patch introduces a new flag for the interactive crashlog mode, that
allow the user to specify, which target to use to create the scripted
process.

This can be very useful when lldb already have few targets created:
Instead of taking the first one (zeroth index), we will use that flag to
create a new target. If the user didn't provide a target path, we will rely
on the symbolicator to create a targer.If that fails and there are already
some targets loaded in lldb, we use the first one.

rdar://94682869

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

Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>


  Commit: a07a75180c01a3f262b02f69ee5722080da74b84
      https://github.com/llvm/llvm-project/commit/a07a75180c01a3f262b02f69ee5722080da74b84
  Author: Med Ismail Bennani <medismail.bennani at gmail.com>
  Date:   2022-08-09 (Tue, 09 Aug 2022)

  Changed paths:
    M lldb/examples/python/crashlog.py
    M lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
    A lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_invalid_target.test

  Log Message:
  -----------
  [lldb/crashlog] Surface error using SBCommandReturnObject argument

This patch allows the crashlog script to surface its errors to lldb by
using the provided SBCommandReturnObject argument.

rdar://95048193

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

Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>


  Commit: 81cbc294571fbcc609666ee4aeb86fbb68a7ec23
      https://github.com/llvm/llvm-project/commit/81cbc294571fbcc609666ee4aeb86fbb68a7ec23
  Author: Med Ismail Bennani <medismail.bennani at gmail.com>
  Date:   2022-08-09 (Tue, 09 Aug 2022)

  Changed paths:
    M lldb/examples/python/crashlog.py
    M lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/a.out.crash
    M lldb/test/Shell/ScriptInterpreter/Python/Crashlog/text.test

  Log Message:
  -----------
  [lldb/crashlog] Update frame regex matcher

This patch updates the regular expression matching stackframes in
crashlog to allow addresses that are 7 characters long and more (vs. 8
characters previously).

It changes the `0x[0-9a-fA-F]{7}[0-9a-fA-F]+` by `0x[0-9a-fA-F]{7,}`.

rdar://97684839

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

Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>


  Commit: 13aa780f37e193d8c23a6c5ff98cc4c7febc1f95
      https://github.com/llvm/llvm-project/commit/13aa780f37e193d8c23a6c5ff98cc4c7febc1f95
  Author: Med Ismail Bennani <medismail.bennani at gmail.com>
  Date:   2022-08-09 (Tue, 09 Aug 2022)

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

  Log Message:
  -----------
  [lldb/crashlog] Remove 'process_path' parsing logic

In can happen when creating stackshot crash report that that key is missing.

Moreover, we try to parse that key but don't use it, or need it, since we
fetch images and symbolicate the stackframes using the binaries UUIDs.

This is why this patch removes everything that is related to the
`process_path`/`procPath` parsing.

rdar://95054188

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

Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>


  Commit: 41c1a5f9bdc4cb6914e7971f50e4f45aeb11e087
      https://github.com/llvm/llvm-project/commit/41c1a5f9bdc4cb6914e7971f50e4f45aeb11e087
  Author: Med Ismail Bennani <medismail.bennani at gmail.com>
  Date:   2022-08-09 (Tue, 09 Aug 2022)

  Changed paths:
    M lldb/examples/python/crashlog.py
    A lldb/test/Shell/ScriptInterpreter/Python/Crashlog/skipped_status_interactive_crashlog.test

  Log Message:
  -----------
  [lldb/crashlog] Add `-s|--skip-status` option to interactive mode

This patch introduces a new option for the interactive crashlog mode,
that will prevent it from dumping the `process status` & `thread backtrace`
output to the debugger console.

This is necessary when lldb in running from an IDE, to prevent flooding
the console with information that should be already present in the UI.

rdar://96813296

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

Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>


  Commit: 355be8cf801603756520cf5d9b4b5eaf9d1b2e77
      https://github.com/llvm/llvm-project/commit/355be8cf801603756520cf5d9b4b5eaf9d1b2e77
  Author: Med Ismail Bennani <medismail.bennani at gmail.com>
  Date:   2022-08-09 (Tue, 09 Aug 2022)

  Changed paths:
    M lldb/examples/python/scripted_process/crashlog_scripted_process.py
    M lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/interactive_crashlog/multithread-test.ips

  Log Message:
  -----------
  [lldb/crashlog] Skip null image dsym fetching on interactive mode

Sometimes, it can happen that a crash report has null images in its list
of used binaries. This manifests like such:

```
    0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
```

When fetching debug symbols to symbolicate the crashlog stackframe,
having null images causes `dsymForUUID` to hang for few seconds.

This patch addresses that by skipping null images from being load by the
scripted process.

rdar://97419487

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

Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>


  Commit: 66f8819c5087198a62ba15da4477d59b9e4a1a1d
      https://github.com/llvm/llvm-project/commit/66f8819c5087198a62ba15da4477d59b9e4a1a1d
  Author: Med Ismail Bennani <medismail.bennani at gmail.com>
  Date:   2022-08-09 (Tue, 09 Aug 2022)

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

  Log Message:
  -----------
  [lldb/crashlog] Refactor the CrashLogParser logic

This patch changes the CrashLogParser class to be both the base class
and a Factory for the JSONCrashLogParser & TextCrashLogParser.

That should help remove some code duplication and ensure both class
have a parse method.

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

Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>


Compare: https://github.com/llvm/llvm-project/compare/d44f8a50d509...66f8819c5087


More information about the All-commits mailing list