g[s|h|t|z] [=addr [addr[...]] ]
The g command executes the application currently in memory. If you type the g command by itself, the current application runs as if it had been run outside the debugger. If you specify =addr, execution begins at the specified address.
Specifying an optional breakpoint address causes execution to halt at the first address encountered, regardless of the position of the address in the list of addresses that halts execution or application branching. When execution of the application reaches a breakpoint, the default command string is executed.
The stack (SS:SP) must be valid and have 6 bytes available for this command. The g command uses an iret instruction to cause a jump to the application being tested. The stack is set, and the user flags, CS register, and IP register are pushed on the user stack. (If the user stack is not valid or is too small, the operating system may crash.) An interrupt code (0CCh) is placed at the specified breakpoint addresses.
When the debugger encounters an instruction with the breakpoint code, it restores all breakpoint addresses listed with the g command to their original instructions. If you do not halt execution at one of the breakpoints, the interrupt codes are not replaced with the original instructions.
The following example executes the application currently in memory until address 7550 in the CS selector is executed. The debugger then executes the default command string, removes the int 3 trap from this address, and restores the original instruction. When you resume execution, the original instruction is executed.
gCS:7550
The command g dw esp can be used to go back to the flat 32-bit calling procedure.
The command g wo ss:sp can be used to go back to the 16-bit near calling procedure.
The command g poi ss:sp can be used to go back to the 16-bit far calling procedure.