From f3e699088b9d47ab0c4df2286ff14818a155ee46 Mon Sep 17 00:00:00 2001 From: andrewfish Date: Wed, 8 Sep 2010 17:58:18 +0000 Subject: [PATCH] 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 --- BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.c b/BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.c index ff5fb4f462..dca2bc74ac 100644 --- a/BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.c +++ b/BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.c @@ -39,7 +39,7 @@ Simple arm disassembler via a library Argv[0] - symboltable - Argv[1] - Optional qoted format string + Argv[1] - Optional quoted format string Argv[2] - Optional flag @param Argc Number of command arguments in Argv @@ -66,8 +66,18 @@ EblSymbolTable ( BOOLEAN Elf; // Need to add lots of error checking on the passed in string - // Default string is for RealView debugger - Format = (Argc > 1) ? Argv[1] : "load /a /ni /np %a &0x%x"; + // Default string is for RealView debugger or gdb depending on toolchain used. + 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; Status = EfiGetSystemConfigurationTable (&gEfiDebugImageInfoTableGuid, (VOID **)&DebugImageTableHeader); -- 2.39.2