MdeModulePkg/EbcDxe: Add comments for functions
Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Pete Batard <pete@akeo.ie> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jiewen.yao@intel.com
This commit is contained in:
@@ -39,6 +39,18 @@ typedef enum {
|
||||
EdbEbcImageRvaSearchTypeMax,
|
||||
} EDB_EBC_IMAGE_RVA_SEARCH_TYPE;
|
||||
|
||||
/**
|
||||
|
||||
Find symbol by address.
|
||||
|
||||
@param Address - Symbol address
|
||||
@param Type - Search type
|
||||
@param RetObject - Symbol object
|
||||
@param RetEntry - Symbol entry
|
||||
|
||||
@return Nearest symbol address
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EbdFindSymbolAddress (
|
||||
IN UINTN Address,
|
||||
@@ -47,6 +59,18 @@ EbdFindSymbolAddress (
|
||||
OUT EFI_DEBUGGER_SYMBOL_ENTRY **Entry
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Load symbol file by name.
|
||||
|
||||
@param DebuggerPrivate - EBC Debugger private data structure
|
||||
@param FileName - Symbol file name
|
||||
@param BufferSize - Symbol file buffer size
|
||||
@param Buffer - Symbol file buffer
|
||||
|
||||
@retval EFI_SUCCESS - load symbol successfully
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EdbLoadSymbol (
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
@@ -55,12 +79,34 @@ EdbLoadSymbol (
|
||||
IN VOID *Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Unload symbol file by name.
|
||||
|
||||
@param DebuggerPrivate - EBC Debugger private data structure
|
||||
@param FileName - Symbol file name
|
||||
|
||||
@retval EFI_SUCCESS - unload symbol successfully
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EdbUnloadSymbol (
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN CHAR16 *FileName
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Patch symbol RVA.
|
||||
|
||||
@param DebuggerPrivate - EBC Debugger private data structure
|
||||
@param FileName - Symbol file name
|
||||
@param SearchType - Search type for Object
|
||||
|
||||
@retval EFI_SUCCESS - Patch symbol RVA successfully
|
||||
@retval EFI_NOT_FOUND - Symbol RVA base not found
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EdbPatchSymbolRVA (
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
@@ -68,6 +114,19 @@ EdbPatchSymbolRVA (
|
||||
IN EDB_EBC_IMAGE_RVA_SEARCH_TYPE SearchType
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Load code.
|
||||
|
||||
@param DebuggerPrivate - EBC Debugger private data structure
|
||||
@param MapFileName - Symbol file name
|
||||
@param FileName - Code file name
|
||||
@param BufferSize - Code file buffer size
|
||||
@param Buffer - Code file buffer
|
||||
|
||||
@retval EFI_SUCCESS - Code loaded successfully
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EdbLoadCode (
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
@@ -77,6 +136,18 @@ EdbLoadCode (
|
||||
IN VOID *Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Unload code.
|
||||
|
||||
@param DebuggerPrivate - EBC Debugger private data structure
|
||||
@param MapFileName - Symbol file name
|
||||
@param FileName - Code file name
|
||||
@param Buffer - Code file buffer
|
||||
|
||||
@retval EFI_SUCCESS - Code unloaded successfully
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EdbUnloadCode (
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
@@ -85,6 +156,19 @@ EdbUnloadCode (
|
||||
OUT VOID **Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Add code buffer.
|
||||
|
||||
@param DebuggerPrivate - EBC Debugger private data structure
|
||||
@param MapFileName - Symbol file name
|
||||
@param CodeFileName - Code file name
|
||||
@param SourceBufferSize- Code buffer size
|
||||
@param SourceBuffer - Code buffer
|
||||
|
||||
@retval EFI_SUCCESS - CodeBuffer added successfully
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EdbAddCodeBuffer (
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
@@ -94,6 +178,18 @@ EdbAddCodeBuffer (
|
||||
IN VOID *SourceBuffer
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Delete code buffer.
|
||||
|
||||
@param DebuggerPrivate - EBC Debugger private data structure
|
||||
@param MapFileName - Symbol file name
|
||||
@param CodeFileName - Code file name
|
||||
@param SourceBuffer - Code buffer
|
||||
|
||||
@retval EFI_SUCCESS - CodeBuffer deleted successfully
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EdbDeleteCodeBuffer (
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
@@ -102,17 +198,49 @@ EdbDeleteCodeBuffer (
|
||||
IN VOID *SourceBuffer
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Find the symbol string according to address.
|
||||
|
||||
@param Address - Symbol address
|
||||
|
||||
@return Symbol string
|
||||
|
||||
**/
|
||||
CHAR8 *
|
||||
FindSymbolStr (
|
||||
IN UINTN Address
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Print source.
|
||||
|
||||
@param Address - Instruction address
|
||||
@param IsPrint - Whether need to print
|
||||
|
||||
@retval 1 - find the source
|
||||
@retval 0 - not find the source
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EdbPrintSource (
|
||||
IN UINTN Address,
|
||||
IN BOOLEAN IsPrint
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Convert a symbol to an address.
|
||||
|
||||
@param Symbol - Symbol name
|
||||
@param Address - Symbol address
|
||||
|
||||
@retval EFI_SUCCESS - symbol found and address returned.
|
||||
@retval EFI_NOT_FOUND - symbol not found
|
||||
@retval EFI_NO_MAPPING - duplicated symbol not found
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
Symboltoi (
|
||||
IN CHAR16 *Symbol,
|
||||
|
Reference in New Issue
Block a user