ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

USHORT NTAPI KdpPrompt ( IN LPSTR  PromptString,
IN USHORT  PromptLength,
OUT LPSTR  ResponseString,
IN USHORT  MaximumResponseLength,
IN KPROCESSOR_MODE  PreviousMode,
IN PKTRAP_FRAME  TrapFrame,
IN PKEXCEPTION_FRAME  ExceptionFrame 
)

Definition at line 206 of file kdprint.c.

Referenced by KdpEnterDebuggerException(), and KdpTrap().

{
    STRING PromptBuffer, ResponseBuffer;
    BOOLEAN Enable, Resend;

    /* Normalize the lengths */
    PromptLength = min(PromptLength, 512);
    MaximumResponseLength = min(MaximumResponseLength, 512);

    /* Check if we need to verify the string */
    if (PreviousMode != KernelMode)
    {
        /* FIXME: Handle user-mode */
    }

    /* Setup the prompt and response  buffers */
    PromptBuffer.Buffer = PromptString;
    PromptBuffer.Length = PromptLength;
    ResponseBuffer.Buffer = ResponseString;
    ResponseBuffer.Length = 0;
    ResponseBuffer.MaximumLength = MaximumResponseLength;

    /* Log the print */
    //KdLogDbgPrint(&PromptBuffer);

    /* Enter the debugger */
    Enable = KdEnterDebugger(TrapFrame, ExceptionFrame);

    /* Enter prompt loop */
    do
    {
        /* Send the prompt and receive the response */
        Resend = KdpPromptString(&PromptBuffer, &ResponseBuffer);

    /* Loop while we need to resend */
    } while (Resend);

    /* Exit the debugger */
    KdExitDebugger(Enable);

    /* Return the number of characters received */
    return ResponseBuffer.Length;
}

Generated on Mon May 28 2012 06:07:54 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.