diff --git a/dll/win32/kernel32/client/proc.c b/dll/win32/kernel32/client/proc.c index d2e38355ddd..22f29ca4bba 100644 --- a/dll/win32/kernel32/client/proc.c +++ b/dll/win32/kernel32/client/proc.c @@ -1625,14 +1625,13 @@ FatalExit(IN int ExitCode) { #if DBG /* On Checked builds, Windows gives the user a nice little debugger UI */ - CHAR ch[2]; - DbgPrint("FatalExit...\n"); - DbgPrint("\n"); + CHAR Action[2]; + DbgPrint("FatalExit...\n\n"); while (TRUE) { - DbgPrompt( "A (Abort), B (Break), I (Ignore)? ", ch, sizeof(ch)); - switch (ch[0]) + DbgPrompt("A (Abort), B (Break), I (Ignore)? ", Action, sizeof(Action)); + switch (Action[0]) { case 'B': case 'b': DbgBreakPoint(); diff --git a/ntoskrnl/ps/kill.c b/ntoskrnl/ps/kill.c index 115768687c4..4a746492486 100644 --- a/ntoskrnl/ps/kill.c +++ b/ntoskrnl/ps/kill.c @@ -42,23 +42,20 @@ PspCatchCriticalBreak(IN PCHAR Message, /* If a debugger isn't present, don't prompt */ if (KdDebuggerNotPresent) break; - /* A debuger is active, prompt for action */ - DbgPrompt("Break, or Ignore (bi)?", Action, sizeof(Action)); + /* A debugger is active, prompt for action */ + DbgPrompt("Break, or Ignore (bi)? ", Action, sizeof(Action)); switch (Action[0]) { /* Break */ case 'B': case 'b': - - /* Do a breakpoint */ DbgBreakPoint(); + /* Fall through */ - /* Ignore */ + /* Ignore: Handle it */ case 'I': case 'i': - - /* Handle it */ Handled = TRUE; - /* Unrecognized */ + /* Unrecognized: Prompt again */ default: break; } diff --git a/sdk/lib/rtl/assert.c b/sdk/lib/rtl/assert.c index 0c6fcaeeefe..6f4facb6239 100644 --- a/sdk/lib/rtl/assert.c +++ b/sdk/lib/rtl/assert.c @@ -43,52 +43,38 @@ RtlAssert(IN PVOID FailedAssertion, LineNumber); /* Prompt for action */ - DbgPrompt("Break repeatedly, break Once, Ignore," - " terminate Process or terminate Thread (boipt)? ", + DbgPrompt("Break repeatedly, break Once, Ignore, " + "terminate Process or terminate Thread (boipt)? ", Action, sizeof(Action)); switch (Action[0]) { - /* Break repeatedly */ + /* Break repeatedly / Break once */ case 'B': case 'b': - - /* Do a breakpoint, then prompt again */ - DbgPrint("Execute '.cxr %p' to dump context\n", &Context); - DbgBreakPoint(); - break; - - /* Ignore */ - case 'I': case 'i': - - /* Return to caller */ - return; - - /* Break once */ case 'O': case 'o': - - /* Do a breakpoint and return */ DbgPrint("Execute '.cxr %p' to dump context\n", &Context); + /* Do a breakpoint, then prompt again or return */ DbgBreakPoint(); + if ((Action[0] == 'B') || (Action[0] == 'b')) + break; + /* else ('O','o'): fall through */ + + /* Ignore: Return to caller */ + case 'I': case 'i': return; - /* Terminate process*/ + /* Terminate current process */ case 'P': case 'p': - - /* Terminate us */ ZwTerminateProcess(ZwCurrentProcess(), STATUS_UNSUCCESSFUL); break; - /* Terminate thread */ + /* Terminate current thread */ case 'T': case 't': - - /* Terminate us */ ZwTerminateThread(ZwCurrentThread(), STATUS_UNSUCCESSFUL); break; - /* Unrecognized */ + /* Unrecognized: Prompt again */ default: - - /* Prompt again */ break; } }