Bewerken

Delen via


gh (Go with Exception Handled)

The gh command marks the given thread's exception as having been handled and allows the thread to restart execution at the instruction that caused the exception.

User-Mode Syntax

[~Thread] gh[a] [= StartAddress] [BreakAddress ... [; BreakCommands]] 

Kernel-Mode Syntax

gh[a] [= StartAddress] [BreakAddress ... [; BreakCommands]] 

Parameters

Thread
(User mode only) Specifies the thread to execute. This thread must have been stopped by an exception. For syntax details, see Thread Syntax.

a
Causes any breakpoint created by this command to be a processor breakpoint (like those created by ba) rather than a software breakpoint (like those created by bp and bm). If BreakAddress is not specified, no breakpoint is created and the a flag has no effect.

StartAddress
Specifies the address at which execution should begin. If this is not specified, the debugger passes execution to the address where the exception occurred. For more syntax details, see Address and Address Range Syntax.

BreakAddress
Specifies the address for a breakpoint. If BreakAddress is specified, it must specify an instruction address (that is, the address must contain the first byte of an instruction). Up to ten break addresses, in any order, can be specified at one time. If BreakAddress cannot be resolved, it is stored as an unresolved breakpoint. For more syntax details, see Address and Address Range Syntax.

BreakCommands
Specifies one or more commands to be automatically executed when the breakpoint specified by BreakAddress is hit. The BreakCommands parameter must be preceded by a semicolon. If multiple BreakAddress values are specified, BreakCommands applies to all of them.

Note   The BreakCommands parameter is only available when you are embedding this command within a command string used by another command -- for example, within another breakpoint command or within an except or event setting. On a command line, the semicolon will terminate the gh command, and any additional commands listed after the semicolon will be executed immediately after the gh command is done.

Environment

Item Description
Modes user mode, kernel mode
Targets live debugging only
Platforms all

Additional Information

For other methods of issuing this command and an overview of related commands, see Controlling the Target.

Remarks

If you use the BreakAddress parameter to set a breakpoint, this new breakpoint will only be triggered by the current thread. Other threads that execute the code at that location will not be stopped.

If Thread is specified, then the gh command is executed with the specified thread unfrozen and all others frozen. For example, if the ~123gh, ~#gh, or ~*gh command is specified, the specified threads are unfrozen and all others are frozen.