CHAR8 *Pdb;\r
UINTN ImageBase;\r
UINTN PeCoffSizeOfHeader;\r
+ UINT64 *Fp;\r
+\r
Pdb = GetImageName (SystemContext.SystemContextAArch64->ELR, &ImageBase, &PeCoffSizeOfHeader);\r
if (Pdb != NULL) {\r
DEBUG ((EFI_D_ERROR, "%a loaded at 0x%016lx \n", Pdb, ImageBase));\r
+\r
+ Pdb = GetImageName (SystemContext.SystemContextAArch64->LR, &ImageBase,\r
+ &PeCoffSizeOfHeader);\r
+ if (Pdb != NULL) {\r
+ DEBUG ((EFI_D_ERROR, "called from %a (0x%016lx) loaded at 0x%016lx \n",\r
+ Pdb, SystemContext.SystemContextAArch64->LR, ImageBase));\r
+ }\r
+ for (Fp = (UINT64 *)SystemContext.SystemContextAArch64->FP;\r
+ *Fp != 0;\r
+ Fp = (UINT64 *)Fp[0]) {\r
+ if (Fp[1] == SystemContext.SystemContextAArch64->LR) {\r
+ continue;\r
+ }\r
+ Pdb = GetImageName (Fp[1], &ImageBase, &PeCoffSizeOfHeader);\r
+ if (Pdb != NULL) {\r
+ DEBUG ((EFI_D_ERROR, "called from %a (0x%016lx) loaded at 0x%016lx \n",\r
+ Pdb, Fp[1], ImageBase));\r
+ }\r
+ }\r
}\r
DEBUG_CODE_END ();\r
\r