1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-09-29 18:09:29 +02:00

For architectures that initialize the dwarf ip cache, but do not

update when the ip register is set, add those updates.
This commit is contained in:
Doug Moore 2017-08-06 15:35:43 -05:00 committed by Dave Watson
parent 93f319466f
commit e360c3ddbd
5 changed files with 16 additions and 4 deletions

View file

@ -55,6 +55,9 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
loc = c->dwarf.loc[reg];
break;
case UNW_AARCH64_PC:
if (write)
c->dwarf.ip = *valp; /* update the IP cache */
case UNW_AARCH64_X4:
case UNW_AARCH64_X5:
case UNW_AARCH64_X6:
@ -82,7 +85,6 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
case UNW_AARCH64_X28:
case UNW_AARCH64_X29:
case UNW_AARCH64_X30:
case UNW_AARCH64_PC:
case UNW_AARCH64_PSTATE:
loc = c->dwarf.loc[reg];
break;

View file

@ -32,6 +32,9 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
switch (reg)
{
case UNW_ARM_R15:
if (write)
c->dwarf.ip = *valp; /* update the IP cache */
case UNW_ARM_R0:
case UNW_ARM_R1:
case UNW_ARM_R2:
@ -46,7 +49,6 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
case UNW_ARM_R11:
case UNW_ARM_R12:
case UNW_ARM_R14:
case UNW_ARM_R15:
loc = c->dwarf.loc[reg - UNW_ARM_R0];
break;

View file

@ -70,6 +70,8 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
break;
case UNW_MIPS_PC:
if (write)
c->dwarf.ip = *valp; /* update the IP cache */
loc = c->dwarf.loc[reg];
break;

View file

@ -33,6 +33,9 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
switch (reg)
{
case UNW_SH_PC:
if (write)
c->dwarf.ip = *valp; /* update the IP cache */
case UNW_SH_R0:
case UNW_SH_R1:
case UNW_SH_R2:
@ -48,7 +51,6 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
case UNW_SH_R12:
case UNW_SH_R13:
case UNW_SH_R14:
case UNW_SH_PC:
case UNW_SH_PR:
loc = c->dwarf.loc[reg];
break;

View file

@ -52,7 +52,11 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
}
if (write)
return dwarf_put (&c->dwarf, loc, *valp);
{
if (reg == UNW_TILEGX_PC)
c->dwarf.ip = *valp; /* update the IP cache */
return dwarf_put (&c->dwarf, loc, *valp);
}
else
return dwarf_get (&c->dwarf, loc, valp);
}