On Fri, 12 Feb 2010 17:43:39 -0600 Jason Wessel
wrote:
> >>printk(KERN_EMERG "Kernel panic - not syncing: %s\n",buf);
> >> #ifdef CONFIG_DEBUG_BUGVERBOSE
> >>dump_stack();
> >> @@ -91,8 +94,6 @@ NORET_TYPE void panic(const char * fmt, ...)
> >> */
> >>smp_send_stop();
> >>
> >
On Fri, 12 Feb 2010 17:20:22 -0600 Jason Wessel
wrote:
> Andrew Morton wrote:
> > On Fri, 12 Feb 2010 16:35:37 -0600 Jason Wessel
> > wrote:
> >
> >
> >> @@ -609,6 +610,14 @@ asmlinkage int printk(const char *fmt, ...)
> >>va_list args;
> >>int r;
> >>
> >> +#ifdef CONFIG_KGDB_KDB
On 02/12/10 14:36, Jason Wessel wrote:
> Update the kgdb docs to include information about kernel mode setting support.
>
> Signed-off-by: Jason Wessel
> ---
> Documentation/DocBook/kgdb.tmpl | 82
> +++
> Documentation/kernel-parameters.txt |9 +++-
>
On Fri, Feb 12, 2010 at 17:35, Jason Wessel wrote:
> The new debug core api requires all architectures that use to debug
> core to implement a function to set the program counter.
>
> CC: Mike Frysinger
sorry, thought i Acked-by this already ...
-mike
Andrew Morton wrote:
> On Fri, 12 Feb 2010 16:35:41 -0600 Jason Wessel
> wrote:
>
>
>> It is highly desirable to trap into kdb on panic,
>>
>
> s/kdb/kgdb/
>
> But is it necessary to do it in-kernel? Why not just put a
> breakpoint at panic(), add that to your .gdbinit?
>
>
If you do
Andrew Morton wrote:
> On Fri, 12 Feb 2010 16:35:37 -0600 Jason Wessel
> wrote:
>
>
>> @@ -609,6 +610,14 @@ asmlinkage int printk(const char *fmt, ...)
>> va_list args;
>> int r;
>>
>> +#ifdef CONFIG_KGDB_KDB
>> +if (unlikely(kdb_trap_printk)) {
>> +va_start(args, f
On Fri, 12 Feb 2010 16:35:41 -0600 Jason Wessel
wrote:
> It is highly desirable to trap into kdb on panic,
s/kdb/kgdb/
But is it necessary to do it in-kernel? Why not just put a
breakpoint at panic(), add that to your .gdbinit?
> diff --git a/kernel/panic.c b/kernel/panic.c
> index c787333..
On Fri, 12 Feb 2010 16:35:37 -0600 Jason Wessel
wrote:
> @@ -609,6 +610,14 @@ asmlinkage int printk(const char *fmt, ...)
> va_list args;
> int r;
>
> +#ifdef CONFIG_KGDB_KDB
> + if (unlikely(kdb_trap_printk)) {
> + va_start(args, fmt);
> + r = vkdb_prin
If the kernel debugger was configured, attached and started with
kgdbwait, the hardware breakpoint registers should get restored by the
kgdb code which is managing the dr registers.
CC: x...@kernel.org
CC: Thomas Gleixner
CC: Ingo Molnar
CC: H. Peter Anvin
Signed-off-by: Jason Wessel
---
arch
Allow kdb to work properly with with earlyprintk=vga by interpreting
the backspace and carriage return output characters. These
interpretation of these characters is used for simple line editing
provided in the kdb shell.
CC: Thomas Gleixner
CC: Ingo Molnar
CC: H. Peter Anvin
CC: x...@kernel.o
This patch adds the capability to use the usb debug port with the
kernel debugger. It is also still possible to use this functionality
with or without the earlyprintk=dbgpX. It is possible to use the
kgdbwait boot argument to debug very early in the kernel start up code.
There are two ways to us
The ekgdboc= differs from kgdboc= in that you can begin debuggin as
soon as the exceptions are setup and the kgdb I/O driver is available,
instead of waiting until the tty subsystem is available.
CC: kgdb-bugreport@lists.sourceforge.net
Signed-off-by: Jason Wessel
---
Documentation/kernel-parame
It is not possible to use the hw_breakpoint.c API prior to mm_init(),
but it is possible to use hardware breakpoints with the kernel
debugger.
Prior to smp_init() it is possible to simply write to the dr registers
of the boot cpu directly. This can be used up until the
kgdb_arch_late() is invoked
This patch addresses two problems:
1) Bulk reads should always use the DATA0 for the pid, and the write
PID should toggle between DATA0 and DATA1. The fix is using
dbgp_pid_write_update() and dbgp_pid_read_update().
2) The delay loop for waiting for a transaction was not long enough to
From: Jan Kiszka
Allow the x86 arch to have early exception processing for the purpose
of debugging via the kgdb.
Signed-off-by: Jan Kiszka
Signed-off-by: Jason Wessel
---
arch/x86/include/asm/processor.h |2 ++
arch/x86/kernel/setup.c |1 +
arch/x86/kernel/traps.c |
The kernel debugger can operate well before mm_init(), but the x86
hardware breakpoint code which uses the perf api requires that the
kernel allocators are initialized.
This means the kernel debug core needs to provide an optional arch
specific call back to allow the initialization functions to ru
Patch set 3 of 3 - The kdb / kgdb merge
This patch set stacks on top of the kgdb / kdb / kms patches and
focuses on allowing the kernel debugger to as early as the earlyprintk
is available. Right now early debugging is only available on x86, but
the API in the debug core are generic and the only
Commit 5349ef3127c77075ff70b2014f17ae0fbcaaf199 changed logic of when
a pixclock was valid vs invalid.
The atomic kernel mode setting used by the kernel debugger relied upon
the drm_fb_helper_check_var() to always return -EINVAL. Until a
better solution exists, this behavior will be restored.
CC
Here are some hacks to work around mutex crashes in the drm / i915
code.
For now, this is the only way to make the kms / kgdb path safe on an
SMP system.
Helper macros were added to allow kms code to declare debugger safe
mutexes which can be used so long as the debugger restores the state
before
The kgdboc pre exception handler must atomically save the state of the
existing VC console and activate it, if it is blanked.
Before restoring the kernel to a running state, the kgdboc post
exception handler will restore the state of the VC variables that got
changed while atomic.
CC: David Airli
If the HW compression is left on, the call backs from the HW will
crash the kernel. The only time this code is called is when kernel
mode setting is in use with kgdb and the kdb shell.
The atomic display pipe handler callback will reset everything when
kgdb restores kernel to the run state.
CC:
Update the kgdb docs to include information about kernel mode setting support.
Signed-off-by: Jason Wessel
---
Documentation/DocBook/kgdb.tmpl | 82 +++
Documentation/kernel-parameters.txt |9 +++-
2 files changed, 79 insertions(+), 12 deletions(-)
diff
Hooks for the kgdb core for registration of the drm layer to provide a
call backs so as to perform kernel mode switching, for use with kdb.
[jbar...@virtuousgeek.org: add ops arg to kgdb console active & restore hooks]
CC: Jesse Barnes
Signed-off-by: Jason Wessel
---
drivers/serial/kgdboc.c
From: Jesse Barnes
---
drivers/gpu/drm/drm_fb_helper.c | 79
drivers/gpu/drm/i915/intel_display.c | 93 ++
include/drm/drm_crtc_helper.h|2 +
include/drm/drm_fb_helper.h |4 ++
4 files changed, 178 ins
Patch set 2 of 3 - The kdb / kgdb merge
This patch set stacks on top of the kgdb / kdb patches and focuses on
further extending kdb to accommodate atomic kernel mode setting (kms).
At the moment only the Intel i915 class video devices are supported,
but the API is generic and would allow for othe
It is highly desirable to trap into kdb on panic, and in order
to do so the notifier must be called before smp_send_stop(),
else the debug_core will not be able to correctly trap
all the CPUs.
CC: Ingo Molnar
CC: Andrew Morton
Signed-off-by: Jason Wessel
---
kernel/debug/debug_core.c | 18 ++
Certain calls from the kdb shell will call out to printk(), and any of
these calls should get vectored back to the kdb_printf() so that the
kdb pager and processing can be used, as well as to properly channel
I/O to the polled I/O devices.
CC: Randy Dunlap
CC: Andrew Morton
Signed-off-by: Jason
The only way the debugger can handle a trap in inside rcu_lock,
notify_die, or atomic_notifier_call_chain without a recursive fault is
to have a low level "first opportunity handler" low level
program_check_exception() handler.
The other change here is to make sure that kgdb_handle_exception() is
The kgdb test suite mimics the behavior of gdb. For the sh
architecture the pc must be decremented by 2 for software breakpoint.
Signed-off-by: Jason Wessel
Acked-by: Paul Mundt
---
drivers/misc/kgdbts.c |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/misc
The kernel debugger should turn off kernel tracing any time the
debugger is active and restore it on resume.
CC: Steven Rostedt
Signed-off-by: Jason Wessel
---
kernel/debug/debug_core.c |8
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/kernel/debug/debug_core.c b/k
The only way the debugger can handle a trap in inside rcu_lock,
notify_die, or atomic_notifier_call_chain without a recursive fault is
to have a low level "first opportunity handler" do_trap_or_bp() handler.
Generally this will be something the vast majority of folks will not
need, but for those w
If kdb is open on a serial port that is not actually a console make
sure to call the poll routines to emit and receive characters.
Signed-off-by: Jason Wessel
---
drivers/serial/kgdboc.c | 14 ++
include/linux/kgdb.h |3 +++
kernel/debug/kdb/kdb_io.c | 16 +
This allows kdb to debug a crash with in the kms code with a
single level recursive re-entry.
Signed-off-by: Jason Wessel
---
kernel/debug/debug_core.c |7 +++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c
index ef46a
When using a keyboard with kdb, on resuming the system there needs to
be a hook to allow for the keyboard state to get reset.
This is mainly because there is no way to force the end user to hold
down the original keys that were pressed prior to entering kdb.
CC: Dmitry Torokhov
Signed-off-by: Ja
Update the kgdb docs to reflect the new directory structure and API.
Merge in the kdb shell information.
Signed-off-by: Jason Wessel
---
Documentation/DocBook/kgdb.tmpl | 640 ++-
Documentation/kernel-parameters.txt |7 +-
include/linux/kgdb.h
One of the driving forces behind integrating another front end (kdb)
to the debug core is to allow front end commands to be accessible via
gdb's monitor command. It is true that you could write gdb macros to
get certain data, but you may want to just use gdb to access the
commands that are availab
Remove all the references to the kgdb_post_primary_code. This
function serves no useful purpose because you can obtain the same
information from the "struct kgdb_state *ks" from with in the
debugger, if for some reason you want the data.
Also remove the unintentional duplicate assignment for ks->
Some kgdb I/O modules require the ability to create a breakpoint
tasklet, such as kgdboc and external modules such as kgdboe. The
breakpoint tasklet is used as an asynchronous entry point into the
debugger which will have a different function scope than the current
execution path where it might no
Update the maintained files sections.
Signed-off-by: Jason Wessel
---
MAINTAINERS |6 --
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 412eff6..b7b192a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3172,15 +3172,17 @@ S: Maintained
This patch adds in the kdb PS/2 keyboard driver. This was mostly a
direct port from the original kdb where I cleaned up the code against
checkpatch.pl and added the glue to stitch it into kgdb.
This patch also enables early kdb debug via kgdbwait and the keyboard.
All the access to configure kdb
These are the minimum changes to the kgdb core in order to enable an
API to connect a new front end (kdb) to the debug core.
This patch introduces the dbg_kdb_mode variable controls where the
user level I/O is routed. It will be routed to the gdbstub (kgdb) or
to the kdb front end which is a simp
The only way the debugger can handle a trap in inside rcu_lock,
notify_die, or atomic_notifier_call_chain without a triple fault is
to have a low level "first opportunity handler" in the int3 exception
handler.
Generally this will be something the vast majority of folks will not
need, but for thos
The new debug core api requires all architectures that use to debug
core to implement a function to set the program counter.
CC: Mike Frysinger
Signed-off-by: Jason Wessel
Acked-by: Sonic Zhang
---
arch/blackfin/kernel/kgdb.c |5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff
Patch set 1 of 3 - The kdb / kgdb merge
This is 3rd and hopefully final kgdb/kdb series originally posted in
December 2009. The next version will hopefully be a pull request to
Linus, depending on any further feedback from the community.
Thank you very much to everyone who provided feedback on t
This patch contains the hooks and instrumentation into kernel which
live outside the kernel/debug directory, which the kdb core
will call to run commands like lsmod, dmesg, bt etc...
CC: m...@sgi.com
CC: linux-a...@vger.kernel.org
Signed-off-by: Jason Wessel
---
arch/arm/include/asm/kmap_types.h
The design of kdb required that every device that can provide input to
kdb have a polling routine that exits immediately if there is no
character available.
This is required in order to get the page scrolling mechanism working,
it is also a reasonable requirement for future kgdb I/O drivers
becaus
The sci_poll_get_char() needs to return immediately if there is no
input from the chip to process, and must return a value of
NO_POLL_CHAR.
This allows kgdboc to process multiple polled devices while kgdb is
active.
Signed-off-by: Jason Wessel
Acked-by: Paul Mundt
---
drivers/serial/sh-sci.c |
Allow kgdboc to work on sparc hardware with the Zilog serial chips.
Signed-off-by: Jason Wessel
Acked-by: David S. Miller
---
drivers/serial/sunzilog.c | 50 +
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/drivers/serial/sunzilog.c
Split the former kernel/kgdb.c into debug_core.c which contains the
kernel debugger exception logic and to the gdbstub.c which contains
the logic for allowing gdb to talk to the debug core.
This also created a private include file called debug_core.h which
contains all the definitions to glue the
Implement kgdb_arch_pc() which adjusts the pc if it needs to be
adjusted after a software breakpoint trap.
Implement kgdb_arch_set_pc() which is a new required function in the
kgdb debug core.
When processing a single step return zero in the error exception field
so that the debug core can distin
The new debug core api requires all architectures that use to debug
core to implement a function to set the program counter.
Signed-off-by: Jason Wessel
Acked-by: David S. Miller
---
arch/sparc/kernel/kgdb_32.c |6 ++
arch/sparc/kernel/kgdb_64.c |6 ++
2 files changed, 12 insert
Move kgdb.c in preparation for to separate the gdbstub from the debug
core and exception handling.n
CC: Ingo Molnar
Signed-off-by: Jason Wessel
---
kernel/Makefile |2 +-
kernel/debug/Makefile |5 +
kernel/{kgdb.c => debug/debug_core.c} |0
This is a kgdb architectural change to have all the cpus (master or
slave) enter the same function.
A cpu that hits an exception (wants to be the master cpu) will call
kgdb_handle_exception() from the trap handler and then invoke a
kgdb_roundup_cpu() to synchronize the other cpus and bring them in
53 matches
Mail list logo