diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-11-28 01:33:42 +0300 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-12-01 11:57:32 -0500 |
commit | 51280c12d044b671b16ce59396658ac5a0f24650 (patch) | |
tree | 27c8036e3078b0e5ae9e09b05b1f01bad3e5876c /runtime/stack-ppc.c | |
parent | f5fd3c39dcec944feb8aa91808a8cb8d94dd1e04 (diff) | |
download | systemtap-steved-51280c12d044b671b16ce59396658ac5a0f24650.tar.gz systemtap-steved-51280c12d044b671b16ce59396658ac5a0f24650.tar.xz systemtap-steved-51280c12d044b671b16ce59396658ac5a0f24650.zip |
stack-ppc: Adjust for ppc32
Get rid of magic numbers, use appropriate defines from ptrace.h.
From now on stack-ppc.c should be suitable for ppc32.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Diffstat (limited to 'runtime/stack-ppc.c')
-rw-r--r-- | runtime/stack-ppc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/stack-ppc.c b/runtime/stack-ppc.c index 3267194e..df2db15d 100644 --- a/runtime/stack-ppc.c +++ b/runtime/stack-ppc.c @@ -21,7 +21,7 @@ static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels, return; _sp = (unsigned long *) sp; newsp = _sp[0]; - ip = _sp[2]; + ip = _sp[STACK_FRAME_LR_SAVE]; if (!firstframe || ip != lr) { if (verbose) { _stp_printf("[0x%016lx] [0x%016lx] ", sp, ip); @@ -38,7 +38,7 @@ static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels, * See if this is an exception frame. * We look for the "regshere" marker in the current frame. */ - if ( _sp[12] == 0x7265677368657265ul) { + if (_sp[STACK_FRAME_MARKER] == STACK_FRAME_REGS_MARKER) { struct pt_regs *regs = (struct pt_regs *) (sp + STACK_FRAME_OVERHEAD); if (verbose) { |