mirror of
https://github.com/cemu-project/idapython.git
synced 2024-11-28 03:54:18 +01:00
idc.py: added SendDbgCommand()
This commit is contained in:
parent
f09375cf70
commit
ff7ab3f1dc
@ -6659,8 +6659,18 @@ def GetDebuggerEvent(wfne, timeout):
|
|||||||
return idaapi.wait_for_next_event(wfne, timeout)
|
return idaapi.wait_for_next_event(wfne, timeout)
|
||||||
|
|
||||||
|
|
||||||
def ResumeProcess(): return GetDebuggerEvent(WFNE_CONT|WFNE_NOWAIT, 0)
|
def ResumeProcess():
|
||||||
|
return GetDebuggerEvent(WFNE_CONT|WFNE_NOWAIT, 0)
|
||||||
|
|
||||||
|
def SendDbgCommand(cmd):
|
||||||
|
"""Sends a command to the debugger module and returns the output string.
|
||||||
|
An exception will be raised if the debugger is not running or the current debugger does not export
|
||||||
|
the 'SendDbgCommand' IDC command.
|
||||||
|
"""
|
||||||
|
s = Eval('SendDbgCommand("%s");' % cmd)
|
||||||
|
if s.startswith("IDC_FAILURE"):
|
||||||
|
raise Exception, "Debugger command is available only when the debugger is active!"
|
||||||
|
return s
|
||||||
|
|
||||||
# wfne flag is combination of the following:
|
# wfne flag is combination of the following:
|
||||||
WFNE_ANY = 0x0001 # return the first event (even if it doesn't suspend the process)
|
WFNE_ANY = 0x0001 # return the first event (even if it doesn't suspend the process)
|
||||||
|
Loading…
Reference in New Issue
Block a user