TianoCore EDK2 master
Loading...
Searching...
No Matches
EdbSymbol.h File Reference
#include <Uefi.h>

Go to the source code of this file.

Macros

#define EFI_DEBUGGER_DEFAULT_LINK_IMAGEBASE   0x10000000
 
#define EFI_DEBUGGER_MAX_SYMBOL_ADDRESS_DELTA_VALUE   0x100000
 

Enumerations

enum  EDB_MATCH_SYMBOL_TYPE {
  EdbMatchSymbolTypeSameAdderss , EdbMatchSymbolTypeNearestAddress , EdbMatchSymbolTypeLowerAddress , EdbMatchSymbolTypeUpperAddress ,
  EdbMatchSymbolTypeMax
}
 
enum  EDB_EBC_IMAGE_RVA_SEARCH_TYPE { EdbEbcImageRvaSearchTypeAny , EdbEbcImageRvaSearchTypeFirst , EdbEbcImageRvaSearchTypeLast , EdbEbcImageRvaSearchTypeMax }
 

Functions

UINTN EbdFindSymbolAddress (IN UINTN Address, IN EDB_MATCH_SYMBOL_TYPE Type, OUT EFI_DEBUGGER_SYMBOL_OBJECT **Object, OUT EFI_DEBUGGER_SYMBOL_ENTRY **Entry)
 
EFI_STATUS EdbLoadSymbol (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN CHAR16 *FileName, IN UINTN BufferSize, IN VOID *Buffer)
 
EFI_STATUS EdbUnloadSymbol (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN CHAR16 *FileName)
 
EFI_STATUS EdbPatchSymbolRVA (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN CHAR16 *FileName, IN EDB_EBC_IMAGE_RVA_SEARCH_TYPE SearchType)
 
EFI_STATUS EdbLoadCode (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN CHAR16 *MapFileName, IN CHAR16 *FileName, IN UINTN BufferSize, IN VOID *Buffer)
 
EFI_STATUS EdbUnloadCode (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN CHAR16 *MapFileName, IN CHAR16 *FileName, OUT VOID **Buffer)
 
EFI_STATUS EdbAddCodeBuffer (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN CHAR16 *MapFileName, IN CHAR16 *CodeFileName, IN UINTN SourceBufferSize, IN VOID *SourceBuffer)
 
EFI_STATUS EdbDeleteCodeBuffer (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN CHAR16 *MapFileName, IN CHAR16 *CodeFileName, IN VOID *SourceBuffer)
 
CHAR8 * FindSymbolStr (IN UINTN Address)
 
UINTN EdbPrintSource (IN UINTN Address, IN BOOLEAN IsPrint)
 
EFI_STATUS Symboltoi (IN CHAR16 *Symbol, OUT UINTN *Address)
 

Detailed Description

Copyright (c) 2007, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file EdbSymbol.h.

Macro Definition Documentation

◆ EFI_DEBUGGER_DEFAULT_LINK_IMAGEBASE

#define EFI_DEBUGGER_DEFAULT_LINK_IMAGEBASE   0x10000000

Definition at line 17 of file EdbSymbol.h.

◆ EFI_DEBUGGER_MAX_SYMBOL_ADDRESS_DELTA_VALUE

#define EFI_DEBUGGER_MAX_SYMBOL_ADDRESS_DELTA_VALUE   0x100000

Definition at line 19 of file EdbSymbol.h.

Enumeration Type Documentation

◆ EDB_EBC_IMAGE_RVA_SEARCH_TYPE

enum EDB_EBC_IMAGE_RVA_SEARCH_TYPE

Definition at line 29 of file EdbSymbol.h.

◆ EDB_MATCH_SYMBOL_TYPE

enum EDB_MATCH_SYMBOL_TYPE

Definition at line 21 of file EdbSymbol.h.

Function Documentation

◆ EbdFindSymbolAddress()

UINTN EbdFindSymbolAddress ( IN UINTN  Address,
IN EDB_MATCH_SYMBOL_TYPE  Type,
OUT EFI_DEBUGGER_SYMBOL_OBJECT **  RetObject,
OUT EFI_DEBUGGER_SYMBOL_ENTRY **  RetEntry 
)

Find symbol by address.

Parameters
Address- Symbol address
Type- Search type
RetObject- Symbol object
RetEntry- Symbol entry
Returns
Nearest symbol address

Definition at line 477 of file EdbSymbol.c.

◆ EdbAddCodeBuffer()

EFI_STATUS EdbAddCodeBuffer ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate,
IN CHAR16 *  MapFileName,
IN CHAR16 *  CodeFileName,
IN UINTN  SourceBufferSize,
IN VOID *  SourceBuffer 
)

