TianoCore EDK2 master
Loading...
Searching...
No Matches
DefaultExceptionHandlerUefi.c File Reference

Go to the source code of this file.

Functions

CHAR8 * GetImageName (IN UINTN FaultAddress, OUT UINTN *ImageBase, OUT UINTN *PeCoffSizeOfHeaders)
 

Detailed Description

Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file DefaultExceptionHandlerUefi.c.

Function Documentation

◆ GetImageName()

CHAR8 * GetImageName ( IN UINTN  FaultAddress,
OUT UINTN ImageBase,
OUT UINTN PeCoffSizeOfHeaders 
)

Use the EFI Debug Image Table to lookup the FaultAddress and find which PE/COFF image it came from. As long as the PE/COFF image contains a debug directory entry a string can be returned. For ELF and Mach-O images the string points to the Mach-O or ELF image. Microsoft tools contain a pointer to the PDB file that contains the debug information.

Parameters
FaultAddressAddress to find PE/COFF image for.
ImageBaseReturn load address of found image
PeCoffSizeOfHeadersReturn the size of the PE/COFF header for the image that was found
Return values
NULLFaultAddress not in a loaded PE/COFF image.
Pathand file name of PE/COFF image.

Definition at line 30 of file DefaultExceptionHandlerUefi.c.