[Lldb-commits] [PATCH] D149692: Allow scripted thread plans to modify the stop reason shown when the plan completes
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue May 2 14:37:32 PDT 2023
mib added a comment.
This looks good to me, although I'm wondering whether instead of passing a string, we should pass a dictionary. This way the user could either fill the dictionary with a simple stop reason description or the MachException data What do you think Jim ?
================
Comment at: lldb/bindings/python/python-wrapper.swig:390
+ if (PyErr_Occurred()) {
+ printf("Error occured for call to %s.\n",
+ method_name);
----------------
If we passed a `Status&` instead of a `bool&` we would be able to get that error message in lldb.
================
Comment at: lldb/examples/python/scripted_step.py:156
+ def stop_description(self, stream):
+ self.step_thread_plan.GetDescription(s, lldb.eDescriptionLevelBrief)
+
----------------
This is probably a typo
================
Comment at: lldb/include/lldb/Interpreter/ScriptInterpreter.h:320
+ lldb_private::Stream *stream,
+ bool &script_error) {
+ script_error = true;
----------------
For Scripted Process, I pass a `Status&` argument which can hold an error message for better debugging. By doing so, you can also return `Status.Success()`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149692/new/
https://reviews.llvm.org/D149692
More information about the lldb-commits
mailing list