[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 18:31:55 PST 2023
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
More information about the lldb-commits
mailing list