1 #include "unwind_i.h"
2
3 static const char *regname[] =
4 {
5 /* 0. */
6 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
7 /* 8. */
8 "r8", "r9", "r10", "fp", "ip", "sp", "lr", "pc",
9 /* 16. Obsolete FPA names. */
10 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
11 /* 24. */
12 0, 0, 0, 0, 0, 0, 0, 0,
13 /* 32. */
14 0, 0, 0, 0, 0, 0, 0, 0,
15 /* 40. */
16 0, 0, 0, 0, 0, 0, 0, 0,
17 /* 48. */
18 0, 0, 0, 0, 0, 0, 0, 0,
19 /* 56. */
20 0, 0, 0, 0, 0, 0, 0, 0,
21 /* 64. */
22 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
23 /* 72. */
24 "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15",
25 /* 80. */
26 "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23",
27 /* 88. */
28 "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31",
29 /* 96. */
30 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
31 /* 104. */
32 "wCGR0", "wCGR1", "wCGR2", "wCGR3", "wCGR4", "wCGR5", "wCGR6", "wCGR7",
33 /* 112. */
34 "wR0", "wR1", "wR2", "wR3", "wR4", "wR5", "wR6", "wR7",
35 /* 128. */
36 "spsr", "spsr_fiq", "spsr_irq", "spsr_abt", "spsr_und", "spsr_svc", 0, 0,
37 /* 136. */
38 0, 0, 0, 0, 0, 0, 0, 0,
39 /* 144. */
40 "r8_usr", "r9_usr", "r10_usr", "r11_usr", "r12_usr", "r13_usr", "r14_usr",
41 /* 151. */
42 "r8_fiq", "r9_fiq", "r10_fiq", "r11_fiq", "r12_fiq", "r13_fiq", "r14_fiq",
43 /* 158. */
44 "r13_irq", "r14_irq",
45 /* 160. */
46 "r13_abt", "r14_abt",
47 /* 162. */
48 "r13_und", "r14_und",
49 /* 164. */
50 "r13_svc", "r14_svc", 0, 0,
51 /* 168. */
52 0, 0, 0, 0, 0, 0, 0, 0,
53 /* 176. */
54 0, 0, 0, 0, 0, 0, 0, 0,
55 /* 184. */
56 0, 0, 0, 0, 0, 0, 0, 0,
57 /* 192. */
58 "wC0", "wC1", "wC2", "wC3", "wC4", "wC5", "wC6", "wC7",
59 /* 200. */
60 0, 0, 0, 0, 0, 0, 0, 0,
61 /* 208. */
62 0, 0, 0, 0, 0, 0, 0, 0,
63 /* 216. */
64 0, 0, 0, 0, 0, 0, 0, 0,
65 /* 224. */
66 0, 0, 0, 0, 0, 0, 0, 0,
67 /* 232. */
68 0, 0, 0, 0, 0, 0, 0, 0,
69 /* 240. */
70 0, 0, 0, 0, 0, 0, 0, 0,
71 /* 248. */
72 0, 0, 0, 0, 0, 0, 0, 0,
73 /* 256. */
74 "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7",
75 /* 264. */
76 "d8", "d9", "d10", "d11", "d12", "d13", "d14", "d15",
77 /* 272. */
78 "d16", "d17", "d18", "d19", "d20", "d21", "d22", "d23",
79 /* 280. */
80 "d24", "d25", "d26", "d27", "d28", "d29", "d30", "d31",
81 };
82
83 const char *
unw_regname(unw_regnum_t reg)84 unw_regname (unw_regnum_t reg)
85 {
86 if (reg < (unw_regnum_t) ARRAY_SIZE (regname))
87 return regname[reg];
88 else
89 return "???";
90 }
91