Thread (51 messages) 51 messages, 4 authors, 2011-08-17

Re: [PATCH 17/24] C6X: ptrace support

From: Arnd Bergmann <arnd@arndb.de>
Date: 2011-08-09 16:58:52

On Monday 08 August 2011, Mark Salter wrote:
+ * Perform ptrace request
+ */
+long arch_ptrace(struct task_struct *child, long request,
+		 unsigned long addr, unsigned long data)
+{
+	unsigned long __user *datap = (unsigned long __user *) data;
+	int ret = 0;
+
+	switch (request) {
+	case PTRACE_PEEKUSR:
+		ret = ptrace_read_user(child, addr,
+				       (unsigned long __user *) data);
+		break;
+
+		/*
+		 * write the word at location addr in the user registers.
+		 */
+	case PTRACE_POKEUSR:
+		ret = -EIO;
+		if (addr & 3 || addr < 0 || addr >= PT_REG_SIZE)
+			break;
+
+		ret = put_reg(child, (int)addr >> 2, data);
+		break;
I believe you no longer need to provide PTRACE_PEEKUSR/PTRACE_POKEUSR
when you have regset support for all your GPRs.

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help