/**\r
Append string to debugger script file, create file if needed.\r
\r
- This library can show up in mulitple places so we need to append the file every time we write to it.\r
+ This library can show up in multiple places so we need to append the file every time we write to it.\r
For example Sec can use this to load the DXE core, and the DXE core would use this to load all the\r
other modules. So we have two instances of the library in the system.\r
\r
// This gets you all the symbols except for SEC. To get SEC symbols you need to copy the\r
// debug print in the SEC into the debugger manually\r
SemihostWriteString (Buffer);\r
-/*\r
- I'm currently having issues with this code crashing the debugger. Seems like it should work.\r
\r
- UINT32 SemihostHandle;\r
- UINT32 SemihostMode = SEMIHOST_FILE_MODE_WRITE | SEMIHOST_FILE_MODE_BINARY | SEMIHOST_FILE_MODE_UPDATE;\r
+ /*\r
+ I'm currently having issues with this code crashing the debugger. Seems like it should work.\r
\r
- SemihostFileOpen ("c:\rvi_symbols.inc", SemihostMode, &SemihostHandle);\r
- SemihostFileWrite (SemihostHandle, &Length, Buffer);\r
- SemihostFileClose (SemihostHandle);\r
- */\r
-}\r
+ UINT32 SemihostHandle;\r
+ UINT32 SemihostMode = SEMIHOST_FILE_MODE_WRITE | SEMIHOST_FILE_MODE_BINARY | SEMIHOST_FILE_MODE_UPDATE;\r
\r
+ SemihostFileOpen ("c:\rvi_symbols.inc", SemihostMode, &SemihostHandle);\r
+ SemihostFileWrite (SemihostHandle, &Length, Buffer);\r
+ SemihostFileClose (SemihostHandle);\r
+ */\r
+}\r
\r
/**\r
If the build is done on cygwin the paths are cygpaths.\r
**/\r
CHAR8 *\r
DeCygwinPathIfNeeded (\r
- IN CHAR8 *Name\r
+ IN CHAR8 *Name\r
)\r
{\r
- CHAR8 *Ptr;\r
- UINTN Index;\r
- UINTN Len;\r
+ CHAR8 *Ptr;\r
+ UINTN Index;\r
+ UINTN Len;\r
\r
Ptr = AsciiStrStr (Name, "/cygdrive/");\r
if (Ptr == NULL) {\r
// switch path separators\r
for (Index = 11; Index < Len; Index++) {\r
if (Ptr[Index] == '/') {\r
- Ptr[Index] = '\\' ;\r
+ Ptr[Index] = '\\';\r
}\r
}\r
\r
return Name;\r
}\r
\r
-\r
/**\r
Performs additional actions after a PE/COFF image has been loaded and relocated.\r
\r
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
)\r
{\r
- CHAR8 Buffer[256];\r
+ CHAR8 Buffer[256];\r
\r
-#if (__ARMCC_VERSION < 500000)\r
- AsciiSPrint (Buffer, sizeof(Buffer), "load /a /ni /np \"%a\" &0x%08x\n", ImageContext->PdbPointer, (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders));\r
-#else\r
- AsciiSPrint (Buffer, sizeof(Buffer), "add-symbol-file %a 0x%08x\n", ImageContext->PdbPointer, (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders));\r
-#endif\r
+ #if (__ARMCC_VERSION < 500000)\r
+ AsciiSPrint (Buffer, sizeof (Buffer), "load /a /ni /np \"%a\" &0x%08x\n", ImageContext->PdbPointer, (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders));\r
+ #else\r
+ AsciiSPrint (Buffer, sizeof (Buffer), "add-symbol-file %a 0x%08x\n", ImageContext->PdbPointer, (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders));\r
+ #endif\r
DeCygwinPathIfNeeded (&Buffer[16]);\r
\r
WriteStringToFile (Buffer, AsciiStrSize (Buffer));\r
}\r
\r
-\r
-\r
/**\r
Performs additional actions just before a PE/COFF image is unloaded. Any resources\r
that were allocated by PeCoffLoaderRelocateImageExtraAction() must be freed.\r
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
)\r
{\r
- CHAR8 Buffer[256];\r
+ CHAR8 Buffer[256];\r
\r
- AsciiSPrint (Buffer, sizeof(Buffer), "unload symbols_only \"%a\"\n", ImageContext->PdbPointer);\r
+ AsciiSPrint (Buffer, sizeof (Buffer), "unload symbols_only \"%a\"\n", ImageContext->PdbPointer);\r
DeCygwinPathIfNeeded (Buffer);\r
\r
WriteStringToFile (Buffer, AsciiStrSize (Buffer));\r