delcypher accepted this revision. delcypher added a comment. @mib Thanks for working on this. LGTM (with very minor nits), but you should probably wait for someone who works on LLDB more frequently than me to give you the ok.
================ Comment at: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:1310 auto_generated_function.AppendString( - " global_dict.update (internal_dict)"); // Add the session dictionary - // to the - // global dictionary. - - // Wrap everything up inside the function, increasing the indentation. - - auto_generated_function.AppendString(" if True:"); - for (int i = 0; i < num_lines; ++i) { - sstr.Clear(); - sstr.Printf(" %s", input.GetStringAtIndex(i)); - auto_generated_function.AppendString(sstr.GetData()); + " global_dict.update (internal_dict)"); // Add the session dictionary + // to the global dictionary. ---------------- Nit: the space between `.update` and `(internal_dict)` is probably an old mistake. We can probably tidy that up seeing as we're already touching the line. ================ Comment at: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:1328 + " __return_val = None"); // Initialize user callback return value. + auto_generated_function.AppendString(" def __user_code():"); + for (int i = 0; i < num_lines; ++i) { ---------------- Nit: Might be worth leaving a comment here on why we're wrapping the code in a nested function. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144688/new/ https://reviews.llvm.org/D144688 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits