aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/xmon/xmon.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-04-17 00:34:59 -0400
committerPaul Mackerras <paulus@samba.org>2008-04-18 01:37:18 -0400
commitec2b36b9f23cfbbe94d89724b796b44fd57d5221 (patch)
treee0768000b44ffecf44882cd1d13c8b27f34fe91f /arch/powerpc/xmon/xmon.c
parentf4ac7b5eb79ef15819c966b1f6b84bf443949123 (diff)
[POWERPC] Move stackframe definitions to common header
This moves various definitions used all over the place to parse stack frames to ptrace.h so only one definition is needed. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/xmon/xmon.c')
-rw-r--r--arch/powerpc/xmon/xmon.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 00fd7647f807..52c74780f403 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -1243,15 +1243,12 @@ static void get_function_bounds(unsigned long pc, unsigned long *startp,
1243 1243
1244static int xmon_depth_to_print = 64; 1244static int xmon_depth_to_print = 64;
1245 1245
1246#ifdef CONFIG_PPC64 1246#define LRSAVE_OFFSET (STACK_FRAME_LR_SAVE * sizeof(unsigned long))
1247#define LRSAVE_OFFSET 0x10 1247#define MARKER_OFFSET (STACK_FRAME_MARKER * sizeof(unsigned long))
1248#define REG_FRAME_MARKER 0x7265677368657265ul /* "regshere" */ 1248
1249#define MARKER_OFFSET 0x60 1249#ifdef __powerpc64__
1250#define REGS_OFFSET 0x70 1250#define REGS_OFFSET 0x70
1251#else 1251#else
1252#define LRSAVE_OFFSET 4
1253#define REG_FRAME_MARKER 0x72656773
1254#define MARKER_OFFSET 8
1255#define REGS_OFFSET 16 1252#define REGS_OFFSET 16
1256#endif 1253#endif
1257 1254
@@ -1317,7 +1314,7 @@ static void xmon_show_stack(unsigned long sp, unsigned long lr,
1317 /* Look for "regshere" marker to see if this is 1314 /* Look for "regshere" marker to see if this is
1318 an exception frame. */ 1315 an exception frame. */
1319 if (mread(sp + MARKER_OFFSET, &marker, sizeof(unsigned long)) 1316 if (mread(sp + MARKER_OFFSET, &marker, sizeof(unsigned long))
1320 && marker == REG_FRAME_MARKER) { 1317 && marker == STACK_FRAME_REGS_MARKER) {
1321 if (mread(sp + REGS_OFFSET, &regs, sizeof(regs)) 1318 if (mread(sp + REGS_OFFSET, &regs, sizeof(regs))
1322 != sizeof(regs)) { 1319 != sizeof(regs)) {
1323 printf("Couldn't read registers at %lx\n", 1320 printf("Couldn't read registers at %lx\n",