Teach the LLVM-derived unwinder about the alternate DWARF pseudo-register

that GCC defines for the PC / return address.  This is simply an alias for
the same internal PC register number.
This commit is contained in:
thorpej 2021-11-21 23:34:44 +00:00
parent f8ce691891
commit a2dfa8a4c3
1 changed files with 4 additions and 1 deletions

View File

@ -561,6 +561,9 @@ enum {
DWARF_M68K_FP0 = 16,
DWARF_M68K_FP7 = 23,
DWARF_M68K_PC = 24,
// DWARF pseudo-register that is an alternate that may be used
// for the return address.
DWARF_M68K_ALT_PC = 25,
REGNO_M68K_A0 = 0,
REGNO_M68K_A7 = 7,
@ -589,7 +592,7 @@ public:
return REGNO_M68K_D0 + (num - DWARF_M68K_D0);
if (num >= DWARF_M68K_FP0 && num <= DWARF_M68K_FP7)
return REGNO_M68K_FP0 + (num - DWARF_M68K_FP0);
if (num == DWARF_M68K_PC)
if (num == DWARF_M68K_PC || num == DWARF_M68K_ALT_PC)
return REGNO_M68K_PC;
return LAST_REGISTER + 1;
}