gn, gN (Go with Exception Not Handled)

The gn and gN commands continue execution of the given thread without marking the exception as having been handled. This allows the application's exception handler to handle the exception.

User-Mode Syntax

[~Thread] gn[a] [= StartAddress] [BreakAddress ... [; BreakCommands]] 
[~Thread] gN[a] [= StartAddress] [BreakAddress ... [; BreakCommands]] 

Kernel-Mode Syntax

gn[a] [= StartAddress] [BreakAddress ... [; BreakCommands]] 
gN[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 where 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 command, and any additional commands listed after the semicolon will be executed immediately after the gn or gN 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 the debugger is not stopped at a breakpoint, gn and gN behave identically. If the debugger is stopped at a breakpoint, gn will not work; you must capitalize the "N" to execute this command. This is a safety precaution, since it is rarely wise to continue a breakpoint unhandled.

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 gn command is executed with the specified thread unfrozen and all others frozen. For example, if the ~123gn, ~#gn, or ~*gn command is specified, the specified threads are unfrozen and all others are frozen.