Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pluginsdk.debug.StepOver(), pluginsdk.debug.Run() seem not to work in Open GUI or Open Async script #59

Open
robertsi opened this issue Mar 21, 2021 · 3 comments

Comments

@robertsi
Copy link

robertsi commented Mar 21, 2021

This works until I call pluginsdk.debug.StepOver() or pluginsdk.debug.Run in bp_callback. Everything just hangs or is not responding anymore. If I run these two commands from x64dbg GUI everything works as expected. Tried to execute as GUI and async script, seems there is no difference, am I missing something here?

`import threading
bpAddress = 0x00007FF6EFB1F4D0

def bp_callback():
print("tid={num:d} 0x{num:X}".format(num=threading.currentThread().ident))
global bpAddress
pluginsdk.bridgemain.GuiLogClear()
print("rcx={num:d} 0x{num:X}".format(num=Register.RCX))
print("rdx={num:d} 0x{num:X}".format(num=Register.RDX))

#Breakpoint.remove(bpAddress)
#pluginsdk.debug.Run()
#pluginsdk.debug.Wait()
#pluginsdk.debug.Stop()
#pluginsdk.debug.StepIn()
#pluginsdk.debug.StepOut()
#pluginsdk.debug.StepOver()

Breakpoint.add(bpAddress, bp_callback)`

@robertsi
Copy link
Author

Was suspecting that its thread related coz its not on the same thread, I have a workaround atm by calling
pluginsdk.x64dbg.DbgCmdExec("run")

@manfeel
Copy link

manfeel commented Aug 19, 2021

Thank you so much! I ran into the same problem, but it seems that I can only run the pluginsdk.x64dbg.DbgCmdExecDirect('run') command to solve the current dilemma.

@4144
Copy link

4144 commented Aug 19, 2021

Only visible simple solution this.
Dont use any callbacks on breakpoints, but save info about address with breakpoints into python dictionary. Something like callbacks emulation.

For continue execution run: pluginsdk.debug.Run()
After debugger stop on breakpoint, check ip and saved info for address and run own code related to it.
For continue execution run again pluginsdk.debug.Run()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants