From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
Paul Mackerras <paulus@samba.org>,
Roland McGrath <roland@redhat.com>,
Srinivasa Ds <srinivasa@in.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/5] ptrace: powerpc: implement user_single_step_siginfo()
Date: Thu, 12 Nov 2009 18:38:48 +0100 [thread overview]
Message-ID: <20091112173848.GA12271@redhat.com> (raw)
Suggested by Roland.
Implement user_single_step_siginfo() for powerpc.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
---
arch/powerpc/include/asm/ptrace.h | 2 ++
arch/powerpc/kernel/traps.c | 9 +++++++++
2 files changed, 11 insertions(+)
--- TH/arch/powerpc/include/asm/ptrace.h~2_PPC_HELPER 2009-11-10 01:03:23.000000000 +0100
+++ TH/arch/powerpc/include/asm/ptrace.h 2009-11-10 21:48:53.000000000 +0100
@@ -140,6 +140,8 @@ extern void user_enable_single_step(stru
extern void user_enable_block_step(struct task_struct *);
extern void user_disable_single_step(struct task_struct *);
+#define ARCH_HAS_USER_SINGLE_STEP_INFO
+
#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */
--- TH/arch/powerpc/kernel/traps.c~2_PPC_HELPER 2009-11-10 01:06:41.000000000 +0100
+++ TH/arch/powerpc/kernel/traps.c 2009-11-10 21:52:45.000000000 +0100
@@ -174,6 +174,15 @@ int die(const char *str, struct pt_regs
return 0;
}
+void user_single_step_siginfo(struct task_struct *tsk,
+ struct pt_regs *regs, siginfo_t *info)
+{
+ memset(info, 0, sizeof(*info));
+ info->si_signo = SIGTRAP;
+ info->si_code = TRAP_TRACE;
+ info->si_addr = (void __user *)regs->nip;
+}
+
void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
{
siginfo_t info;
reply other threads:[~2009-11-12 17:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20091112173848.GA12271@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=roland@redhat.com \
--cc=srinivasa@in.ibm.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).