Update example symbol command to dump out gdb load commands if you compile with gcc or RVCT commands if you compile with other compilers.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10859 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
andrewfish 2010-09-08 17:58:18 +00:00
parent 7e4ed4b8c7
commit f3e699088b
1 changed files with 13 additions and 3 deletions

View File

@ -39,7 +39,7 @@
Simple arm disassembler via a library Simple arm disassembler via a library
Argv[0] - symboltable Argv[0] - symboltable
Argv[1] - Optional qoted format string Argv[1] - Optional quoted format string
Argv[2] - Optional flag Argv[2] - Optional flag
@param Argc Number of command arguments in Argv @param Argc Number of command arguments in Argv
@ -66,8 +66,18 @@ EblSymbolTable (
BOOLEAN Elf; BOOLEAN Elf;
// Need to add lots of error checking on the passed in string // Need to add lots of error checking on the passed in string
// Default string is for RealView debugger // Default string is for RealView debugger or gdb depending on toolchain used.
Format = (Argc > 1) ? Argv[1] : "load /a /ni /np %a &0x%x"; if (Argc > 1) {
Format = Argv[1];
} else {
#if __GNUC__
// Assume gdb
Format = "add-symbol-file %a 0x%x";
#else
// Default to RVCT
Format = "load /a /ni /np %a &0x%x";
#endif
}
Elf = (Argc > 2) ? FALSE : TRUE; Elf = (Argc > 2) ? FALSE : TRUE;
Status = EfiGetSystemConfigurationTable (&gEfiDebugImageInfoTableGuid, (VOID **)&DebugImageTableHeader); Status = EfiGetSystemConfigurationTable (&gEfiDebugImageInfoTableGuid, (VOID **)&DebugImageTableHeader);