Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227284
b: refs/heads/master
c: f602be6
h: refs/heads/master
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Jan 5, 2011
1 parent 1c200e6 commit 4c751a7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4cc9bed034d1ae588e5b773ee0edeb74ef3c0ff4
refs/heads/master: f602be639e97024a77062368e123008c94b3109a
4 changes: 4 additions & 0 deletions trunk/tools/perf/arch/s390/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ifndef NO_DWARF
PERF_HAVE_DWARF_REGS := 1
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o
endif
22 changes: 22 additions & 0 deletions trunk/tools/perf/arch/s390/util/dwarf-regs.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Mapping of DWARF debug register numbers into register names.
*
* Copyright IBM Corp. 2010
* Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>,
*
*/

#include <libio.h>
#include <dwarf-regs.h>

#define NUM_GPRS 16

static const char *gpr_names[NUM_GPRS] = {
"%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7",
"%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15",
};

const char *get_arch_regstr(unsigned int n)
{
return (n >= NUM_GPRS) ? NULL : gpr_names[n];
}

0 comments on commit 4c751a7

Please sign in to comment.