-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# scriptcmd | ||
|
||
Execute a command in the context of a running script. | ||
|
||
## arguments | ||
|
||
Unlike other commands this command forwards everything after `scriptcmd ` directly to the command processor. | ||
|
||
For example `scriptcmd add rax, 0x1245` will execute the command `add rax, 0x1234`. | ||
|
||
## result | ||
|
||
This command does not set any result variables. | ||
|
||
## example | ||
|
||
This command can be used in combination with [SetBreakpointCommand](../conditional-breakpoint-control/SetBreakpointCommand.md) to execute scripts on breakpoint callbacks: | ||
|
||
``` | ||
fn_addr = module.dll:$0x1234 // module.dll RVA 0x1234 | ||
bp fn_addr | ||
SetBreakpointCommand fn_addr, "scriptcmd call mycallback" | ||
// make sure the script is not unloaded | ||
mycallback: | ||
log "fn({arg.get(0)}, {arg.get(1)})" | ||
ret | ||
``` |