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

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 27 13:05:08 PST 2023


bulbazord 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();
----------------
delcypher wrote:
> 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.
+1


================
Comment at: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:1330
+    } else {
+      return Status("ScriptInterpreterPythonImpl::GenerateFunction(is_oneliner="
+                    "false) = ERROR: python function is multiline.");
----------------
delcypher wrote:
> 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?
+1


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

https://reviews.llvm.org/D144688



More information about the lldb-commits mailing list