Module Name:    src
Committed By:   thorpej
Date:           Sun Nov 21 23:34:44 UTC 2021

Modified Files:
        src/sys/lib/libunwind: Registers.hpp

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/lib/libunwind/Registers.hpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libunwind/Registers.hpp
diff -u src/sys/lib/libunwind/Registers.hpp:1.33 src/sys/lib/libunwind/Registers.hpp:1.34
--- src/sys/lib/libunwind/Registers.hpp:1.33	Sun Nov 21 21:15:17 2021
+++ src/sys/lib/libunwind/Registers.hpp	Sun Nov 21 23:34:44 2021
@@ -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;
   }

Reply via email to