mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-17 13:47:37 +01: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:
parent
93f319466f
commit
e360c3ddbd
5 changed files with 16 additions and 4 deletions
|
@ -55,6 +55,9 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
|
||||||
loc = c->dwarf.loc[reg];
|
loc = c->dwarf.loc[reg];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case UNW_AARCH64_PC:
|
||||||
|
if (write)
|
||||||
|
c->dwarf.ip = *valp; /* update the IP cache */
|
||||||
case UNW_AARCH64_X4:
|
case UNW_AARCH64_X4:
|
||||||
case UNW_AARCH64_X5:
|
case UNW_AARCH64_X5:
|
||||||
case UNW_AARCH64_X6:
|
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_X28:
|
||||||
case UNW_AARCH64_X29:
|
case UNW_AARCH64_X29:
|
||||||
case UNW_AARCH64_X30:
|
case UNW_AARCH64_X30:
|
||||||
case UNW_AARCH64_PC:
|
|
||||||
case UNW_AARCH64_PSTATE:
|
case UNW_AARCH64_PSTATE:
|
||||||
loc = c->dwarf.loc[reg];
|
loc = c->dwarf.loc[reg];
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -32,6 +32,9 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
|
||||||
|
|
||||||
switch (reg)
|
switch (reg)
|
||||||
{
|
{
|
||||||
|
case UNW_ARM_R15:
|
||||||
|
if (write)
|
||||||
|
c->dwarf.ip = *valp; /* update the IP cache */
|
||||||
case UNW_ARM_R0:
|
case UNW_ARM_R0:
|
||||||
case UNW_ARM_R1:
|
case UNW_ARM_R1:
|
||||||
case UNW_ARM_R2:
|
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_R11:
|
||||||
case UNW_ARM_R12:
|
case UNW_ARM_R12:
|
||||||
case UNW_ARM_R14:
|
case UNW_ARM_R14:
|
||||||
case UNW_ARM_R15:
|
|
||||||
loc = c->dwarf.loc[reg - UNW_ARM_R0];
|
loc = c->dwarf.loc[reg - UNW_ARM_R0];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,8 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UNW_MIPS_PC:
|
case UNW_MIPS_PC:
|
||||||
|
if (write)
|
||||||
|
c->dwarf.ip = *valp; /* update the IP cache */
|
||||||
loc = c->dwarf.loc[reg];
|
loc = c->dwarf.loc[reg];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,9 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
|
||||||
|
|
||||||
switch (reg)
|
switch (reg)
|
||||||
{
|
{
|
||||||
|
case UNW_SH_PC:
|
||||||
|
if (write)
|
||||||
|
c->dwarf.ip = *valp; /* update the IP cache */
|
||||||
case UNW_SH_R0:
|
case UNW_SH_R0:
|
||||||
case UNW_SH_R1:
|
case UNW_SH_R1:
|
||||||
case UNW_SH_R2:
|
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_R12:
|
||||||
case UNW_SH_R13:
|
case UNW_SH_R13:
|
||||||
case UNW_SH_R14:
|
case UNW_SH_R14:
|
||||||
case UNW_SH_PC:
|
|
||||||
case UNW_SH_PR:
|
case UNW_SH_PR:
|
||||||
loc = c->dwarf.loc[reg];
|
loc = c->dwarf.loc[reg];
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -52,7 +52,11 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (write)
|
if (write)
|
||||||
|
{
|
||||||
|
if (reg == UNW_TILEGX_PC)
|
||||||
|
c->dwarf.ip = *valp; /* update the IP cache */
|
||||||
return dwarf_put (&c->dwarf, loc, *valp);
|
return dwarf_put (&c->dwarf, loc, *valp);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return dwarf_get (&c->dwarf, loc, valp);
|
return dwarf_get (&c->dwarf, loc, valp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue