1 #include "unwind_i.h"
2
3 static const char *regname[] =
4 {
5 "eax", "edx", "ecx", "ebx", "esi", "edi", "ebp", "esp", "eip",
6 "eflags", "trapno",
7 "st0", "st1", "st2", "st3", "st4", "st5", "st6", "st7",
8 "fcw", "fsw", "ftw", "fop", "fcs", "fip", "fea", "fds",
9 "xmm0_lo", "xmm0_hi", "xmm1_lo", "xmm1_hi",
10 "xmm2_lo", "xmm2_hi", "xmm3_lo", "xmm3_hi",
11 "xmm4_lo", "xmm4_hi", "xmm5_lo", "xmm5_hi",
12 "xmm6_lo", "xmm6_hi", "xmm7_lo", "xmm7_hi",
13 "mxcsr",
14 "gs", "fs", "es", "ds", "ss", "cs",
15 "tss", "ldt",
16 "cfi",
17 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7",
18 };
19
20 PROTECTED const char *
unw_regname(unw_regnum_t reg)21 unw_regname (unw_regnum_t reg)
22 {
23 if (reg < (unw_regnum_t) ARRAY_SIZE (regname))
24 return regname[reg];
25 else
26 return "???";
27 }
28