summaryrefslogtreecommitdiff
path: root/BeagleBoardPkg
diff options
context:
space:
mode:
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2010-09-08 17:58:18 +0000
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2010-09-08 17:58:18 +0000
commitf3e699088b9d47ab0c4df2286ff14818a155ee46 (patch)
tree174e4b7ca777245647a85db5c7b71280cc0714b6 /BeagleBoardPkg
parent7e4ed4b8c73f78f1893b3240b992d2b6e969bb6c (diff)
downloadedk2-platforms-f3e699088b9d47ab0c4df2286ff14818a155ee46.tar.xz
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
Diffstat (limited to 'BeagleBoardPkg')
-rw-r--r--BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.c16
1 files 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);