Add code buffer.

Parameters
DebuggerPrivate- EBC Debugger private data structure
MapFileName- Symbol file name
CodeFileName- Code file name
SourceBufferSize-Code buffer size
SourceBuffer- Code buffer
Return values
EFI_SUCCESS- CodeBuffer added successfully

Definition at line 1630 of file EdbSymbol.c.

◆ EdbDeleteCodeBuffer()

EFI_STATUS EdbDeleteCodeBuffer ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate,
IN CHAR16 *  MapFileName,
IN CHAR16 *  CodeFileName,
IN VOID *  SourceBuffer 
)

Delete code buffer.

Parameters
DebuggerPrivate- EBC Debugger private data structure
MapFileName- Symbol file name
CodeFileName- Code file name
SourceBuffer- Code buffer
Return values
EFI_SUCCESS- CodeBuffer deleted successfully

Definition at line 1674 of file EdbSymbol.c.

◆ EdbLoadCode()

EFI_STATUS EdbLoadCode ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate,
IN CHAR16 *  MapFileName,
IN CHAR16 *  FileName,
IN UINTN  BufferSize,
IN VOID *  Buffer 
)

Load code.

Parameters
DebuggerPrivate- EBC Debugger private data structure
MapFileName- Symbol file name
FileName- Code file name
BufferSize- Code file buffer size
Buffer- Code file buffer
Return values
EFI_SUCCESS- Code loaded successfully

Definition at line 1438 of file EdbSymbol.c.

◆ EdbLoadSymbol()

EFI_STATUS EdbLoadSymbol ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate,
IN CHAR16 *  FileName,
IN UINTN  BufferSize,
IN VOID *  Buffer 
)

Load symbol file by name.

Parameters
DebuggerPrivate- EBC Debugger private data structure
FileName- Symbol file name
BufferSize- Symbol file buffer size
Buffer- Symbol file buffer
Return values
EFI_SUCCESS- load symbol successfully

Definition at line 693 of file EdbSymbol.c.

◆ EdbPatchSymbolRVA()

EFI_STATUS EdbPatchSymbolRVA ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate,
IN CHAR16 *  FileName,
IN EDB_EBC_IMAGE_RVA_SEARCH_TYPE  SearchType 
)

Patch symbol RVA.

Parameters
DebuggerPrivate- EBC Debugger private data structure
FileName- Symbol file name
SearchType- Search type for Object
Return values
EFI_SUCCESS- Patch symbol RVA successfully
EFI_NOT_FOUND- Symbol RVA base not found

Definition at line 997 of file EdbSymbol.c.

◆ EdbPrintSource()

UINTN EdbPrintSource ( IN UINTN  Address,
IN BOOLEAN  IsPrint 
)

Print source.

Parameters
Address- Instruction address
IsPrint- Whether need to print
Return values
1- find the source
0- not find the source

Definition at line 2086 of file EdbSymbol.c.

◆ EdbUnloadCode()

EFI_STATUS EdbUnloadCode ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate,
IN CHAR16 *  MapFileName,
IN CHAR16 *  FileName,
OUT VOID **  Buffer 
)

Unload code.

Parameters
DebuggerPrivate- EBC Debugger private data structure
MapFileName- Symbol file name
FileName- Code file name
Buffer- Code file buffer
Return values
EFI_SUCCESS- Code unloaded successfully

Definition at line 1554 of file EdbSymbol.c.

◆ EdbUnloadSymbol()

EFI_STATUS EdbUnloadSymbol ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate,
IN CHAR16 *  FileName 
)

Unload symbol file by name.

Parameters
DebuggerPrivate- EBC Debugger private data structure
FileName- Symbol file name
Return values
EFI_SUCCESS- unload symbol successfully

Definition at line 614 of file EdbSymbol.c.

◆ FindSymbolStr()

CHAR8 * FindSymbolStr ( IN UINTN  Address)

Find the symbol string according to address.

Parameters
Address- Symbol address
Returns
Symbol string

Definition at line 1733 of file EdbSymbol.c.

◆ Symboltoi()

EFI_STATUS Symboltoi ( IN CHAR16 *  Symbol,
OUT UINTN Address 
)

Convert a symbol to an address.

Parameters
Symbol- Symbol name
Address- Symbol address
Return values
EFI_SUCCESS- symbol found and address returned.
EFI_NOT_FOUND- symbol not found
EFI_NO_MAPPING- duplicated symbol not found

Definition at line 2222 of file EdbSymbol.c.