OpenCore
1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
DebugHelp.c
Go to the documentation of this file.
1
15
#include <Uefi.h>
16
#include <Library/DebugLib.h>
17
#include <Library/UefiRuntimeServicesTableLib.h>
18
#include <Library/UefiBootServicesTableLib.h>
19
#include <
Library/OcDebugLogLib.h
>
20
#include <
Library/OcMiscLib.h
>
21
22
VOID
23
#if defined (__GNUC__) || defined (__clang__)
24
__attribute__
((noinline))
25
#endif
26
DebugBreak
(
27
VOID
28
) {
29
//
30
// This function has no code, debuggers may break on it.
31
//
32
}
33
34
VOID
35
WaitForKeyPress
(
36
IN CONST CHAR16 *Message
37
)
38
{
39
EFI_STATUS Status;
40
EFI_INPUT_KEY Key;
41
volatile
BOOLEAN Proceed;
42
43
//
44
// Print message.
45
//
46
gST
->ConOut->OutputString (
gST
->ConOut, (CHAR16 *)Message);
47
gST
->ConOut->OutputString (
gST
->ConOut, (CHAR16 *)L
"\r\n"
);
48
49
//
50
// Skip previously pressed characters.
51
//
52
do
{
53
Status =
gST
->ConIn->ReadKeyStroke (
gST
->ConIn, &Key);
54
}
while
(!EFI_ERROR (Status));
55
56
//
57
// Wait for debugger signal or key press.
58
//
59
Proceed = FALSE;
60
while
(EFI_ERROR (Status) && !Proceed) {
61
Status =
gST
->ConIn->ReadKeyStroke (
gST
->ConIn, &Key);
62
DebugBreak
();
63
}
64
}
DebugBreak
VOID DebugBreak(VOID)
Definition
DebugHelp.c:26
WaitForKeyPress
VOID WaitForKeyPress(IN CONST CHAR16 *Message)
Definition
DebugHelp.c:35
__attribute__
__attribute__((packed, aligned(1)))
Definition
EfiResTool.c:67
gST
EFI_SYSTEM_TABLE * gST
Definition
OcBootServicesTableLib.c:28
OcDebugLogLib.h
OcMiscLib.h
Library
OcDebugLibProtocol
DebugHelp.c
Generated by
1.12.0