- 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
+ DEBUG ((EFI_D_ERROR, "PC 0x%012lx (0x%012lx+0x%08x) [ 0] %a\n",\r
+ SystemContext.SystemContextAArch64->ELR, ImageBase,\r
+ SystemContext.SystemContextAArch64->ELR - ImageBase, BaseName (Pdb)));\r
+\r
+ if ((UINT64 *)SystemContext.SystemContextAArch64->FP != 0) {\r
+ Idx = 0;\r
+\r
+ RootFp[0] = ((UINT64 *)SystemContext.SystemContextAArch64->FP)[0];\r
+ RootFp[1] = ((UINT64 *)SystemContext.SystemContextAArch64->FP)[1];\r
+ if (RootFp[1] != SystemContext.SystemContextAArch64->LR) {\r
+ RootFp[0] = SystemContext.SystemContextAArch64->FP;\r
+ RootFp[1] = SystemContext.SystemContextAArch64->LR;\r
+ }\r
+ for (Fp = RootFp; Fp[0] != 0; Fp = (UINT64 *)Fp[0]) {\r
+ Pdb = GetImageName (Fp[1], &ImageBase, &PeCoffSizeOfHeader);\r
+ if (Pdb != NULL) {\r
+ if (Pdb != PrevPdb) {\r
+ Idx++;\r
+ PrevPdb = Pdb;\r
+ }\r
+ DEBUG ((EFI_D_ERROR, "PC 0x%012lx (0x%012lx+0x%08x) [% 2d] %a\n",\r
+ Fp[1], ImageBase, Fp[1] - ImageBase, Idx, BaseName (Pdb)));\r
+ }\r