summaryrefslogtreecommitdiff
path: root/lldb/examples/python
AgeCommit message (Collapse)Author
2022-11-11[lldb] Allow flexible importing of in_call_stackDave Lee
Allow `in_call_stack` to be imported in either of the following ways: ``` command script import path/to/in_call_stack.py command script import lldb.utils.in_call_stack ``` rdar://102249295 Differential Revision: https://reviews.llvm.org/D137860
2022-11-04[lldb/crashlog] Standardize file path key in the ScriptedProcess DictionaryMed Ismail Bennani
This patch replaces the backing file path key to "file_path" to keep it consistent. rdar://101652618 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-11-04[lldb/crashlog] Fix frame parser regex for when there is no source infoMed Ismail Bennani
It can happen that the originator of a crash report doesn't have access to certain images. When that's the case, ReportCrash won't show the source info in the crash report stack frames, but only the stack address and image name. This patch fixes a bug in the crashlog stackframe parser regular expression to optionally match the source info group. rdar://101934135 Differential Revision: https://reviews.llvm.org/D137466 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-11-03[lldb/crashlog] Add support for Application Specific Backtraces & InformationMed Ismail Bennani
For an exception crashlog, the thread backtraces aren't usually very helpful and instead, developpers look at the "Application Specific Backtrace" that was generated by `objc_exception_throw`. LLDB could already parse and symbolicate these Application Specific Backtraces for regular textual-based crashlog, so this patch adds support to parse them in JSON crashlogs, and materialize them a HistoryThread extending the crashed ScriptedThread. This patch also includes the Application Specific Information messages as part of the process extended crash information log. To do so, the ScriptedProcess Python interface has a new GetMetadata method that returns an arbitrary dictionary with data related to the process. rdar://93207586 Differential Revision: https://reviews.llvm.org/D126260 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-11-03[lldb/crashlog] Fix the image_regex_uuid to skip null UUID imagesMed Ismail Bennani
This patch updates the image_regex_uuid matcher to match null-UUID images in the plain text crashlog parser. It updates the regex to match one or more '?' characters or the image full path. rdar://100904019 Differential Revision: https://reviews.llvm.org/D135482 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-11-03[lldb/crashlog] Add support for 32bit frame addressesMed Ismail Bennani
This patch adds support for 32bit stack frame addresses in the `crashlog` command. For crash reports that are generated from a arm64_32 process, `PAGEZERO` is loaded at 0x00004000 so no code address will be less than 0x4000. This patch changes the crashlog frame address regex group to match addresses as small as 4 hex characters. rdar://100805026 Differential Revision: https://reviews.llvm.org/D135310 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-10-28[lldb] Explicitly open file to write with utf-8 encoding in crashlog.pyAugusto Noronha
The python "open" function will use the default encoding for the locale (the result of "locale.getpreferredencoding()"). Explicitly set the locale to utf-8 when opening the crashlog for writing, as there may be non-ascii symbols in there (for example, Swift uses "τ" to indicate generic parameters). rdar://101402755 Differential Revision: https://reviews.llvm.org/D136798
2022-09-13[lldb] Fixed a number of typosGabriel Ravier
I went over the output of the following mess of a command: (ulimit -m 2000000; ulimit -v 2000000; git ls-files -z | parallel --xargs -0 cat | aspell list --mode=none --ignore-case | grep -E '^[A-Za-z][a-z]*$' | sort | uniq -c | sort -n | grep -vE '.{25}' | aspell pipe -W3 | grep : | cut -d' ' -f2 | less) and proceeded to spend a few days looking at it to find probable typos and fixed a few hundred of them in all of the llvm project (note, the ones I found are not anywhere near all of them, but it seems like a good start). Differential revision: https://reviews.llvm.org/D131122
2022-08-15[LLDB] Remove __future__ imports from examplesDavid Spickett
Not needed now that we require python 3. Reviewed By: kastiglione, JDevlieghere Differential Revision: https://reviews.llvm.org/D131772
2022-08-11[lldb/crashlog] Improve exception reporting for interactive modeMed Ismail Bennani
This patch improve exception reporting when loading a crash report in a scripted process. Now, we parse the `exception` dictionary from the crash report use it the create a higher fidelity `MachException` stop info. This patch also updates the test to reflect that change. rdar://97096486 Differential Revision: https://reviews.llvm.org/D131086 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-08-11[lldb/crashlog] Adapt raw text crashlog exception to json formatMed Ismail Bennani
This patch parses CrashLog exception data from the raw text format and adapts it to the new JSON format. This is necessary for feature parity between the 2 formats. Differential Revision: https://reviews.llvm.org/D131719 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-08-11[lldb] Remove uses of six module (NFC)Dave Lee
With lldb (& llvm) requiring Python 3.6+, use of the `six` module can be removed. Differential Revision: https://reviews.llvm.org/D131304
2022-08-11[lldb] Tidy some regex in crashlog.py (NFC)Dave Lee
A spiritual follow up to D131032. I noticed some regex could be simplified. This does some of the following: 1. Removes unused capture groups 2. Uses non-capturing `(?:...)` groups where grouping is needed but capturing isn't 3. Removes trailing `.*` 4. Uses `\d` over `[0-9]` 5. Uses raw strings 6. Uses `{N,}` to indicate N-or-more Also improves the call site of a `re.findall`. Differential Revision: https://reviews.llvm.org/D131305
2022-08-10[lldb/crashlog] Add `-V|--version` optionMed Ismail Bennani
This patch introduces a new option to the crashlog command to get the the script version. Since `crashlog.py` is not actually versioned, this returns lldb's version instead. rdar://98392669 Differential Revision: https://reviews.llvm.org/D131542 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-08-09[lldb/crashlog] Refactor the CrashLogParser logicMed Ismail Bennani
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@gmail.com>
2022-08-09[lldb/crashlog] Skip null image dsym fetching on interactive modeMed Ismail Bennani
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@gmail.com>
2022-08-09[lldb/crashlog] Add `-s|--skip-status` option to interactive modeMed Ismail Bennani
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@gmail.com>
2022-08-09[lldb/crashlog] Remove 'process_path' parsing logicMed Ismail Bennani
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@gmail.com>
2022-08-09[lldb/crashlog] Update frame regex matcherMed Ismail Bennani
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@gmail.com>
2022-08-09[lldb/crashlog] Surface error using SBCommandReturnObject argumentMed Ismail Bennani
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@gmail.com>
2022-08-09[lldb/crashlog] Add '-t|--target' option to interactive modeMed Ismail Bennani
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@gmail.com>
2022-06-10[lldb/crashlog] Show help when the command is called without any argumentMed Ismail Bennani
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 <medismail.bennani@gmail.com>
2022-05-18[lldb/crashlog] Fix line entries resolution in interactive modeMed Ismail Bennani
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 <medismail.bennani@gmail.com>
2022-05-16[lldb] Prevent underflow in crashlog.pyJonas Devlieghere
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
2022-05-14[lldb] Don't swallow crashlog exceptionsJonas Devlieghere
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
2022-05-14[lldb] Remove unused imports from crashlog.pyJonas Devlieghere
2022-05-13[lldb] Parallelize fetching symbol files in crashlog.pyJonas Devlieghere
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
2022-05-05Insert crashing stack frame when call to null func ptrJason Molenda
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
2022-03-25[lldb/crashlog] Parse thread fields and pass it to crashlog scripted processMed Ismail Bennani
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 <medismail.bennani@gmail.com>
2022-03-16[lldb/crashlog] Create artificial frames for non-crashed scripted threadsMed Ismail Bennani
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 <medismail.bennani@gmail.com>
2022-03-10[lldb/crashlog] Reformat module loading logs (NFC)Med Ismail Bennani
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-03-10[lldb/crashlog] Make interactive mode display more user-friendlyMed Ismail Bennani
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 <medismail.bennani@gmail.com>
2022-03-04[lldb/Plugins] Add ability to load modules to Scripted ProcessesMed Ismail Bennani
This patch introduces a new way to load modules programatically with Scripted Processes. To do so, the scripted process blueprint holds a list of dictionary describing the modules to load, which their path or uuid, load address and eventually a slide offset. LLDB will fetch that list after launching the ScriptedProcess, and iterate over each entry to create the module that will be loaded in the Scripted Process' target. The patch also refactors the StackCoreScriptedProcess test to stop inside the `libbaz` module and make sure it's loaded correctly and that we can fetch some variables from it. rdar://74520238 Differential Revision: https://reviews.llvm.org/D120969 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-03-02[lldb] Fix python errors in gdbremote.pyDominic Chen
Fix exceptions encountered while debugging gdb protocol Differential Revision: https://reviews.llvm.org/D120792
2022-02-25[lldb/crashlog] Fix scripted_crashlog_json.test failureMed Ismail Bennani
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 <medismail.bennani@gmail.com>
2022-02-16[lldb/crashlog] Fix exception signal parsingMed Ismail Bennani
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 <medismail.bennani@gmail.com>
2022-02-16[lldb/crashlog] Add CrashLogScriptedProcess & remove interactive modeMed Ismail Bennani
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 <medismail.bennani@gmail.com>
2022-02-16[lldb/Plugin] Add artificial stackframe loading in ScriptedThreadMed Ismail Bennani
This patch adds the ability for ScriptedThread to load artificial stack frames. To do so, the interpreter instance can create a list that will contain the frame index and its pc address. Then, when the Scripted Process plugin stops, it will refresh its Scripted Threads state by invalidating their register context and load to list from the interpreter object and reconstruct each frame. This patch also removes all of the default implementation for `get_stackframes` from the derived ScriptedThread classes, and add the interface code for the Scripted Thread Interface. rdar://88721095 Differential Revision: https://reviews.llvm.org/D119388 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-02-16[lldb/Plugins] Clean-up ScriptedProcess python script (NFC)Med Ismail Bennani
This patch removes the `my_scripted_process.py` blueprint since it's not used anymore. The patch also updates the base ScriptedProcess and ScriptedThread initializers to automatically initialize convinience variables, to access debugger from the ScriptedProcess, access the SBProcess and ScriptedProcess object from a ScriptedThread instance. Differential Revision: https://reviews.llvm.org/D119386 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-02-14[lldb] Determine the main binary in JSON crashlogsJonas Devlieghere
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
2022-02-14[crashlog] Change heuristic to stripping the meta data from crashlogsJonas Devlieghere
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
2022-02-14[lldb] Stop forwarding LLDB_DEFAULT_PYTHON_VERSION in crashlogJonas Devlieghere
Support for Python 2 was removed in Xcode 13. Differential revision: https://reviews.llvm.org/D119756
2022-02-09[lldb/crashlog] Fix arm64 register parsing on crashlog.pyMed Ismail Bennani
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 <medismail.bennani@gmail.com>
2022-02-09[lldb/test] Fix TestScriptedProcess.py timeout on x86_64Med Ismail Bennani
This patch fixes a timeout issue on the ScriptedProcess test that was happening on intel platforms. The timeout was due to a misreporting of the StopInfo in the ScriptedThread that caused the ScriptedProcess to never stop. To solve this, this patch changes the way a ScriptedThread reports its stop reason by making it more architecture specific. In order to do so, this patch also refactors the ScriptedProcess & ScriptedThread initializer methods to provide an easy access to the target architecture. Differential Revision: https://reviews.llvm.org/D118484 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
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] 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 } } } }
2022-01-24[lldb/Plugins] Add support of multiple ScriptedThreads in a ScriptedProcessMed Ismail Bennani
This patch adds support of multiple Scripted Threads in a ScriptedProcess. This is done by fetching the Scripted Threads info dictionary at every ScriptedProcess::DoUpdateThreadList and iterate over each element to create a new ScriptedThread using the object instance, if it was not already available. This patch also adds the ability to pass a pointer of a script interpreter object instance to initialize a ScriptedInterface instead of having to call the script object initializer in the ScriptedInterface constructor. This is used to instantiate the ScriptedThreadInterface from the ScriptedThread constructor, to be able to perform call on that script interpreter object instance. Finally, the patch also updates the scripted process test to check for multiple threads. rdar://84507704 Differential Revision: https://reviews.llvm.org/D117071 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-01-24[lldb/Plugins] Add ScriptedProcess::GetThreadsInfo interfaceMed Ismail Bennani
This patch adds a new method to the Scripted Process interface to retrive a dictionary of Scripted Threads. It uses the thread ID as a key and the Scripted Thread instance as the value. This dictionary will be used to create Scripted Threads in lldb and perform calls to the python scripted thread object. rdar://87427126 Differential Revision: https://reviews.llvm.org/D117068 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-01-13[lldb] Use __lldb_init_module instead of "if lldb.debugger" idiomDave Lee
Update examples and docs to demonstrate using `__lldb_init_module` instead of the idiom that checks for `lldb.debugger` at the top-level. ``` if __name__ == '__main__': ... elif lldb.debugger: ... ``` Is replaced with: ``` if __name__ == '__main__': ... def __lldb_init_module(debugger, internal_dict): ... ``` This change is for two reasons. First, it's generally encouraged not to only use the convenience singletons (`lldb.{debugger,process,target,etc}`) interactively from the `script` command. Second, there's a bug where registering a python class as a command (using `command script add -c ...`), result in the command not being runnable. Note that registering function-backed commands does not have this bug. Differential Revision: https://reviews.llvm.org/D117237
2022-01-13[lldb] Add long help to `crashlog`Dave Lee
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