MdeModulePkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdeModulePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
7c7184e201
commit
1436aea4d5
@@ -19,17 +19,17 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
**/
|
||||
CHAR16 *
|
||||
GetFileNameFromFullPath (
|
||||
IN CHAR16 *FullPath
|
||||
IN CHAR16 *FullPath
|
||||
)
|
||||
{
|
||||
CHAR16 *FileName;
|
||||
CHAR16 *TempFileName;
|
||||
CHAR16 *FileName;
|
||||
CHAR16 *TempFileName;
|
||||
|
||||
FileName = FullPath;
|
||||
FileName = FullPath;
|
||||
TempFileName = StrGetNewTokenLine (FullPath, L"\\");
|
||||
|
||||
while (TempFileName != NULL) {
|
||||
FileName = TempFileName;
|
||||
FileName = TempFileName;
|
||||
TempFileName = StrGetNextTokenLine (L"\\");
|
||||
PatchForStrTokenBefore (TempFileName, L'\\');
|
||||
}
|
||||
@@ -48,10 +48,10 @@ GetFileNameFromFullPath (
|
||||
**/
|
||||
CHAR16 *
|
||||
GetDirNameFromFullPath (
|
||||
IN CHAR16 *FullPath
|
||||
IN CHAR16 *FullPath
|
||||
)
|
||||
{
|
||||
CHAR16 *FileName;
|
||||
CHAR16 *FileName;
|
||||
|
||||
FileName = GetFileNameFromFullPath (FullPath);
|
||||
if (FileName != FullPath) {
|
||||
@@ -75,14 +75,14 @@ GetDirNameFromFullPath (
|
||||
**/
|
||||
CHAR16 *
|
||||
ConstructFullPath (
|
||||
IN CHAR16 *DirPath,
|
||||
IN CHAR16 *FilePath,
|
||||
IN UINTN Size
|
||||
IN CHAR16 *DirPath,
|
||||
IN CHAR16 *FilePath,
|
||||
IN UINTN Size
|
||||
)
|
||||
{
|
||||
UINTN DirPathSize;
|
||||
UINTN DirPathSize;
|
||||
|
||||
DirPathSize = StrLen(DirPath);
|
||||
DirPathSize = StrLen (DirPath);
|
||||
*(DirPath + DirPathSize) = L'\\';
|
||||
StrnCatS (DirPath, DirPathSize + Size + 1, FilePath, Size);
|
||||
|
||||
@@ -91,7 +91,7 @@ ConstructFullPath (
|
||||
return DirPath;
|
||||
}
|
||||
|
||||
CHAR16 *mSymbolTypeStr[] = {
|
||||
CHAR16 *mSymbolTypeStr[] = {
|
||||
L"( F)",
|
||||
L"(SF)",
|
||||
L"(GV)",
|
||||
@@ -112,11 +112,11 @@ EdbSymbolTypeToStr (
|
||||
IN EFI_DEBUGGER_SYMBOL_TYPE Type
|
||||
)
|
||||
{
|
||||
if (Type < 0 || Type >= EfiDebuggerSymbolTypeMax) {
|
||||
if ((Type < 0) || (Type >= EfiDebuggerSymbolTypeMax)) {
|
||||
return L"(?)";
|
||||
}
|
||||
|
||||
return mSymbolTypeStr [Type];
|
||||
return mSymbolTypeStr[Type];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -132,18 +132,18 @@ EdbSymbolTypeToStr (
|
||||
EFI_DEBUG_STATUS
|
||||
DebuggerDisplaySymbolAccrodingToAddress (
|
||||
IN UINTN Address,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate
|
||||
)
|
||||
{
|
||||
EFI_DEBUGGER_SYMBOL_OBJECT *Object;
|
||||
EFI_DEBUGGER_SYMBOL_ENTRY *Entry;
|
||||
UINTN CandidateAddress;
|
||||
EFI_DEBUGGER_SYMBOL_OBJECT *Object;
|
||||
EFI_DEBUGGER_SYMBOL_ENTRY *Entry;
|
||||
UINTN CandidateAddress;
|
||||
|
||||
//
|
||||
// Find the nearest symbol address
|
||||
//
|
||||
CandidateAddress = EbdFindSymbolAddress (Address, EdbMatchSymbolTypeNearestAddress, &Object, &Entry);
|
||||
if (CandidateAddress == 0 || CandidateAddress == (UINTN) -1 || Entry == NULL) {
|
||||
if ((CandidateAddress == 0) || (CandidateAddress == (UINTN)-1) || (Entry == NULL)) {
|
||||
EDBPrint (L"Symbole at Address not found!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
} else if (Address != CandidateAddress) {
|
||||
@@ -154,10 +154,10 @@ DebuggerDisplaySymbolAccrodingToAddress (
|
||||
// Display symbol
|
||||
//
|
||||
EDBPrint (L"Symbol File Name: %s\n", Object->Name);
|
||||
if (sizeof(UINTN) == sizeof(UINT64)) {
|
||||
if (sizeof (UINTN) == sizeof (UINT64)) {
|
||||
EDBPrint (L" Address Type Symbol\n");
|
||||
EDBPrint (L" ================== ==== ========\n");
|
||||
// EDBPrint (L" 0xFFFFFFFF00000000 ( F) TestMain\n");
|
||||
// EDBPrint (L" 0xFFFFFFFF00000000 ( F) TestMain\n");
|
||||
EDBPrint (
|
||||
L" 0x%016lx %s %a\n",
|
||||
(UINT64)Entry->Rva + Object->BaseAddress,
|
||||
@@ -167,7 +167,7 @@ DebuggerDisplaySymbolAccrodingToAddress (
|
||||
} else {
|
||||
EDBPrint (L" Address Type Symbol\n");
|
||||
EDBPrint (L" ========== ==== ========\n");
|
||||
// EDBPrint (L" 0xFFFF0000 ( F) TestMain\n");
|
||||
// EDBPrint (L" 0xFFFF0000 ( F) TestMain\n");
|
||||
EDBPrint (
|
||||
L" 0x%08x %s %a\n",
|
||||
Entry->Rva + Object->BaseAddress,
|
||||
@@ -197,13 +197,13 @@ EFI_DEBUG_STATUS
|
||||
DebuggerDisplaySymbolAccrodingToName (
|
||||
IN CHAR16 *SymbolFileName,
|
||||
IN CHAR16 *SymbolName,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
UINTN SubIndex;
|
||||
EFI_DEBUGGER_SYMBOL_OBJECT *Object;
|
||||
EFI_DEBUGGER_SYMBOL_ENTRY *Entry;
|
||||
UINTN Index;
|
||||
UINTN SubIndex;
|
||||
EFI_DEBUGGER_SYMBOL_OBJECT *Object;
|
||||
EFI_DEBUGGER_SYMBOL_ENTRY *Entry;
|
||||
|
||||
if (DebuggerPrivate->DebuggerSymbolContext.ObjectCount == 0) {
|
||||
EDBPrint (L"No Symbol File!\n");
|
||||
@@ -216,7 +216,8 @@ DebuggerDisplaySymbolAccrodingToName (
|
||||
Object = DebuggerPrivate->DebuggerSymbolContext.Object;
|
||||
for (Index = 0; Index < DebuggerPrivate->DebuggerSymbolContext.ObjectCount; Index++, Object++) {
|
||||
if ((SymbolFileName != NULL) &&
|
||||
(StriCmp (SymbolFileName, Object->Name) != 0)) {
|
||||
(StriCmp (SymbolFileName, Object->Name) != 0))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -234,15 +235,16 @@ DebuggerDisplaySymbolAccrodingToName (
|
||||
EDBPrint (L"No Symbol!\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
Entry = Object->Entry;
|
||||
if (sizeof(UINTN) == sizeof(UINT64)) {
|
||||
if (sizeof (UINTN) == sizeof (UINT64)) {
|
||||
EDBPrint (L" Address Type Symbol\n");
|
||||
EDBPrint (L" ================== ==== ========\n");
|
||||
// EDBPrint (L" 0xFFFFFFFF00000000 ( F) TestMain (EbcTest.obj)\n");
|
||||
// EDBPrint (L" 0xFFFFFFFF00000000 ( F) TestMain (EbcTest.obj)\n");
|
||||
} else {
|
||||
EDBPrint (L" Address Type Symbol\n");
|
||||
EDBPrint (L" ========== ==== ========\n");
|
||||
// EDBPrint (L" 0xFFFF0000 ( F) TestMain (EbcTest.obj)\n");
|
||||
// EDBPrint (L" 0xFFFF0000 ( F) TestMain (EbcTest.obj)\n");
|
||||
}
|
||||
|
||||
//
|
||||
@@ -250,7 +252,8 @@ DebuggerDisplaySymbolAccrodingToName (
|
||||
//
|
||||
for (SubIndex = 0; SubIndex < Object->EntryCount; SubIndex++, Entry++) {
|
||||
if ((SymbolName != NULL) &&
|
||||
(StrCmpUnicodeAndAscii (SymbolName, Entry->Name) != 0)) {
|
||||
(StrCmpUnicodeAndAscii (SymbolName, Entry->Name) != 0))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -258,13 +261,14 @@ DebuggerDisplaySymbolAccrodingToName (
|
||||
// Break symbol
|
||||
//
|
||||
if (((SubIndex % EFI_DEBUGGER_LINE_NUMBER_IN_PAGE) == 0) &&
|
||||
(SubIndex != 0)) {
|
||||
(SubIndex != 0))
|
||||
{
|
||||
if (SetPageBreak ()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof(UINTN) == sizeof(UINT64)) {
|
||||
if (sizeof (UINTN) == sizeof (UINT64)) {
|
||||
EDBPrint (
|
||||
L" 0x%016lx %s %a (%a)\n",
|
||||
(UINT64)Entry->Rva + Object->BaseAddress,
|
||||
@@ -304,27 +308,28 @@ DebuggerDisplaySymbolAccrodingToName (
|
||||
**/
|
||||
EFI_DEBUG_STATUS
|
||||
DebuggerListSymbol (
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
)
|
||||
{
|
||||
CHAR16 *SymbolFileName;
|
||||
CHAR16 *SymbolName;
|
||||
CHAR16 *CommandStr;
|
||||
UINTN Address;
|
||||
CHAR16 *SymbolFileName;
|
||||
CHAR16 *SymbolName;
|
||||
CHAR16 *CommandStr;
|
||||
UINTN Address;
|
||||
|
||||
SymbolFileName = NULL;
|
||||
SymbolName = NULL;
|
||||
CommandStr = CommandArg;
|
||||
SymbolName = NULL;
|
||||
CommandStr = CommandArg;
|
||||
|
||||
//
|
||||
// display symbol according to address
|
||||
//
|
||||
if (CommandStr != NULL) {
|
||||
if ((StriCmp (CommandStr, L"F") != 0) &&
|
||||
(StriCmp (CommandStr, L"S") != 0)) {
|
||||
(StriCmp (CommandStr, L"S") != 0))
|
||||
{
|
||||
Address = Xtoi (CommandStr);
|
||||
return DebuggerDisplaySymbolAccrodingToAddress (Address, DebuggerPrivate);
|
||||
}
|
||||
@@ -341,10 +346,11 @@ DebuggerListSymbol (
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
} else {
|
||||
SymbolFileName = CommandStr;
|
||||
CommandStr = StrGetNextTokenLine (L" ");
|
||||
CommandStr = StrGetNextTokenLine (L" ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Get SymbolName
|
||||
//
|
||||
@@ -360,6 +366,7 @@ DebuggerListSymbol (
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (CommandStr != NULL) {
|
||||
EDBPrint (L"Argument error!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
@@ -385,22 +392,22 @@ DebuggerListSymbol (
|
||||
**/
|
||||
EFI_DEBUG_STATUS
|
||||
DebuggerLoadSymbol (
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
)
|
||||
{
|
||||
UINTN BufferSize;
|
||||
VOID *Buffer;
|
||||
EFI_STATUS Status;
|
||||
CHAR16 *FileName;
|
||||
CHAR16 *CommandArg2;
|
||||
BOOLEAN IsLoadCode;
|
||||
CHAR16 *DirName;
|
||||
CHAR16 CodFile[EFI_DEBUGGER_SYMBOL_NAME_MAX];
|
||||
CHAR16 *CodFileName;
|
||||
UINTN Index;
|
||||
UINTN BufferSize;
|
||||
VOID *Buffer;
|
||||
EFI_STATUS Status;
|
||||
CHAR16 *FileName;
|
||||
CHAR16 *CommandArg2;
|
||||
BOOLEAN IsLoadCode;
|
||||
CHAR16 *DirName;
|
||||
CHAR16 CodFile[EFI_DEBUGGER_SYMBOL_NAME_MAX];
|
||||
CHAR16 *CodFileName;
|
||||
UINTN Index;
|
||||
|
||||
//
|
||||
// Check the argument
|
||||
@@ -409,7 +416,8 @@ DebuggerLoadSymbol (
|
||||
EDBPrint (L"SymbolFile not found!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
IsLoadCode = FALSE;
|
||||
|
||||
IsLoadCode = FALSE;
|
||||
CommandArg2 = StrGetNextTokenLine (L" ");
|
||||
if (CommandArg2 != NULL) {
|
||||
if (StriCmp (CommandArg2, L"a") == 0) {
|
||||
@@ -424,6 +432,7 @@ DebuggerLoadSymbol (
|
||||
EDBPrint (L"SymbolFile name error!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
|
||||
if (StriCmp (CommandArg + (StrLen (CommandArg) - 4), L".map") != 0) {
|
||||
EDBPrint (L"SymbolFile name error!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
@@ -433,7 +442,7 @@ DebuggerLoadSymbol (
|
||||
// Read MAP file to memory
|
||||
//
|
||||
Status = ReadFileToBuffer (DebuggerPrivate, CommandArg, &BufferSize, &Buffer, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (EFI_ERROR (Status)) {
|
||||
EDBPrint (L"SymbolFile read error!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
@@ -443,18 +452,19 @@ DebuggerLoadSymbol (
|
||||
// Load Symbol
|
||||
//
|
||||
Status = EdbLoadSymbol (DebuggerPrivate, FileName, BufferSize, Buffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (EFI_ERROR (Status)) {
|
||||
EDBPrint (L"LoadSymbol error!\n");
|
||||
gBS->FreePool (Buffer);
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
|
||||
gBS->FreePool (Buffer);
|
||||
|
||||
//
|
||||
// Patch Symbol for RVA
|
||||
//
|
||||
Status = EdbPatchSymbolRVA (DebuggerPrivate, FileName, EdbEbcImageRvaSearchTypeLast);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (EFI_ERROR (Status)) {
|
||||
EDBPrint (L"PatchSymbol RVA - %r! Using the RVA in symbol file.\n", Status);
|
||||
} else {
|
||||
DEBUG ((DEBUG_ERROR, "PatchSymbol RVA successfully!\n"));
|
||||
@@ -468,9 +478,9 @@ DebuggerLoadSymbol (
|
||||
// load each cod file
|
||||
//
|
||||
DirName = GetDirNameFromFullPath (CommandArg);
|
||||
ZeroMem (CodFile, sizeof(CodFile));
|
||||
ZeroMem (CodFile, sizeof (CodFile));
|
||||
if (StrCmp (DirName, L"") != 0) {
|
||||
StrCpyS (CodFile, sizeof(CodFile), DirName);
|
||||
StrCpyS (CodFile, sizeof (CodFile), DirName);
|
||||
} else {
|
||||
DirName = L"\\";
|
||||
}
|
||||
@@ -478,19 +488,19 @@ DebuggerLoadSymbol (
|
||||
//
|
||||
// Go throuth each file under this dir
|
||||
//
|
||||
Index = 0;
|
||||
Index = 0;
|
||||
CodFileName = GetFileNameUnderDir (DebuggerPrivate, DirName, L".cod", &Index);
|
||||
while (CodFileName != NULL) {
|
||||
ZeroMem (CodFile, sizeof(CodFile));
|
||||
ZeroMem (CodFile, sizeof (CodFile));
|
||||
if (StrCmp (DirName, L"\\") != 0) {
|
||||
StrCpyS (CodFile, sizeof(CodFile), DirName);
|
||||
StrCpyS (CodFile, sizeof (CodFile), DirName);
|
||||
}
|
||||
|
||||
//
|
||||
// read cod file to memory
|
||||
//
|
||||
Status = ReadFileToBuffer (DebuggerPrivate, ConstructFullPath (CodFile, CodFileName, EFI_DEBUGGER_SYMBOL_NAME_MAX - StrLen (CodFile) - 2), &BufferSize, &Buffer, FALSE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (EFI_ERROR (Status)) {
|
||||
EDBPrint (L"CodeFile read error!\n");
|
||||
CodFileName = GetFileNameUnderDir (DebuggerPrivate, DirName, L".cod", &Index);
|
||||
continue;
|
||||
@@ -544,19 +554,19 @@ DebuggerLoadSymbol (
|
||||
**/
|
||||
EFI_DEBUG_STATUS
|
||||
DebuggerUnloadSymbol (
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
CHAR16 *FileName;
|
||||
CHAR16 *DirName;
|
||||
CHAR16 CodFile[EFI_DEBUGGER_SYMBOL_NAME_MAX];
|
||||
CHAR16 *CodFileName;
|
||||
UINTN Index;
|
||||
VOID *BufferPtr;
|
||||
EFI_STATUS Status;
|
||||
CHAR16 *FileName;
|
||||
CHAR16 *DirName;
|
||||
CHAR16 CodFile[EFI_DEBUGGER_SYMBOL_NAME_MAX];
|
||||
CHAR16 *CodFileName;
|
||||
UINTN Index;
|
||||
VOID *BufferPtr;
|
||||
|
||||
//
|
||||
// Check the argument
|
||||
@@ -572,9 +582,9 @@ DebuggerUnloadSymbol (
|
||||
// Unload Code
|
||||
//
|
||||
DirName = GetDirNameFromFullPath (CommandArg);
|
||||
ZeroMem (CodFile, sizeof(CodFile));
|
||||
ZeroMem (CodFile, sizeof (CodFile));
|
||||
if (StrCmp (DirName, L"") != 0) {
|
||||
StrCpyS (CodFile, sizeof(CodFile), DirName);
|
||||
StrCpyS (CodFile, sizeof (CodFile), DirName);
|
||||
} else {
|
||||
DirName = L"\\";
|
||||
}
|
||||
@@ -582,12 +592,12 @@ DebuggerUnloadSymbol (
|
||||
//
|
||||
// Go through each file under this dir
|
||||
//
|
||||
Index = 0;
|
||||
Index = 0;
|
||||
CodFileName = GetFileNameUnderDir (DebuggerPrivate, DirName, L".cod", &Index);
|
||||
while (CodFileName != NULL) {
|
||||
ZeroMem (CodFile, sizeof(CodFile));
|
||||
ZeroMem (CodFile, sizeof (CodFile));
|
||||
if (StrCmp (DirName, L"\\") != 0) {
|
||||
StrCpyS (CodFile, sizeof(CodFile), DirName);
|
||||
StrCpyS (CodFile, sizeof (CodFile), DirName);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -620,7 +630,7 @@ DebuggerUnloadSymbol (
|
||||
// Unload Symbol
|
||||
//
|
||||
Status = EdbUnloadSymbol (DebuggerPrivate, FileName);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (EFI_ERROR (Status)) {
|
||||
EDBPrint (L"UnloadSymbol error!\n");
|
||||
}
|
||||
|
||||
@@ -644,10 +654,10 @@ DebuggerUnloadSymbol (
|
||||
**/
|
||||
EFI_DEBUG_STATUS
|
||||
DebuggerDisplaySymbol (
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
)
|
||||
{
|
||||
if (CommandArg == NULL) {
|
||||
@@ -680,18 +690,18 @@ DebuggerDisplaySymbol (
|
||||
**/
|
||||
EFI_DEBUG_STATUS
|
||||
DebuggerLoadCode (
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
)
|
||||
{
|
||||
UINTN BufferSize;
|
||||
VOID *Buffer;
|
||||
EFI_STATUS Status;
|
||||
CHAR16 *CommandArg2;
|
||||
CHAR16 *FileName;
|
||||
CHAR16 *MapFileName;
|
||||
UINTN BufferSize;
|
||||
VOID *Buffer;
|
||||
EFI_STATUS Status;
|
||||
CHAR16 *CommandArg2;
|
||||
CHAR16 *FileName;
|
||||
CHAR16 *MapFileName;
|
||||
|
||||
//
|
||||
// Check the argument
|
||||
@@ -700,6 +710,7 @@ DebuggerLoadCode (
|
||||
EDBPrint (L"CodeFile not found!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
|
||||
CommandArg2 = StrGetNextTokenLine (L" ");
|
||||
if (CommandArg2 == NULL) {
|
||||
EDBPrint (L"SymbolFile not found!\n");
|
||||
@@ -710,14 +721,17 @@ DebuggerLoadCode (
|
||||
EDBPrint (L"CodeFile name error!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
|
||||
if (StriCmp (CommandArg + (StrLen (CommandArg) - 4), L".cod") != 0) {
|
||||
EDBPrint (L"CodeFile name error!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
|
||||
if (StrLen (CommandArg2) <= 4) {
|
||||
EDBPrint (L"SymbolFile name error!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
|
||||
if (StriCmp (CommandArg2 + (StrLen (CommandArg2) - 4), L".map") != 0) {
|
||||
EDBPrint (L"SymbolFile name error!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
@@ -727,12 +741,12 @@ DebuggerLoadCode (
|
||||
// read cod file to memory
|
||||
//
|
||||
Status = ReadFileToBuffer (DebuggerPrivate, CommandArg, &BufferSize, &Buffer, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (EFI_ERROR (Status)) {
|
||||
EDBPrint (L"CodeFile read error!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
|
||||
FileName = GetFileNameFromFullPath (CommandArg);
|
||||
FileName = GetFileNameFromFullPath (CommandArg);
|
||||
MapFileName = GetFileNameFromFullPath (CommandArg2);
|
||||
//
|
||||
// Load Code
|
||||
@@ -774,17 +788,17 @@ DebuggerLoadCode (
|
||||
**/
|
||||
EFI_DEBUG_STATUS
|
||||
DebuggerUnloadCode (
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
)
|
||||
{
|
||||
CHAR16 *CommandArg2;
|
||||
CHAR16 *FileName;
|
||||
CHAR16 *MapFileName;
|
||||
EFI_STATUS Status;
|
||||
VOID *BufferPtr;
|
||||
CHAR16 *CommandArg2;
|
||||
CHAR16 *FileName;
|
||||
CHAR16 *MapFileName;
|
||||
EFI_STATUS Status;
|
||||
VOID *BufferPtr;
|
||||
|
||||
//
|
||||
// Check the argument
|
||||
@@ -793,13 +807,14 @@ DebuggerUnloadCode (
|
||||
EDBPrint (L"CodeFile not found!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
|
||||
CommandArg2 = StrGetNextTokenLine (L" ");
|
||||
if (CommandArg2 == NULL) {
|
||||
EDBPrint (L"SymbolFile not found!\n");
|
||||
return EFI_DEBUG_CONTINUE;
|
||||
}
|
||||
|
||||
FileName = GetFileNameFromFullPath (CommandArg);
|
||||
FileName = GetFileNameFromFullPath (CommandArg);
|
||||
MapFileName = GetFileNameFromFullPath (CommandArg2);
|
||||
|
||||
//
|
||||
@@ -839,10 +854,10 @@ DebuggerUnloadCode (
|
||||
**/
|
||||
EFI_DEBUG_STATUS
|
||||
DebuggerDisplayCode (
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
IN CHAR16 *CommandArg,
|
||||
IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
)
|
||||
{
|
||||
if (CommandArg == NULL) {
|
||||
|
Reference in New Issue
Block a user