LLDB:执行完python脚本后,静默继续 [英] LLDB: silently continue after python script is done executing

查看:49
本文介绍了LLDB:执行完python脚本后,静默继续的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经编写了一个要附加到LLDB中的监视点的python脚本,例如:

I've written a python script that I am attaching to a watchpoint in LLDB, such as:

def wpCallback(frame, wp, internal_dict):
    ...

并且我将回调附加为:

watchpoint command add -F commands.wpCallback watchpointID

我希望程序在 wpCallback 完成后立即恢复执行.当前,执行会像观察点通常那样暂停.功能完成后是否可以默默继续?根据答案,看来您可以做到在GDB中是这样的:

I would like execution of the program to immediately resume after wpCallback is finished. Currently, execution halts as the watchpoint normally would. Is it possible to silently continue after the function is done? Based on this answer it seems like you can do something like this in GDB:

break foo if x>0
commands
silent
do something...
cont
end

推荐答案

您应该能够在监视点回调中对您的进程调用SBProcess.Continue().IE.如果您在回调 frame 中调用了第一个参数,请执行以下操作:

You should be able to call SBProcess.Continue() on your process in your watchpoint callback. I.e. if you called the first argument to your callback frame do:

frame.thread.process.Continue()

这适用于断点,但似乎对于当前TOT lldb中的观察点却不可用.看起来它禁用了监视点.那是:

That works for breakpoints, but seems to be broken for watchpoints in current TOT lldb. It looks like it disables the watchpoint. That's:

https://llvm.org/bugs/show_bug.cgi?id=28055

这篇关于LLDB:执行完python脚本后,静默继续的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