Skip to content

Commit 6aa3c7e

Browse files
Rollup merge of #156899 - Walnut356:lldb_batchmode, r=jieyouxu
fix breakpoint callback registration in `lldb_batchmode` We'd been failing to register the callback for a while now, because it couldn't find the specified function. This change imports `lldb_batchmode` and uses the namespaced name of the function. As an aside, I'm relatively sure this breakpoint callback isn't necessary anymore. Whenever lldb stops at a breakpoint, it updates the selected thread/frame automatically. I don't want to remove it quite yet because I *might* need it for some bookkeeping with the `lldb-repr` directive (and `--bless` behavior)
2 parents bd59ff8 + bf7a021 commit 6aa3c7e

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/etc/lldb_batchmode.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,9 @@ def execute_command(command_interpreter, command):
9797
print_debug(
9898
"registering breakpoint callback, id = " + str(breakpoint_id)
9999
)
100-
callback_command = (
101-
"breakpoint command add -F breakpoint_callback "
102-
+ str(breakpoint_id)
103-
)
100+
callback_command = f"breakpoint command add -s python {str(breakpoint_id)} -o \
101+
'import lldb_batchmode; lldb_batchmode.breakpoint_callback'"
102+
104103
command_interpreter.HandleCommand(callback_command, res)
105104
if res.Succeeded():
106105
print_debug(

0 commit comments

Comments
 (0)