OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OcDebugLogLib.h File Reference
#include <Library/DebugLib.h>
#include <Protocol/OcLog.h>
#include <Protocol/AppleDebugLog.h>

Go to the source code of this file.

Macros

#define OC_HEX_LOWER(x)
 
#define OC_HEX_UPPER(x)
 
#define OC_HUMAN_STRING(TextDevicePath)
 
#define DEBUG_BULK_INFO   (DEBUG_VERBOSE|DEBUG_INFO)
 
#define RUNTIME_DEBUG(x)
 

Functions

VOID DebugBreak (VOID)
 
VOID WaitForKeyPress (IN CONST CHAR16 *Message)
 
VOID DebugPrintDevicePath (IN UINTN ErrorLevel, IN CONST CHAR8 *Message, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL)
 
VOID DebugPrintDevicePathForHandle (IN UINTN ErrorLevel, IN CONST CHAR8 *Message, IN EFI_HANDLE Handle OPTIONAL)
 
VOID DebugPrintHexDump (IN UINTN ErrorLevel, IN CONST CHAR8 *Message, IN UINT8 *Bytes, IN UINTN Size)
 

Detailed Description

Copyright (C) 2019, vit9696. All rights reserved.

All rights reserved.

This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file OcDebugLogLib.h.

Macro Definition Documentation

◆ DEBUG_BULK_INFO

#define DEBUG_BULK_INFO   (DEBUG_VERBOSE|DEBUG_INFO)

Debug information that is not logged when NVRAM logging is on.

Definition at line 35 of file OcDebugLogLib.h.

◆ OC_HEX_LOWER

#define OC_HEX_LOWER ( x)
Value:
"0123456789ABCDEF"[((UINT32) (x) & 0x0FU)]
UINT16 x
Definition BmfFile.h:83

Definition at line 22 of file OcDebugLogLib.h.

◆ OC_HEX_UPPER

#define OC_HEX_UPPER ( x)
Value:
"0123456789ABCDEF"[((UINT32) (x) & 0xF0U) >> 4U]

Definition at line 23 of file OcDebugLogLib.h.

◆ OC_HUMAN_STRING

#define OC_HUMAN_STRING ( TextDevicePath)
Value:
((TextDevicePath) == NULL ? L"<nil>" : (TextDevicePath)[0] == '\0' ? L"<empty>" : (TextDevicePath))

Expand device path to human readable string.

Definition at line 28 of file OcDebugLogLib.h.

◆ RUNTIME_DEBUG

#define RUNTIME_DEBUG ( x)
Value:
do { } while (0)

This is a place print debug messages when they happen after ExitBootServices.

Definition at line 41 of file OcDebugLogLib.h.

Function Documentation

◆ DebugBreak()

VOID DebugBreak ( VOID )

Pointer debug kit. Dummy function that debuggers may break on.

Definition at line 203 of file OcDebugLibNull.c.

◆ DebugPrintDevicePath()

VOID DebugPrintDevicePath ( IN UINTN ErrorLevel,
IN CONST CHAR8 * Message,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL )

Print Device Path to log.

Parameters
[in]ErrorLevelDebug error level.
[in]MessagePrefixed message.
[in]DevicePathDevice path to print.

Definition at line 219 of file OcDebugLibNull.c.

◆ DebugPrintDevicePathForHandle()

VOID DebugPrintDevicePathForHandle ( IN UINTN ErrorLevel,
IN CONST CHAR8 * Message,
IN EFI_HANDLE Handle OPTIONAL )

Print Device Path corresponding to EFI Handle to log.

Parameters
[in]ErrorLevelDebug error level.
[in]MessagePrefixed message.
[in]HandleHandle corresponding to Device path to print.

Definition at line 228 of file OcDebugLibNull.c.

◆ DebugPrintHexDump()

VOID DebugPrintHexDump ( IN UINTN ErrorLevel,
IN CONST CHAR8 * Message,
IN UINT8 * Bytes,
IN UINTN Size )

Print hex dump to log.

Parameters
[in]ErrorLevelDebug error level.
[in]MessagePrefixed message.
[in]BytesByte sequence.
[in]SizeByte sequence size.

Definition at line 237 of file OcDebugLibNull.c.

◆ WaitForKeyPress()

VOID WaitForKeyPress ( IN CONST CHAR16 * Message)

Wait for user input after printing message.

Parameters
[in]MessageMessage to print.

Definition at line 35 of file DebugHelp.c.