--硬件断点事件
function OnHWBREAK(reason,extdata,reg,debgevent)
if ret ~= 0 then
local treg = ffi.cast("t_reg *",reg)
if treg then
local Msg = Expression("DWORD [esp + 08]")
local Key = Expression("DWORD [esp + 0C]")
if Msg == WM_KEYDOWN then
Od.Addtolist(treg.ip,1,string.format("硬件断点键盘按下 = %s",string.char(Key)))
return 0
else
--F9运行
Od.Sendshortcut(0,0,WM_KEYDOWN,0,0,0x78)
return 1
end
end
end
end