diff mbox

Add in support for ptrace GDB defines

Message ID 1241794095.16311.28.camel@quercus-bis (mailing list archive)
State Accepted
Headers show

Commit Message

Peter Griffin May 8, 2009, 2:48 p.m. UTC
>From 74f64c22d2d3b0082cf96ed81fe2ccd02a352441 Mon Sep 17 00:00:00 2001
From: Kieran Bingham <kieranbingham@gmail.com>
Date: Mon, 2 Mar 2009 17:05:09 +0000
Subject: [PATCH] Add in support for ptrace GDB defines


Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
Signed-off-by: Peter Griffin <kieranbingham@gmail.com>
---
 arch/sh/include/asm/ptrace.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Comments

Paul Mundt May 8, 2009, 3:09 p.m. UTC | #1
On Fri, May 08, 2009 at 03:48:15PM +0100, Peter Griffin wrote:
> >From 74f64c22d2d3b0082cf96ed81fe2ccd02a352441 Mon Sep 17 00:00:00 2001
> From: Kieran Bingham <kieranbingham@gmail.com>
> Date: Mon, 2 Mar 2009 17:05:09 +0000
> Subject: [PATCH] Add in support for ptrace GDB defines
> 
> 
> Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
> Signed-off-by: Peter Griffin <kieranbingham@gmail.com>

Copy and paste error I suppose.

On Fri, May 08, 2009 at 03:49:50PM +0100, Peter Griffin wrote:
> >From 0eab785eda2d1c980da7ecd59acda9f50b25ac73 Mon Sep 17 00:00:00 2001
> From: Peter Griffin <pgriffin@mpc-data.co.uk>
> Date: Fri, 8 May 2009 14:55:48 +0100
> Subject: [PATCH] Fix UBC setup and registers for SH2A
> 
> 
> Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
> Signed-off-by: Peter Griffin <kieranbingham@gmail.com>

Likewise.

On Fri, May 08, 2009 at 03:50:54PM +0100, Peter Griffin wrote:
> 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.

This seems to have snuck in from somewhere else, as nothing uses it.

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

Some weird spacing here. Please run your patches through
scripts/checkpatch.pl before sending them to the list, it will complain
about these sorts of trivial things so I don't have to. :-)

Anyways, most of the issues were minor, so I just tidied those up by
hand. The series is now applied, thanks.
--
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
Peter Griffin May 8, 2009, 3:25 p.m. UTC | #2
On Sat, 2009-05-09 at 00:09 +0900, Paul Mundt wrote:
> On Fri, May 08, 2009 at 03:48:15PM +0100, Peter Griffin wrote:
> > >From 74f64c22d2d3b0082cf96ed81fe2ccd02a352441 Mon Sep 17 00:00:00 2001
> > From: Kieran Bingham <kieranbingham@gmail.com>
> > Date: Mon, 2 Mar 2009 17:05:09 +0000
> > Subject: [PATCH] Add in support for ptrace GDB defines
> > 
> > 
> > Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
> > Signed-off-by: Peter Griffin <kieranbingham@gmail.com>
> 
> Copy and paste error I suppose.
> 
> On Fri, May 08, 2009 at 03:49:50PM +0100, Peter Griffin wrote:
> > >From 0eab785eda2d1c980da7ecd59acda9f50b25ac73 Mon Sep 17 00:00:00 2001
> > From: Peter Griffin <pgriffin@mpc-data.co.uk>
> > Date: Fri, 8 May 2009 14:55:48 +0100
> > Subject: [PATCH] Fix UBC setup and registers for SH2A
> > 
> > 
> > Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
> > Signed-off-by: Peter Griffin <kieranbingham@gmail.com>
> 
> Likewise.
> 
> On Fri, May 08, 2009 at 03:50:54PM +0100, Peter Griffin wrote:
> > 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.
> 
> This seems to have snuck in from somewhere else, as nothing uses it.
> 
> > @@ -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);
> 
> Some weird spacing here. Please run your patches through
> scripts/checkpatch.pl before sending them to the list, it will complain
> about these sorts of trivial things so I don't have to. :-)
> 
> Anyways, most of the issues were minor, so I just tidied those up by
> hand. The series is now applied, thanks.
> 
Hi Paul,

Sorry about that, thanks for fixing it and applying.

Pete

--
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 mbox

Patch

diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h
index 68e20ff..1dc12cb 100644
--- a/arch/sh/include/asm/ptrace.h
+++ b/arch/sh/include/asm/ptrace.h
@@ -102,6 +102,11 @@  struct pt_dspregs {
 #define	PTRACE_GETDSPREGS	55	/* DSP registers */
 #define	PTRACE_SETDSPREGS	56
 
+#define PT_TEXT_END_ADDR 	240
+#define PT_TEXT_ADDR 		244	/* &(struct user)->start_code */
+#define PT_DATA_ADDR 		248	/* &(struct user)->start_data */
+#define PT_TEXT_LEN		252
+
 #ifdef __KERNEL__
 #include <asm/addrspace.h>