From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: systemtap@sourceware.org
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH 3/8] stack-ppc: Adjust for ppc32
Date: Sat, 28 Nov 2009 01:33:42 +0300 [thread overview]
Message-ID: <20091127223342.GC21805@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <20091127223251.GA17065@oksana.dev.rtsoft.ru>
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>
---
runtime/stack-ppc.c | 4 ++--
runtime/stack.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/runtime/stack-ppc.c b/runtime/stack-ppc.c
index 3267194..df2db15 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) {
diff --git a/runtime/stack.c b/runtime/stack.c
index ae89995..25dbdbb 100644
--- a/runtime/stack.c
+++ b/runtime/stack.c
@@ -40,7 +40,7 @@ static void _stp_stack_print_fallback(unsigned long, int, int);
#include "stack-ia64.c"
#elif defined (__i386__)
#include "stack-i386.c"
-#elif defined (__powerpc64__)
+#elif defined (__powerpc__)
#include "stack-ppc.c"
#elif defined (__arm__)
#include "stack-arm.c"
--
1.6.3.3
next prev parent reply other threads:[~2009-11-27 22:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-27 22:32 [PATCH 0/8 userland!] systemtap: Add initial support for ppc32 Anton Vorontsov
2009-11-27 22:33 ` [PATCH 1/8] Rename uprobes_ppc64.c to uprobes_ppc.c, use it " Anton Vorontsov
2009-11-27 22:33 ` [PATCH 2/8] Rename stack-ppc64.c to stack-ppc.c Anton Vorontsov
2009-11-27 22:33 ` Anton Vorontsov [this message]
2009-11-27 22:33 ` [PATCH 4/8] Implement ppc32 variant of __is_user_regs Anton Vorontsov
2009-11-27 22:33 ` [PATCH 5/8] Share ppc64 and ppc32 code where possible Anton Vorontsov
2009-11-27 22:33 ` [PATCH 6/8] Use proper types for do_div Anton Vorontsov
2009-12-09 15:56 ` Mark Wielaard
2009-12-09 16:09 ` Anton Vorontsov
2009-12-09 22:47 ` Mark Wielaard
2009-11-27 22:33 ` [PATCH 7/8] Implement _div64 and _mod64 for ppc32 Anton Vorontsov
2009-11-27 22:33 ` [PATCH 8/8] Change KERNEL_RELOC_SYMBOL to "_stext" on ppc32 Anton Vorontsov
2009-12-01 17:54 ` [PATCH 0/8 userland!] systemtap: Add initial support for ppc32 Frank Ch. Eigler
2009-12-01 19:13 ` Jim Keniston
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091127223342.GC21805@oksana.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.