1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-30 21:21:45 +02:00

Better imitate the choice of which register to identify as ip

for tilegx.
This commit is contained in:
Doug Moore 2017-08-06 22:48:22 -05:00 committed by Dave Watson
parent e360c3ddbd
commit 6150f2f426

View file

@ -53,8 +53,14 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
if (write)
{
if (reg == UNW_TILEGX_PC)
c->dwarf.ip = *valp; /* update the IP cache */
if (ci->dwarf.use_prev_instr == 0) {
if (reg == UNW_TILEGX_PC)
c->dwarf.ip = *valp; /* update the IP cache */
}
else {
if (reg == UNW_TILEGX_R55)
c->dwarf.ip = *valp; /* update the IP cache */
}
return dwarf_put (&c->dwarf, loc, *valp);
}
else