lkml.org 
[lkml]   [2013]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 57/76] ARC: kgdb support
On 01/18/2013 06:25 AM, Vineet Gupta wrote:
> From: Mischa Jonker <mjonker@synopsys.com>
>
> Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
> Cc: Jason Wessel <jason.wessel@windriver.com>

Acked-by: Jason Wessel <jason.wessel@windriver.com>

> ---
> arch/arc/Kconfig | 3 +-
> arch/arc/include/asm/kgdb.h | 61 +++++++++++++
> arch/arc/kernel/Makefile | 1 +
> arch/arc/kernel/kgdb.c | 205 +++++++++++++++++++++++++++++++++++++++++++
> arch/arc/kernel/traps.c | 6 ++
> 5 files changed, 275 insertions(+), 1 deletions(-)
> create mode 100644 arch/arc/include/asm/kgdb.h
> create mode 100644 arch/arc/kernel/kgdb.c
>
> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
> index d735de8..b954387 100644
> --- a/arch/arc/Kconfig
> +++ b/arch/arc/Kconfig
> @@ -23,6 +23,7 @@ config ARC
> select GENERIC_PENDING_IRQ if SMP
> select GENERIC_SIGALTSTACK
> select GENERIC_SMP_IDLE_THREAD
> + select HAVE_ARCH_KGDB
> select HAVE_ARCH_TRACEHOOK
> select HAVE_GENERIC_HARDIRQS
> select HAVE_KPROBES
> @@ -383,7 +384,7 @@ config ARC_DW2_UNWIND
>
> config ARC_DBG_TLB_PARANOIA
> bool "Paranoia Checks in Low Level TLB Handlers"
> - depends on ARC_DBG && !SMP
> + depends on ARC_DBG
> default n
>
> config ARC_DBG_TLB_MISS_COUNT
> diff --git a/arch/arc/include/asm/kgdb.h b/arch/arc/include/asm/kgdb.h
> new file mode 100644
> index 0000000..f3c4934
> --- /dev/null
> +++ b/arch/arc/include/asm/kgdb.h
> @@ -0,0 +1,61 @@
> +/*
> + * kgdb support for ARC
> + *
> + * Copyright (C) 2012 Synopsys, Inc. (www.synopsys.com)
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#ifndef __ARC_KGDB_H__
> +#define __ARC_KGDB_H__
> +
> +#ifdef CONFIG_KGDB
> +
> +#include <asm/user.h>
> +
> +/* to ensure compatibility with Linux 2.6.35, we don't implement the get/set
> + * register API yet */


I did think this note was slightly odd. Is this mainly because you have some kind of out of tree version of this code against an older kernel?

The main thing that you lose by not doing this the ability to display and set registers from the kdb shell.

From the pure gdb only end of things, gdb operates more efficiently for doing things like setting or reading the program counter, frame pointer or variable mapped registers when using a rs232 connection. There is no loss or gain in actual functionality by not implementing the individual get/set register method if you only intend to use gdb.

Cheers,
Jason.


\
 
 \ /
  Last update: 2013-01-18 14:43    [W:0.448 / U:3.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site