|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5 |
|
| #
5a9fa21c |
| 08-Jun-2022 |
Med Ismail Bennani <[email protected]> |
[lldb/crashlog] Show help when the command is called without any argument
This patch changes the `crashlog` command behavior to print the help message if no argument was provided with the command.
[lldb/crashlog] Show help when the command is called without any argument
This patch changes the `crashlog` command behavior to print the help message if no argument was provided with the command.
rdar://94576026
Differential Revision: https://reviews.llvm.org/D127362
Signed-off-by: Med Ismail Bennani <[email protected]>
show more ...
|
|
Revision tags: llvmorg-14.0.4 |
|
| #
3e54ea0c |
| 18-May-2022 |
Med Ismail Bennani <[email protected]> |
[lldb/crashlog] Fix line entries resolution in interactive mode
This patch subtracts 1 to the pc of any frame above frame 0 to get the previous line entry and display the right line in the debugger.
[lldb/crashlog] Fix line entries resolution in interactive mode
This patch subtracts 1 to the pc of any frame above frame 0 to get the previous line entry and display the right line in the debugger.
This also rephrase some old comment from `48d157dd4`.
rdar://92686666
Differential Revision: https://reviews.llvm.org/D125928
Signed-off-by: Med Ismail Bennani <[email protected]>
show more ...
|
| #
9defb3b4 |
| 16-May-2022 |
Jonas Devlieghere <[email protected]> |
[lldb] Prevent underflow in crashlog.py
Avoid a OverflowError (an underflow really) when the pc is zero. This can happen for "unknown frames" where the crashlog generator reports a zero pc. We could
[lldb] Prevent underflow in crashlog.py
Avoid a OverflowError (an underflow really) when the pc is zero. This can happen for "unknown frames" where the crashlog generator reports a zero pc. We could omit them altogether, but if they're part of the crashlog it seems fair to display them in lldb as well.
rdar://92686666
Differential revision: https://reviews.llvm.org/D125716
show more ...
|
| #
ae016e4f |
| 13-May-2022 |
Jonas Devlieghere <[email protected]> |
[lldb] Don't swallow crashlog exceptions
crashlog.py catches every exception in order to format them. This results in both the exception name as well as the backtrace getting swallowed.
Here's an e
[lldb] Don't swallow crashlog exceptions
crashlog.py catches every exception in order to format them. This results in both the exception name as well as the backtrace getting swallowed.
Here's an example of the current output:
error: python exception: in method 'SBTarget_ResolveLoadAddress', argument 2 of type 'lldb::addr_t'
Compare this to the output without the custom exception handling:
Traceback (most recent call last): File "[...]/site-packages/lldb/macosx/crashlog.py", line 929, in __call__ SymbolicateCrashLogs(debugger, shlex.split(command)) File "[...]/site-packages/lldb/macosx/crashlog.py", line 1239, in SymbolicateCrashLogs SymbolicateCrashLog(crash_log, options) File "[...]/site-packages/lldb/macosx/crashlog.py", line 1006, in SymbolicateCrashLog thread.dump_symbolicated(crash_log, options) File "[...]/site-packages/lldb/macosx/crashlog.py", line 124, in dump_symbolicated symbolicated_frame_addresses = crash_log.symbolicate( File "[...]/site-packages/lldb/utils/symbolication.py", line 540, in symbolicate if symbolicated_address.symbolicate(verbose): File "[...]/site-packages/lldb/utils/symbolication.py", line 98, in symbolicate sym_ctx = self.get_symbol_context() File "[...]/site-packages/lldb/utils/symbolication.py", line 77, in get_symbol_context sb_addr = self.resolve_addr() File "[...]/site-packages/lldb/utils/symbolication.py", line 69, in resolve_addr self.so_addr = self.target.ResolveLoadAddress(self.load_addr) File "[...]/site-packages/lldb/__init__.py", line 10675, in ResolveLoadAddress return _lldb.SBTarget_ResolveLoadAddress(self, vm_addr) OverflowError: in method 'SBTarget_ResolveLoadAddress', argument 2 of type 'lldb::addr_t'
This patch removes the custom exception handling and lets LLDB or the default exception handler deal with it instead.
Differential revision: https://reviews.llvm.org/D125589
show more ...
|
| #
447c920a |
| 13-May-2022 |
Jonas Devlieghere <[email protected]> |
[lldb] Remove unused imports from crashlog.py
|
| #
a8abb695 |
| 13-May-2022 |
Jonas Devlieghere <[email protected]> |
[lldb] Parallelize fetching symbol files in crashlog.py
When using dsymForUUID, the majority of time symbolication a crashlog with crashlog.py is spent waiting for it to complete. Currently, we're c
[lldb] Parallelize fetching symbol files in crashlog.py
When using dsymForUUID, the majority of time symbolication a crashlog with crashlog.py is spent waiting for it to complete. Currently, we're calling dsymForUUID sequentially when iterating over the modules. We can drastically cut down this time by calling dsymForUUID in parallel. This patch uses Python's ThreadPoolExecutor (introduced in Python 3.2) to parallelize this IO-bound operation.
The performance improvement is hard to benchmark, because even with an empty local cache, consecutive calls to dsymForUUID for the same UUID complete faster. With warm caches, I'm seeing a ~30% performance improvement (~90s -> ~60s). I suspect the gains will be much bigger for a cold cache.
dsymForUUID supports batching up multiple UUIDs. I considered going that route, but that would require more intrusive changes. It would require hoisting the logic out of locate_module_and_debug_symbols which we explicitly document [1] as a feature of Symbolication.py to locate symbol files.
[1] https://lldb.llvm.org/use/symbolication.html
Differential reviison: https://reviews.llvm.org/D125107
show more ...
|
| #
2be791e3 |
| 06-May-2022 |
Jason Molenda <[email protected]> |
Insert crashing stack frame when call to null func ptr
On arm64 targets, when the crashing pc is 0, the caller frame can be found by looking at $lr, but the crash reports don't use that trick to sho
Insert crashing stack frame when call to null func ptr
On arm64 targets, when the crashing pc is 0, the caller frame can be found by looking at $lr, but the crash reports don't use that trick to show the actual crashing frame. This patch adds that stack frame that lldb shows.
Also fix an issue where some register names were printed as having a prefix of 'None'.
Differential Revision: https://reviews.llvm.org/D125042 rdar://92631787
show more ...
|
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
12301d61 |
| 25-Mar-2022 |
Med Ismail Bennani <[email protected]> |
[lldb/crashlog] Parse thread fields and pass it to crashlog scripted process
Previously, the ScriptedThread used the thread index as the thread id.
This patch parses the crashlog json to extract th
[lldb/crashlog] Parse thread fields and pass it to crashlog scripted process
Previously, the ScriptedThread used the thread index as the thread id.
This patch parses the crashlog json to extract the actual thread "id" value, and passes this information to the Crashlog ScriptedProcess blueprint, to create a higher fidelity ScriptedThreaad.
It also updates the blueprint to show the thread name and thread queue.
Finally, this patch updates the interactive crashlog test to reflect these changes.
rdar://90327854
Differential Revision: https://reviews.llvm.org/D122422
Signed-off-by: Med Ismail Bennani <[email protected]>
show more ...
|
| #
0a65112c |
| 16-Mar-2022 |
Med Ismail Bennani <[email protected]> |
[lldb/crashlog] Create artificial frames for non-crashed scripted threads
This patch pipes down the `-a|--load-all` crashlog command option to the Scripted Process initializer to load all the images
[lldb/crashlog] Create artificial frames for non-crashed scripted threads
This patch pipes down the `-a|--load-all` crashlog command option to the Scripted Process initializer to load all the images used by crashed process instead of only loading the images related to the crashed thread.
This allows us to recreate artificial frames also for the non-crashed scripted threads.
rdar://90396265
Differential Revision: https://reviews.llvm.org/D121826
Signed-off-by: Med Ismail Bennani <[email protected]>
show more ...
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3 |
|
| #
deb359aa |
| 10-Mar-2022 |
Med Ismail Bennani <[email protected]> |
[lldb/crashlog] Reformat module loading logs (NFC)
Signed-off-by: Med Ismail Bennani <[email protected]>
|
| #
8d097a6b |
| 09-Mar-2022 |
Med Ismail Bennani <[email protected]> |
[lldb/crashlog] Make interactive mode display more user-friendly
This patch makes the crashlog interactive mode show the scripted process status with the crashed scripted thread backtrace after laun
[lldb/crashlog] Make interactive mode display more user-friendly
This patch makes the crashlog interactive mode show the scripted process status with the crashed scripted thread backtrace after launching it.
rdar://89634338
Differential Revision: https://reviews.llvm.org/D121038
Signed-off-by: Med Ismail Bennani <[email protected]>
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc2 |
|
| #
badb6e27 |
| 26-Feb-2022 |
Med Ismail Bennani <[email protected]> |
[lldb/crashlog] Fix scripted_crashlog_json.test failure
This patch should fix the test failure on scripted_crashlog_json.test.
The failure is happening because crash reporter will obfuscate the exe
[lldb/crashlog] Fix scripted_crashlog_json.test failure
This patch should fix the test failure on scripted_crashlog_json.test.
The failure is happening because crash reporter will obfuscate the executable path in the crashlog, if it is located inside the user's home directory and replace it with `/USER/*/` as a placeholder.
To fix that, we can patch the placeholder with the executable path before loading the crashlog in lldb.
This also fixes a bug where we would create another target when loading the crashlog in a scripted process, even if lldb already had a target for it. Now, crashlog will only create a target if there is none in lldb.
Differential Revision: https://reviews.llvm.org/D120598
Signed-off-by: Med Ismail Bennani <[email protected]>
show more ...
|
| #
21658b77 |
| 16-Feb-2022 |
Med Ismail Bennani <[email protected]> |
[lldb/crashlog] Fix exception signal parsing
In some cases, it can happen that crashlogs don't have any signal in the exception, which causes the parser to crash.
This fixes the parsing by checking
[lldb/crashlog] Fix exception signal parsing
In some cases, it can happen that crashlogs don't have any signal in the exception, which causes the parser to crash.
This fixes the parsing by checking if the `signal` field is in the `exception` dictionary before trying to access it.
rdar://84552251
Differential Revision: https://reviews.llvm.org/D119504
Signed-off-by: Med Ismail Bennani <[email protected]>
show more ...
|
| #
7c54ffdc |
| 16-Feb-2022 |
Med Ismail Bennani <[email protected]> |
[lldb/crashlog] Add CrashLogScriptedProcess & remove interactive mode
This patch introduces a new type of ScriptedProcess: CrashLogScriptedProcess. It takes advantage of lldb's crashlog parsers and
[lldb/crashlog] Add CrashLogScriptedProcess & remove interactive mode
This patch introduces a new type of ScriptedProcess: CrashLogScriptedProcess. It takes advantage of lldb's crashlog parsers and Scripted Processes to reconstruct a static debugging session with symbolicated stackframes, instead of just dumping out everything in the user's terminal.
The crashlog command also has an interactive mode that only provide a very limited experience. This is why this patch removes all the logic for this interactive mode and creates CrashLogScriptedProcess instead.
This will fetch and load all the libraries that were used by the crashed thread and re-create all the frames artificially.
rdar://88721117
Differential Revision: https://reviews.llvm.org/D119501
Signed-off-by: Med Ismail Bennani <[email protected]>
show more ...
|
| #
0f29319e |
| 15-Feb-2022 |
Jonas Devlieghere <[email protected]> |
[lldb] Determine the main binary in JSON crashlogs
The symbolicator assumes that the first image in the image list is the main image. That isn't always the case. For JSON crashlogs we can use the pr
[lldb] Determine the main binary in JSON crashlogs
The symbolicator assumes that the first image in the image list is the main image. That isn't always the case. For JSON crashlogs we can use the procName to move the main image to the front of the list.
rdar://83907760
show more ...
|
| #
343662a0 |
| 14-Feb-2022 |
Jonas Devlieghere <[email protected]> |
[crashlog] Change heuristic to stripping the meta data from crashlogs
Instead trying to pro-actively determine if the first line in a crashlog contains meta data, change the heuristic to do the foll
[crashlog] Change heuristic to stripping the meta data from crashlogs
Instead trying to pro-actively determine if the first line in a crashlog contains meta data, change the heuristic to do the following:
1. To trying to parse the whole file. If that fails, then: 2. Strip the first line and try parsing the remainder of the file. If that fails, then: 3. Fall back to the textual crashlog parser.
rdar://88580543
Differential revision: https://reviews.llvm.org/D119755
show more ...
|
| #
d52866e1 |
| 14-Feb-2022 |
Jonas Devlieghere <[email protected]> |
[lldb] Stop forwarding LLDB_DEFAULT_PYTHON_VERSION in crashlog
Support for Python 2 was removed in Xcode 13.
Differential revision: https://reviews.llvm.org/D119756
|
|
Revision tags: llvmorg-14.0.0-rc1 |
|
| #
9a9bf12c |
| 08-Feb-2022 |
Med Ismail Bennani <[email protected]> |
[lldb/crashlog] Fix arm64 register parsing on crashlog.py
This patch fixes the register parser for arm64 crashlogs.
Compared to x86_64 crashlogs, the arm64 crashlogs nests the general purpose regis
[lldb/crashlog] Fix arm64 register parsing on crashlog.py
This patch fixes the register parser for arm64 crashlogs.
Compared to x86_64 crashlogs, the arm64 crashlogs nests the general purpose registers into a separate dictionary within `thread_state` dictionary. It uses the dictionary key as the the register number.
Differential Revision: https://reviews.llvm.org/D119168
Signed-off-by: Med Ismail Bennani <[email protected]>
show more ...
|
| #
f8d889a7 |
| 07-Feb-2022 |
Dave Lee <[email protected]> |
[lldb] Print message after loading 'crashlog' command
Previously, importing `crashlog` resulted in a message being printed. The message was about other commands (those in heap.py), not `crashlog`. T
[lldb] Print message after loading 'crashlog' command
Previously, importing `crashlog` resulted in a message being printed. The message was about other commands (those in heap.py), not `crashlog`. The changes in D117237 made it so that the heap.py messages were printed only when importing `lldb.macosx.heap`, not when importing `lldb.macosx.crashlog`. Some users may see no output and think `crashlog` wasn't successfully loaded. This ensures users see that `crashlog` is loaded.
rdar://88283132
Differential Revision: https://reviews.llvm.org/D119155
show more ...
|
|
Revision tags: llvmorg-15-init |
|
| #
e1cad130 |
| 31-Jan-2022 |
Jonas Devlieghere <[email protected]> |
[lldb] Support Rosetta registers in crashlog.py
Rosetta crashlogs can have their own thread register state. Unlike the other registers which ware directly listed under "threadState", the Rosetta reg
[lldb] Support Rosetta registers in crashlog.py
Rosetta crashlogs can have their own thread register state. Unlike the other registers which ware directly listed under "threadState", the Rosetta registers are nested under their own key in the JSON, as illustrated below:
{ "threadState": { "rosetta": { "tmp2": { "value": 4935057216 }, "tmp1": { "value": 4365863188 }, "tmp0": { "value": 18446744073709551615 } } } }
show more ...
|
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
| #
cb5ea132 |
| 12-Jan-2022 |
Dave Lee <[email protected]> |
[lldb] Add long help to `crashlog`
Convert the `crashlog` command to be implemented as a class. The `Symbolicate` function is switched to a class, to implement `get_long_help`. The text for the long
[lldb] Add long help to `crashlog`
Convert the `crashlog` command to be implemented as a class. The `Symbolicate` function is switched to a class, to implement `get_long_help`. The text for the long help comes from the help output generated by `OptionParser`. That is, the output of `help crashlog` is the same as `crashlog --help`.
Differential Revision: https://reviews.llvm.org/D117165
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
| #
b225c5f7 |
| 07-Oct-2021 |
Jonas Devlieghere <[email protected]> |
[lldb] Parse and display reporting errors from JSON crashlogs
JSON crashlogs have an optional field named reportNotes that contains any potential errors encountered by the crash reporter when genera
[lldb] Parse and display reporting errors from JSON crashlogs
JSON crashlogs have an optional field named reportNotes that contains any potential errors encountered by the crash reporter when generating the crashlog. Parse and display them in LLDB.
Differential revision: https://reviews.llvm.org/D111339
show more ...
|
| #
b913065b |
| 07-Oct-2021 |
Jonas Devlieghere <[email protected]> |
[lldb] Support missing threadState in JSON crashlogs
Gracefully deal with JSON crashlogs that don't have thread state available and print an error saying as much: "No thread state (register informat
[lldb] Support missing threadState in JSON crashlogs
Gracefully deal with JSON crashlogs that don't have thread state available and print an error saying as much: "No thread state (register information) available".
rdar://83955858
Differential revision: https://reviews.llvm.org/D111341
show more ...
|
| #
730fca46 |
| 05-Oct-2021 |
Jonas Devlieghere <[email protected]> |
[lldb] Improve meta data stripping from JSON crashlogs
JSON crashlogs normally start with a single line of meta data that we strip unconditionally. Some producers started omitting the meta data whic
[lldb] Improve meta data stripping from JSON crashlogs
JSON crashlogs normally start with a single line of meta data that we strip unconditionally. Some producers started omitting the meta data which tripped up crashlog. Be more resilient by only removing the first line when we know it really is meta data.
rdar://82641662
show more ...
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3 |
|
| #
4da5a446 |
| 07-Sep-2021 |
Jonas Devlieghere <[email protected]> |
[lldb] Update crashlog.py to accept multiple results from mdfind
mdfind can return multiple results, some of which are not even dSYM bundles, but Xcode archives (.xcrachive).
Currently, we end up c
[lldb] Update crashlog.py to accept multiple results from mdfind
mdfind can return multiple results, some of which are not even dSYM bundles, but Xcode archives (.xcrachive).
Currently, we end up concatenating the paths, which is obviously bogus. This patch not only fixes that, but now also skips paths that don't have a Contents/Resources/DWARF subdirectory.
rdar://81270312
Differential revision: https://reviews.llvm.org/D109263
show more ...
|