LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: jason.wessel@windriver.com
Cc: linux-kernel@vger.kernel.org, Jan Kiszka <jan.kiszka@web.de>,
Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 5/8] kgdb, x86: Add arch specfic kgdb support
Date: Sat, 09 Feb 2008 15:33:55 +0100 [thread overview]
Message-ID: <47ADB9D3.6070604@web.de> (raw)
In-Reply-To: <1202564114-18587-6-git-send-email-jason.wessel@windriver.com>
jason.wessel@windriver.com wrote:
> --- /dev/null
> +++ b/include/asm-x86/kgdb.h
> @@ -0,0 +1,79 @@
> +#ifdef __KERNEL__
> +#ifndef _ASM_KGDB_H_
> +#define _ASM_KGDB_H_
> +
> +/*
> + * Copyright (C) 2001-2004 Amit S. Kale
> + * Copyright (C) 2008 Wind River Systems, Inc.
> + */
> +
> +#include <asm-generic/kgdb.h>
> +
> +/*
> + * BUFMAX defines the maximum number of characters in inbound/outbound
> + * buffers at least NUMREGBYTES*2 are needed for register packets
> + * Longer buffer is needed to list all threads
> + */
> +#define BUFMAX 1024
> +
> +/*
> + * Note that this register image is in a different order than
> + * the register image that Linux produces at interrupt time.
> + *
> + * Linux's register image is defined by struct pt_regs in ptrace.h.
> + * Just why GDB uses a different order is a historical mystery.
> + */
> +#ifdef CONFIG_X86_32
> +enum regnames { _AX, /* 0 */
> + _CX, /* 1 */
> + _DX, /* 2 */
> + _BX, /* 3 */
> + _SP, /* 4 */
> + _BP, /* 5 */
> + _SI, /* 6 */
> + _DI, /* 7 */
> + _PC, /* 8 also known as eip */
> + _PS, /* 9 also known as eflags */
> + _CS, /* 10 */
> + _SS, /* 11 */
> + _DS, /* 12 */
> + _ES, /* 13 */
> + _FS, /* 14 */
> + _GS /* 15 */
> +};
> +#else /* ! CONFIG_X86_32 */
> +enum regnames { _AX, /* 0 */
> + _DX, /* 1 */
> + _CX, /* 2 */
> + _BX, /* 3 */
> + _SI, /* 4 */
> + _DI, /* 5 */
> + _BP, /* 6 */
> + _SP, /* 7 */
> + _R8, /* 8 */
> + _R9, /* 9 */
> + _R10, /* 10 */
> + _R11, /* 11 */
> + _R12, /* 12 */
> + _R13, /* 13 */
> + _R14, /* 14 */
> + _R15, /* 15 */
> + _PC, /* 16 */
> + _PS /* 17 */
> +};
> +#endif /* CONFIG_X86_32 */
> +
> +/* Number of bytes for gdb registers */
> +#ifdef CONFIG_X86_32
> +#define NUMREGBYTES 64
> +#else /* ! CONFIG_X86_32 */
> +#define NUMREGBYTES ((_PS+1)*8)
> +#endif /* CONFIG_X86_32 */
> +
> +#ifndef __ASSEMBLY__
> +#define BREAKPOINT() asm(" int $3");
> +#define BREAK_INSTR_SIZE 1
> +#define CACHE_FLUSH_IS_SAFE 1
> +#endif /* !__ASSEMBLY__ */
> +#endif /* _ASM_KGDB_H_ */
> +#endif /* __KERNEL__ */
Please fold into the next version:
diff --git a/include/asm-x86/kgdb.h b/include/asm-x86/kgdb.h
index c2803a8..0ba150b 100644
--- a/include/asm-x86/kgdb.h
+++ b/include/asm-x86/kgdb.h
@@ -1,4 +1,3 @@
-#ifdef __KERNEL__
#ifndef _ASM_KGDB_H_
#define _ASM_KGDB_H_
@@ -70,10 +69,7 @@ enum regnames { _AX, /* 0 */
#define NUMREGBYTES ((_PS+1)*8)
#endif /* CONFIG_X86_32 */
-#ifndef __ASSEMBLY__
#define BREAKPOINT() asm(" int $3");
#define BREAK_INSTR_SIZE 1
#define CACHE_FLUSH_IS_SAFE 1
-#endif /* !__ASSEMBLY__ */
-#endif /* _ASM_KGDB_H_ */
-#endif /* __KERNEL__ */
+#endif /* _ASM_KGDB_H_ */
next prev parent reply other threads:[~2008-02-09 14:34 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 ` Jan Kiszka [this message]
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 ` [PATCH 1/8] kgdb: core API and gdb protocol handler Jan Kiszka
2008-02-09 15:29 ` 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=47ADB9D3.6070604@web.de \
--to=jan.kiszka@web.de \
--cc=jason.wessel@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--subject='Re: [PATCH 5/8] kgdb, x86: Add arch specfic kgdb support' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).