1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-12-23 20:03:43 +01:00

(tdep_access_reg): If c->dwarf.cfa_is_sp is set, treat UNW_X86_64_RSP

as a read-only alias of CFA.

(Logical change 1.253)
This commit is contained in:
homeip.net!davidm 2004-08-20 11:23:15 +00:00
parent 9034bd158a
commit be2bed2712
2 changed files with 20 additions and 2 deletions

View file

@ -156,7 +156,16 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
case UNW_X86_ECX: loc = c->dwarf.loc[ECX]; break;
case UNW_X86_EDX: loc = c->dwarf.loc[EDX]; break;
case UNW_X86_EBX: loc = c->dwarf.loc[EBX]; break;
case UNW_X86_ESP: loc = c->dwarf.loc[ESP]; break;
case UNW_X86_ESP:
if (c->dwarf.cfa_is_sp)
{
if (write)
return -UNW_EREADONLYREG;
*valp = c->dwarf.cfa;
return 0;
}
loc = c->dwarf.loc[ESP];
break;
case UNW_X86_EBP: loc = c->dwarf.loc[EBP]; break;
case UNW_X86_ESI: loc = c->dwarf.loc[ESI]; break;
case UNW_X86_EDI: loc = c->dwarf.loc[EDI]; break;

View file

@ -82,7 +82,16 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
case UNW_X86_64_RCX: loc = c->dwarf.loc[RCX]; break;
case UNW_X86_64_RDX: loc = c->dwarf.loc[RDX]; break;
case UNW_X86_64_RBX: loc = c->dwarf.loc[RBX]; break;
case UNW_X86_64_RSP: loc = c->dwarf.loc[RSP]; break;
case UNW_X86_64_RSP:
if (c->dwarf.cfa_is_sp)
{
if (write)
return -UNW_EREADONLYREG;
*valp = c->dwarf.cfa;
return 0;
}
loc = c->dwarf.loc[RSP];
break;
case UNW_X86_64_RBP: loc = c->dwarf.loc[RBP]; break;
case UNW_X86_64_RSI: loc = c->dwarf.loc[RSI]; break;
case UNW_X86_64_RDI: loc = c->dwarf.loc[RDI]; break;