summaryrefslogtreecommitdiff
path: root/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test
AgeCommit message (Collapse)Author
2025-06-18[lldb/crashlog] Make interactive mode the new default (#144839)Med Ismail Bennani
This patch makes interactive mode as the default when using the crashlog command. It replaces the existing `-i|--interactive` flag with a new `-m|--mode` option, that can either be `interactive` or `batch`. By default, when the option is not explicitely set by the user, the interactive mode is selected, however, lldb will fallback to batch mode if the command interpreter is not interactive or if stdout is not a tty. This also adds some railguards to prevent users from using interactive only options with the batch mode and updates the tests accordingly. rdar://97801509 Differential Revision: https://reviews.llvm.org/D141658 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-06-20Revert "[lldb/crashlog] Make interactive mode the new default" (#96263)Med Ismail Bennani
Reverts llvm/llvm-project#94575 since introduces test failure: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/6166/
2024-06-20[lldb/crashlog] Make interactive mode the new default (#94575)Med Ismail Bennani
This patch makes interactive mode as the default when using the crashlog command. It replaces the existing `-i|--interactive` flag with a new `-m|--mode` option, that can either be `interactive` or `batch`. By default, when the option is not explicitely set by the user, the interactive mode is selected, however, lldb will fallback to batch mode if the command interpreter is not interactive or if stdout is not a tty. This also adds some railguards to prevent users from using interactive only options with the batch mode and updates the tests accordingly. rdar://97801509 Differential Revision: https://reviews.llvm.org/D141658 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2023-06-06[lldb] Fix "NameError: name 'self' is not defined" when using crashlog -cJonas Devlieghere
This fixes a regression introduced by 27f27d15f6c9 that results in a NameError: (name 'self' is not defined) when using crashlog with the -c option. rdar://110007391
2022-02-07[lldb] Print message after loading 'crashlog' commandDave Lee
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
2022-01-31[lldb] Use the build's python interpreter in the shell testsJonas Devlieghere
Make sure that the shell tests use the same python interpreter as the rest of the build instead of picking up `python` from the PATH. It would be nice if we could use the _disallow helper, but that triggers on invocations that specify python as the scripting language.
2022-01-31[lldb] Support Rosetta registers in crashlog.pyJonas Devlieghere
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 } } } }
2021-10-07[lldb] Parse and display reporting errors from JSON crashlogsJonas Devlieghere
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
2021-10-05[lldb] Improve meta data stripping from JSON crashlogsJonas Devlieghere
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
2021-04-22[lldb] Update register state parsing for JSON crashlogsJonas Devlieghere
- The register encoding state in the JSON crashlog format changes. Update the parser accordingly. - Print the register state when printing the symbolicated thread.
2021-04-22[lldb] Include thread name in crashlog.py outputJonas Devlieghere
Update the JSON parser to include the thread name in the Thread object. rdar://76677320
2021-03-09[lldb] Update crashlog script for JSON changesJonas Devlieghere
Update the crashlog script for changes to the JSON schema. rdar://75122914 Differential revision: https://reviews.llvm.org/D98219
2020-11-16[crashlog] Improve patch-crashlog.py scriptJonas Devlieghere
Compute the real addresses and offsets for the json crashlog test.
2020-11-16[crashlog] Implement parser for JSON encoded crashlogsJonas Devlieghere
Add a parser for JSON crashlogs. The CrashLogParser now defers to either the JSONCrashLogParser or the TextCrashLogParser. It first tries to interpret the input as JSON, and if that fails falling back to the textual parser. Differential revision: https://reviews.llvm.org/D91130