From: andrewfish Date: Tue, 2 Mar 2010 00:06:19 +0000 (+0000) Subject: Remove unneeded space in sym output to make sure the output is RVD compatible. X-Git-Tag: edk2-stable201903~16187 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=b8758b6e6f88510e531a758ca353ff1d24a9f00c Remove unneeded space in sym output to make sure the output is RVD compatible. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10149 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.c b/BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.c index e637071df0..2141c159b5 100644 --- a/BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.c +++ b/BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.c @@ -63,7 +63,8 @@ EblSymbolTable ( BOOLEAN Elf; // Need to add lots of error checking on the passed in string - Format = (Argc > 1) ? Argv[1] : "load /a /ni /np %a & 0x%x"; + // Default string is for RealView debugger + Format = (Argc > 1) ? Argv[1] : "load /a /ni /np %a &0x%x"; Elf = (Argc > 2) ? FALSE : TRUE; Status = EfiGetSystemConfigurationTable (&gEfiDebugImageInfoTableGuid, (VOID **)&DebugImageTableHeader); @@ -82,12 +83,15 @@ EblSymbolTable ( ImageBase = (UINT32)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase; PeCoffSizeOfHeaders = PeCoffGetSizeOfHeaders ((VOID *)(UINTN)ImageBase); Pdb = PeCoffLoaderGetPdbPointer (DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase); - if (Elf) { - // ELF and Mach-O images don't include the header so the linked address does not include header - ImageBase += PeCoffSizeOfHeaders; - } - AsciiPrint (Format, Pdb, ImageBase); - AsciiPrint ("\n"); + if (Pdb != NULL) { + if (Elf) { + // ELF and Mach-O images don't include the header so the linked address does not include header + ImageBase += PeCoffSizeOfHeaders; + } + AsciiPrint (Format, Pdb, ImageBase); + AsciiPrint ("\n"); + } else { + } } } } @@ -151,7 +155,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED const EBL_COMMAND_TABLE mLibCmdTemplate[] = EblDisassembler }, { - "symboltable [\"format string\"] [TRUE]", + "symboltable [\"format string\"] [PECOFF]", " show symbol table commands for debugger", NULL, EblSymbolTable