lkml.org 
[lkml]   [2011]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Kgdb-bugreport] [PATCH] kgdbts: only use new asm-generic/ptrace.h api when needed
Hello.

On 28-05-2011 18:04, Mike Frysinger wrote:

> The new instruction_pointer_set helper is defined for people who have
> converted to asm-generic/ptrace.h, so don't use it generally unless
> the arch needs it (in which case it has been converted). This should
> fix building of kgdb tests for arches not yet converted.

> Signed-off-by: Mike Frysinger<vapier@gentoo.org>
> ---
> drivers/misc/kgdbts.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)

> diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
> index b0c5631..8cebec5 100644
> --- a/drivers/misc/kgdbts.c
> +++ b/drivers/misc/kgdbts.c
> @@ -304,7 +304,10 @@ static int check_and_rewind_pc(char *put_str, char *arg)
> return 1;
> }
> /* Readjust the instruction pointer if needed */
> - instruction_pointer_set(&kgdbts_regs, ip + offset);
> + ip += offset;

Since 'íp' is local, incrementing it is pointless here unless you have
GDB_ADJUSTS_BREAK_OFFSET defined. Why not keep instruction_pointer_set() call
as is?

> +#ifdef GDB_ADJUSTS_BREAK_OFFSET
> + instruction_pointer_set(&kgdbts_regs, ip);
> +#endif
> return 0;
> }
>

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-05-30 11:55    [W:0.237 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site