FreeBSD/aarch64: read the interrupted PC from uc_mcontext.mc_gpregs.gp_elr. Without it the CPU profiler fails to compile ("no member named 'Get'"). Upstream: https://github.com/gperftools/gperftools/issues/1362 --- a/src/getpc-inl.h +++ b/src/getpc-inl.h @@ -230,6 +230,18 @@ static void* Get(const U* uc) { // FreeBSD/x86_64 return (void*)(uc->uc_mcontext.mc_rip); + } +}; + +// FreeBSD/aarch64 +template +struct get_2e7fb68f : public P { +}; +template +struct get_2e7fb68fuc_mcontext.mc_gpregs.gp_elr)>> : public P { + static void* Get(const U* uc) { + // FreeBSD/aarch64 + return (void*)(uc->uc_mcontext.mc_gpregs.gp_elr); } }; @@ -360,8 +372,10 @@ using g_92fcd89a = get_92fcd89a; // OS X (i386, <=10.4) using g_880f83fe = get_880f83fe; + // FreeBSD/aarch64 + using g_2e7fb68f = get_2e7fb68f; // FreeBSD/x86_64 - using g_5bb1da03 = get_5bb1da03; + using g_5bb1da03 = get_5bb1da03; // FreeBSD/ppc using g_2812b129 = get_2812b129; // FreeBSD/i386