[Lldb-commits] [PATCH] D144688: [lldb] Fix {break, watch}point command function stopping behaviour

Dan Liew via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 27 11:46:47 PST 2023


delcypher added inline comments.


================
Comment at: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:1316
+    auto_generated_function.AppendString("    def __user_code():");
+    for (int i = 0; i < num_lines; ++i) {
+      sstr.Clear();
----------------
Why do we need to loop over multiple lines in this is a "oneliner"?

Is `num_lines == 1` equivalent to `is_oneliner`?


If yes, then the `is_oneliner` parameter is not needed.
If no, then `is_oneliner` should probably be renamed to make sure this confusion cannot be made.


================
Comment at: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:1330
+    } else {
+      return Status("ScriptInterpreterPythonImpl::GenerateFunction(is_oneliner="
+                    "false) = ERROR: python function is multiline.");
----------------
Why are we erroring here? It looks like this is something that the old code supported. I would is expect `is_oneliner` to imply there are multiple lines in which case shouldn't we support that here?


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

https://reviews.llvm.org/D144688



More information about the lldb-commits mailing list