[Lldb-commits] [PATCH] D129611: [lldb/crashlog] Add '-t|--target' option to interactive mode

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 3 11:09:23 PDT 2022


JDevlieghere added inline comments.


================
Comment at: lldb/examples/python/crashlog.py:1025
+        if not target:
+            result.PutCString("error: couldn't create target provided by the user ({option.target_path})")
+            return
----------------
This is not an f-string so this will actually print `{option.target_path}` rather than the actual value. That said, we don't use those anywhere else, so let's use `.format()` to be consistent. 


================
Comment at: lldb/test/Shell/ScriptInterpreter/Python/Crashlog/scripted_crashlog_json.test:7
+# RUN: -o 'crashlog -a -i -t %t.dir/multithread-test %S/Inputs/interactive_crashlog/multithread-test.ips' \
 # RUN: -o "thread list" -o "bt all" 2>&1 | FileCheck %s
 
----------------
Can we test some of the error cases here? Should be easy enough to provide a target that doesn't exist (and would've caught the f-string issue). 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129611/new/

https://reviews.llvm.org/D129611



More information about the lldb-commits mailing list