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

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 24 20:39:31 PST 2023


mib updated this revision to Diff 500349.
mib retitled this revision from "[lldb] Fix {break,watch}point command function stopping behavior" to "[lldb] Fix {break,watch}point command function stopping behaviour".
mib edited the summary of this revision.
mib added a comment.

The third implementation is the charm 😝:

- If the user input is a oneliner, we wrap it into a nested function.
- Then we call the function (either the nested function or the user provided python function) and capture the return value in a variable.
- Finally, after resetting the global dictionary to its previous state, we return the variable that contains the user's return value.


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

https://reviews.llvm.org/D144688

Files:
  lldb/include/lldb/Interpreter/ScriptInterpreter.h
  lldb/source/Commands/CommandObjectWatchpointCommand.cpp
  lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
  lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
  lldb/test/API/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandPython.py
  lldb/test/API/commands/watchpoints/watchpoint_commands/command/main.cpp
  lldb/test/API/commands/watchpoints/watchpoint_commands/command/watchpoint_command.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144688.500349.patch
Type: text/x-patch
Size: 22385 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230225/abeceee8/attachment-0001.bin>


More information about the lldb-commits mailing list