aboutsummaryrefslogtreecommitdiffstats
path: root/main/libunwind/musl-mips-fix.patch
blob: 4835513d2a61e9c58534c3d3c4211747e2b5b73c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
--- a/src/coredump/_UCD_access_reg_linux.c
+++ b/src/coredump/_UCD_access_reg_linux.c
@@ -55,36 +55,36 @@
 #if defined(UNW_TARGET_MIPS)
   static const uint8_t remap_regs[] =
     {
-      [UNW_MIPS_R0]  = EF_REG0,
-      [UNW_MIPS_R1]  = EF_REG1,
-      [UNW_MIPS_R2]  = EF_REG2,
-      [UNW_MIPS_R3]  = EF_REG3,
-      [UNW_MIPS_R4]  = EF_REG4,
-      [UNW_MIPS_R5]  = EF_REG5,
-      [UNW_MIPS_R6]  = EF_REG6,
-      [UNW_MIPS_R7]  = EF_REG7,
-      [UNW_MIPS_R8]  = EF_REG8,
-      [UNW_MIPS_R9]  = EF_REG9,
-      [UNW_MIPS_R10] = EF_REG10,
-      [UNW_MIPS_R11] = EF_REG11,
-      [UNW_MIPS_R12] = EF_REG12,
-      [UNW_MIPS_R13] = EF_REG13,
-      [UNW_MIPS_R14] = EF_REG14,
-      [UNW_MIPS_R15] = EF_REG15,
-      [UNW_MIPS_R16] = EF_REG16,
-      [UNW_MIPS_R17] = EF_REG17,
-      [UNW_MIPS_R18] = EF_REG18,
-      [UNW_MIPS_R19] = EF_REG19,
-      [UNW_MIPS_R20] = EF_REG20,
-      [UNW_MIPS_R21] = EF_REG21,
-      [UNW_MIPS_R22] = EF_REG22,
-      [UNW_MIPS_R23] = EF_REG23,
-      [UNW_MIPS_R24] = EF_REG24,
-      [UNW_MIPS_R25] = EF_REG25,
-      [UNW_MIPS_R28] = EF_REG28,
-      [UNW_MIPS_R29] = EF_REG29,
-      [UNW_MIPS_R30] = EF_REG30,
-      [UNW_MIPS_R31] = EF_REG31,
+      [UNW_MIPS_R0]  = EF_R0,
+      [UNW_MIPS_R1]  = EF_R1,
+      [UNW_MIPS_R2]  = EF_R2,
+      [UNW_MIPS_R3]  = EF_R3,
+      [UNW_MIPS_R4]  = EF_R4,
+      [UNW_MIPS_R5]  = EF_R5,
+      [UNW_MIPS_R6]  = EF_R6,
+      [UNW_MIPS_R7]  = EF_R7,
+      [UNW_MIPS_R8]  = EF_R8,
+      [UNW_MIPS_R9]  = EF_R9,
+      [UNW_MIPS_R10] = EF_R10,
+      [UNW_MIPS_R11] = EF_R11,
+      [UNW_MIPS_R12] = EF_R12,
+      [UNW_MIPS_R13] = EF_R13,
+      [UNW_MIPS_R14] = EF_R14,
+      [UNW_MIPS_R15] = EF_R15,
+      [UNW_MIPS_R16] = EF_R16,
+      [UNW_MIPS_R17] = EF_R17,
+      [UNW_MIPS_R18] = EF_R18,
+      [UNW_MIPS_R19] = EF_R19,
+      [UNW_MIPS_R20] = EF_R20,
+      [UNW_MIPS_R21] = EF_R21,
+      [UNW_MIPS_R22] = EF_R22,
+      [UNW_MIPS_R23] = EF_R23,
+      [UNW_MIPS_R24] = EF_R24,
+      [UNW_MIPS_R25] = EF_R25,
+      [UNW_MIPS_R28] = EF_R28,
+      [UNW_MIPS_R29] = EF_R29,
+      [UNW_MIPS_R30] = EF_R30,
+      [UNW_MIPS_R31] = EF_R31,
       [UNW_MIPS_PC]  = EF_CP0_EPC,
     };
 #elif defined(UNW_TARGET_X86)
--- a/src/coredump/_UCD_lib.h
+++ b/src/coredump/_UCD_lib.h
@@ -50,6 +50,7 @@
 #include <stdbool.h>
 #include <limits.h>
 #include <sys/param.h>
+#include <sys/reg.h>
 #include <pwd.h>
 #include <grp.h>
 #include <syslog.h>
--- a/src/mips/getcontext.S
+++ b/src/mips/getcontext.S
@@ -24,12 +24,11 @@
 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
 
 #include "offsets.h"
-#include <endian.h>
 
 	.text
 
 #if _MIPS_SIM == _ABIO32
-# if __BYTE_ORDER == __BIG_ENDIAN
+# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
 #  define OFFSET 4
 # else
 #  define OFFSET 0