diff options
Diffstat (limited to 'gdb/alpha-tdep.c')
-rw-r--r-- | gdb/alpha-tdep.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index be53a84..0ec3add 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -261,6 +261,30 @@ push_sigtramp_desc (CORE_ADDR low_addr) } +char * +alpha_register_name (int regno) +{ + static char *register_names[] = + { + "v0", "t0", "t1", "t2", "t3", "t4", "t5", "t6", + "t7", "s0", "s1", "s2", "s3", "s4", "s5", "fp", + "a0", "a1", "a2", "a3", "a4", "a5", "t8", "t9", + "t10", "t11", "ra", "t12", "at", "gp", "sp", "zero", + "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", + "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", + "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", + "f24", "f25", "f26", "f27", "f28", "f29", "f30", "fpcr", + "pc", "vfp", + }; + + if (regno < 0) + return (NULL); + if (regno >= (sizeof(register_names) / sizeof(*register_names))) + return (NULL); + return (register_names[regno]); +} + + /* Guaranteed to set frame->saved_regs to some values (it never leaves it NULL). */ |