From: Jan Kiszka <jan.kiszka@web.de>
To: jason.wessel@windriver.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/8] kgdb: core API and gdb protocol handler
Date: Sat, 09 Feb 2008 15:27:02 +0100 [thread overview]
Message-ID: <47ADB836.9030404@web.de> (raw)
In-Reply-To: <1202564114-18587-2-git-send-email-jason.wessel@windriver.com>
[-- Attachment #1: Type: text/plain, Size: 2584 bytes --]
jason.wessel@windriver.com wrote:
> --- /dev/null
> +++ b/include/asm-generic/kgdb.h
> @@ -0,0 +1,105 @@
> +/*
> + * include/asm-generic/kgdb.h
> + *
> + * This provides the assembly level information so that KGDB can provide
> + * a GDB that has been patched with enough information to know to stop
> + * trying to unwind the function.
> + *
> + * Author: Tom Rini <trini@kernel.crashing.org>
> + *
> + * 2005 (c) MontaVista Software, Inc.
> + * 2006 (c) Embedded Alley Solutions, Inc.
> + *
> + * This file is licensed under the terms of the GNU General Public License
> + * version 2. This program is licensed "as is" without any warranty of any
> + * kind, whether express or implied.
> + */
> +
> +#ifndef __ASM_GENERIC_KGDB_H__
> +#define __ASM_GENERIC_KGDB_H__
> +
> +struct pt_regs;
> +
> +#ifdef CONFIG_X86
Hmm, I just realized that I didn't really looked at the arch interface
in details yet. Now it appears a bit inconsistent to me in its way to
tell "this arch supports that". Something in include/asm-generic that
starts with #ifdef CONFIG_X86 looks ugly, to begin with.
...
> +#ifdef CONFIG_KGDB_ARCH_HAS_SHADOW_INFO
Then we have this KGDB_ARCH_HAS thing here, the second way to control
arch-dependent stuff.
...
> --- /dev/null
> +++ b/include/linux/kgdb.h
...
> +struct kgdb_arch {
> + unsigned char gdb_bpt_instr[BREAK_INSTR_SIZE];
> + unsigned long flags;
> + unsigned shadowth;
> +
> + int (*set_breakpoint)(unsigned long, char *);
> + int (*remove_breakpoint)(unsigned long, char *);
> + int (*set_hw_breakpoint)(unsigned long, int, enum kgdb_bptype);
> + int (*remove_hw_breakpoint)(unsigned long, int, enum kgdb_bptype);
> + void (*remove_all_hw_break)(void);
> + void (*correct_hw_break)(void);
> +};
And this is the third way. Can we consolidate this?
...
> --- /dev/null
> +++ b/kernel/kgdb.c
...
> +/*
> + * Convert the memory pointed to by mem into hex, placing result in buf.
> + * Return a pointer to the last char put in buf (null). May return an error.
> + */
> +char *kgdb_mem2hex(char *mem, char *buf, int count)
As Linus remarked, still pointer-based return values while only the
error code is used by the callers (there are more of such cases in the
core).
...
> --- a/kernel/softlockup.c
> +++ b/kernel/softlockup.c
...
> @@ -52,7 +55,6 @@ static unsigned long get_timestamp(int this_cpu)
> void touch_softlockup_watchdog(void)
> {
> int this_cpu = raw_smp_processor_id();
> -
Probably some relic from older changes which should be killed.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
next prev parent reply other threads:[~2008-02-09 14:27 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-09 13:35 [PATCH 0/8] kgdb 2.6.25 version jason.wessel
2008-02-09 13:35 ` [PATCH 1/8] kgdb: core API and gdb protocol handler jason.wessel
2008-02-09 13:35 ` [PATCH 2/8] pid, kgdb: add pid_max prototype jason.wessel
2008-02-09 13:35 ` [PATCH 3/8] kgdb, modules: Always allow module sect info for KGDB jason.wessel
2008-02-09 13:35 ` [PATCH 4/8] kgdb: COPTIMIZE flag jason.wessel
2008-02-09 13:35 ` [PATCH 5/8] kgdb, x86: Add arch specfic kgdb support jason.wessel
2008-02-09 13:35 ` [PATCH 6/8] kgdb, sysrq_bugfix jason.wessel
2008-02-09 13:35 ` [PATCH][7/8] kgdb: exclusive use kgdb8250 uart I/O driver jason.wessel
2008-02-09 13:35 ` [PATCH 8/8] kgdb: kgdboc 8250 I/O module jason.wessel
2008-02-09 14:53 ` [PATCH][7/8] kgdb: exclusive use kgdb8250 uart I/O driver Jan Kiszka
2008-02-09 18:45 ` Jason Wessel
2008-02-09 16:40 ` Jan Kiszka
2008-02-09 18:41 ` Jason Wessel
2008-02-10 15:26 ` Pavel Machek
2008-02-09 14:33 ` [PATCH 5/8] kgdb, x86: Add arch specfic kgdb support Jan Kiszka
2008-02-09 17:16 ` [PATCH 4/8] kgdb: COPTIMIZE flag Christoph Hellwig
2008-02-09 17:15 ` [PATCH 3/8] kgdb, modules: Always allow module sect info for KGDB Christoph Hellwig
2008-02-09 17:10 ` [PATCH 2/8] pid, kgdb: add pid_max prototype Christoph Hellwig
2008-02-09 14:27 ` Jan Kiszka [this message]
2008-02-09 15:29 ` [PATCH 1/8] kgdb: core API and gdb protocol handler Sam Ravnborg
2008-02-09 17:27 ` Christoph Hellwig
2008-02-09 19:46 ` Ray Lee
2008-02-09 21:51 ` Ray Lee
2008-02-09 17:38 ` [PATCH 0/8] kgdb 2.6.25 version Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47ADB836.9030404@web.de \
--to=jan.kiszka@web.de \
--cc=jason.wessel@windriver.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.