Message ID | 1241794254.16311.32.camel@quercus-bis (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Friday 08 May 2009 10:50:54 Peter Griffin wrote: > >From 2652ec6503dbe78e5bf371b77544e168166aa57d Mon Sep 17 00:00:00 2001 > > From: Peter Griffin <pgriffin@mpc-data.co.uk> > Date: Fri, 8 May 2009 15:01:21 +0100 > Subject: [PATCH] Add ptrace support for NOMMU debugging are you not using git-send-email ? posting the actual file produced by git- format-patch looks weird (not sure if git-am works with this). > + else if ( addr == PT_TEXT_ADDR) > + tmp = child->mm->start_code; > + else if ( addr == PT_DATA_ADDR) > + tmp = child->mm->start_data; > + else if ( addr == PT_TEXT_END_ADDR ) > + tmp = child->mm->end_code; > + else if ( addr == PT_TEXT_LEN ) > + tmp = child->mm->end_code - child->mm->start_code; style wrong: no space inside of those parenthesis -mike
On Fri, 2009-05-08 at 14:28 -0400, Mike Frysinger wrote: > On Friday 08 May 2009 10:50:54 Peter Griffin wrote: > > >From 2652ec6503dbe78e5bf371b77544e168166aa57d Mon Sep 17 00:00:00 2001 > > > > From: Peter Griffin <pgriffin@mpc-data.co.uk> > > Date: Fri, 8 May 2009 15:01:21 +0100 > > Subject: [PATCH] Add ptrace support for NOMMU debugging > > are you not using git-send-email ? posting the actual file produced by git- > format-patch looks weird (not sure if git-am works with this). Hi Mike, I was using git-format-patch to generate the patches, and then evolution in 'pre-format' mode to insert the patch file and send the email. I've not used git-send-email before, but I just installed it on my system and it looks really good. I especially like the look of the --signed-off-by-cc option :-) > > + else if ( addr == PT_TEXT_ADDR) > > + tmp = child->mm->start_code; > > + else if ( addr == PT_DATA_ADDR) > > + tmp = child->mm->start_data; > > + else if ( addr == PT_TEXT_END_ADDR ) > > + tmp = child->mm->end_code; > > + else if ( addr == PT_TEXT_LEN ) > > + tmp = child->mm->end_code - child->mm->start_code; > > style wrong: no space inside of those parenthesis > -mike Noted, thanks for pointing it out. Paul fixed this for me when committing. regards, Peter. -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c index f7b22dd..28aa86f 100644 --- a/arch/sh/kernel/ptrace_32.c +++ b/arch/sh/kernel/ptrace_32.c @@ -33,6 +33,7 @@ #include <asm/mmu_context.h> #include <asm/syscalls.h> #include <asm/fpu.h> +#include <asm/asm-offsets.h> /* * This routine will get a word off of the process kernel stack. @@ -334,6 +335,14 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) [(addr - (long)&dummy->fpu) >> 2]; } else if (addr == (long) &dummy->u_fpvalid) tmp = !!tsk_used_math(child); + else if ( addr == PT_TEXT_ADDR) + tmp = child->mm->start_code; + else if ( addr == PT_DATA_ADDR) + tmp = child->mm->start_data; + else if ( addr == PT_TEXT_END_ADDR ) + tmp = child->mm->end_code; + else if ( addr == PT_TEXT_LEN ) + tmp = child->mm->end_code - child->mm->start_code; else tmp = 0; ret = put_user(tmp, datap);