summaryrefslogtreecommitdiff
path: root/src/hppa/regname.c
diff options
context:
space:
mode:
authorDavid Mosberger-Tang <davidm@koala.localdomain>2006-07-26 14:53:49 -0600
committerDavid Mosberger-Tang <davidm@koala.localdomain>2006-07-26 14:53:49 -0600
commit6daeeac60ac046af9487dadd5a6b38fce0ea8219 (patch)
treefec3e63b692fdf40b2d9ae61d4c89d2db39cb9df /src/hppa/regname.c
parenta369768c279654ae247643f81e0d2f6f7ddd4d15 (diff)
downloadlibunwind-6daeeac60ac046af9487dadd5a6b38fce0ea8219.tar.gz
Revert "Initial revision"
This reverts e6446885f44866668ba7c5649c09386876e92a57 commit.
Diffstat (limited to 'src/hppa/regname.c')
-rw-r--r--src/hppa/regname.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/hppa/regname.c b/src/hppa/regname.c
index e69de29b..07cae8ed 100644
--- a/src/hppa/regname.c
+++ b/src/hppa/regname.c
@@ -0,0 +1,50 @@
+/* libunwind - a platform-independent unwind library
+ Copyright (c) 2004-2005 Hewlett-Packard Development Company, L.P.
+ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
+
+This file is part of libunwind.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+
+#include "unwind_i.h"
+
+static const char *regname[] =
+ {
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
+ "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
+ "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7",
+ "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15",
+ "fr16", "fr17", "fr18", "fr19", "fr20", "fr21", "fr22", "fr23",
+ "fr24", "fr25", "fr26", "fr27", "fr28", "fr29", "fr30", "fr31",
+ "ip",
+ "eh0", "eh1", "eh2", "eh3",
+ "cfa"
+ };
+
+PROTECTED const char *
+unw_regname (unw_regnum_t reg)
+{
+ if (reg < (unw_regnum_t) ARRAY_SIZE (regname))
+ return regname[reg];
+ else
+ return "???";
+}