special handling of CFA pseudo register since libunwind provides wron

value
This commit is contained in:
2020-05-02 13:56:39 +04:00
parent d1441b3b6f
commit f483155e07
+6
View File
@@ -70,6 +70,12 @@ pst_function* pst_function_next(pst_handler* handler, pst_function* current)
int pst_get_register(pst_function* fn, int regno, unw_word_t* val)
{
if(regno == UNW_X86_64_CFA) {
// intentionally return our own CFA obtained using libdw since libunwind returns wrong register value
*val = fn->info.cfa;
return 0;
}
return unw_get_reg(&fn->context, regno, val);
}