public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add ptrace support for NOMMU debugging
@ 2009-05-08 14:50 Peter Griffin
  2009-05-08 18:28 ` Mike Frysinger
  2009-05-12  8:38 ` Peter Griffin
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Griffin @ 2009-05-08 14:50 UTC (permalink / raw)
  To: linux-sh

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


Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
---
 arch/sh/kernel/ptrace_32.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

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);
-- 
1.5.6.3




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add ptrace support for NOMMU debugging
  2009-05-08 14:50 [PATCH] Add ptrace support for NOMMU debugging Peter Griffin
@ 2009-05-08 18:28 ` Mike Frysinger
  2009-05-12  8:38 ` Peter Griffin
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2009-05-08 18:28 UTC (permalink / raw)
  To: linux-sh

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add ptrace support for NOMMU debugging
  2009-05-08 14:50 [PATCH] Add ptrace support for NOMMU debugging Peter Griffin
  2009-05-08 18:28 ` Mike Frysinger
@ 2009-05-12  8:38 ` Peter Griffin
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Griffin @ 2009-05-12  8:38 UTC (permalink / raw)
  To: linux-sh

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-12  8:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-08 14:50 [PATCH] Add ptrace support for NOMMU debugging Peter Griffin
2009-05-08 18:28 ` Mike Frysinger
2009-05-12  8:38 ` Peter Griffin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox