[Lldb-commits] [PATCH] D127895: [lldb] Don't overwrite quit and exit builtins in the interactive python interpreter

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 15 13:25:26 PDT 2022


kastiglione added inline comments.


================
Comment at: lldb/source/Interpreter/embedded_interpreter.py:49-52
+    if line == 'exit':
+        raise LLDBExit
+    if line == 'quit':
+        raise LLDBExit
----------------
could do:
```
if line in ('exit', 'quit'):
```


================
Comment at: lldb/test/Shell/ScriptInterpreter/Python/exit.test:1-5
+# RUN: %lldb -o 'script quit' | FileCheck %s --check-prefix SILENT
+# RUN: %lldb -o 'script quit()' | FileCheck %s --check-prefix SILENT
+
+# RUN: %lldb -o 'script exit' | FileCheck %s --check-prefix SILENT
+# RUN: %lldb -o 'script exit()' | FileCheck %s --check-prefix SILENT
----------------
is there a reason to support both with and without `()`?


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

https://reviews.llvm.org/D127895



More information about the lldb-commits mailing list