\r
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
Portions copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
\r
//\r
// Xcode does not support sourcing gdb scripts directly, so the Xcode XML\r
- // has a break point script to source the GdbRun script.\r
+ // has a break point script to source the GdbRun.sh script.\r
//\r
SecGdbConfigBreak ();\r
\r
}\r
\r
\r
+#ifdef __APPLE__\r
+__attribute__((noinline))\r
+#endif\r
VOID\r
SecGdbScriptBreak (\r
char *FileName,\r
\r
if (ImageContext->PdbPointer != NULL && !IsPdbFile (ImageContext->PdbPointer)) {\r
FILE *GdbTempFile;\r
- if (FeaturePcdGet (PcdEmulatorLazyLoadSymbols)) { \r
+ if (FeaturePcdGet (PcdEmulatorLazyLoadSymbols)) {\r
GdbTempFile = fopen (gGdbWorkingFileName, "a");\r
if (GdbTempFile != NULL) {\r
long unsigned int SymbolsAddr = (long unsigned int)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders);\r
GdbTempFile = fopen (gGdbWorkingFileName, "w");\r
if (GdbTempFile != NULL) {\r
fprintf (\r
- GdbTempFile, \r
- "add-symbol-file %s 0x%08lx\n", \r
- ImageContext->PdbPointer, \r
+ GdbTempFile,\r
+ "add-symbol-file %s 0x%08lx\n",\r
+ ImageContext->PdbPointer,\r
(long unsigned int)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)\r
);\r
fclose (GdbTempFile);\r
- \r
+\r
//\r
// Target for gdb breakpoint in a script that uses gGdbWorkingFileName to set a breakpoint.\r
// Hey what can you say scripting in gdb is not that great....\r
return;\r
}\r
\r
- if (FeaturePcdGet (PcdEmulatorLazyLoadSymbols)) { \r
+ if (FeaturePcdGet (PcdEmulatorLazyLoadSymbols)) {\r
//\r
// Write the file we need for the gdb script\r
//\r
SecGdbScriptBreak (ImageContext->PdbPointer, strlen (ImageContext->PdbPointer) + 1, 0, 0);\r
} else {\r
ASSERT (FALSE);\r
- } \r
+ }\r
}\r
}\r
\r