In the 2.6.33 kernel, the hw_breakpoint API is now used for the
performance event counters. The hw_breakpoint_handler() now consumes
the hw breakpoints that were previously set by kgdb arch specific
code. In order for kgdb to work in conjunction with this core API
change, kgdb must use some of
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
Back in May 2009 an initial kdb prototype was posted to lkml as an RFC
to see if there was sufficient interest to merge kdb and kgdb together.
There was enough interest to continue on with the project, and it is
now in a state where further work can occur to review, and hopefully
merge the code
When CONFIG_HAVE_UNSTABLE_SCHED_CLOCK is set sched_clock() gets the
time from hardware, such as from TSC. In this configuration kgdb will
report a softlock warning messages on resuming or detaching from a
debug session.
Sequence of events in the problem case:
1) cpu sched clock and hardware
Move kgdb.c in preparation for to separate the gdbstub from the debug
core and exception handling.n
CC: Ingo Molnar mi...@elte.hu
Signed-off-by: Jason Wessel jason.wes...@windriver.com
---
kernel/Makefile |2 +-
kernel/debug/Makefile |5 +
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
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
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
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
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 those
Update the maintained files sections.
Signed-off-by: Jason Wessel jason.wes...@windriver.com
---
MAINTAINERS |6 --
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index d5244f1..98b2669 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3177,15
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.
CC: Jesse Barnes jbar...@virtuousgeek.org
Signed-off-by: Jason Wessel jason.wes...@windriver.com
---
drivers/serial/kgdboc.c | 15 +++
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 jason.wes...@windriver.com
---
drivers/serial/kgdboc.c | 14 ++
include/linux/kgdb.h |3 +++
From: Jesse Barnes jbar...@virtuousgeek.org
This allows callers to store the ops structure in a parent device structure.
Signed-off-by: Jesse Barnes jbar...@virtuousgeek.org
Signed-off-by: Jason Wessel jason.wes...@windriver.com
---
drivers/serial/kgdboc.c |4 ++--
include/linux/kgdb.h|
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
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
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 mi...@elte.hu
CC: Andrew Morton a...@linux-foundation.org
Signed-off-by: Jason Wessel
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.
CC: Paul Mundt let...@linux-sh.org
Signed-off-by: Jason Wessel
This allows kdb to debug a crash with in the kms code with a
single level recursive re-entry.
Signed-off-by: Jason Wessel jason.wes...@windriver.com
---
kernel/debug/debug_core.c |7 +++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/kernel/debug/debug_core.c
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
Add in a low level hook to catch calls to die() in the debugger.
After the debugger is done, the standard system rules will be in play
for the original exception.
The kdb debugger wants a chance to catch these sorts of exceptions for
analysis.
CC: Russell King li...@arm.linux.org.uk
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
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
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
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
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 vap...@gentoo.org
Signed-off-by: Jason Wessel jason.wes...@windriver.com
---
arch/blackfin/kernel/kgdb.c |5 +
1 files changed, 5 insertions(+),
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 randy.dun...@oracle.com
CC: Andrew
From: Randy Dunlap randy.dun...@oracle.com
linux-next-20081022//include/linux/kgdb.h:308): duplicate section name
'Description'
and fix typos in that file's kernel-doc comments.
Signed-off-by: Randy Dunlap randy.dun...@oracle.com
Signed-off-by: Andrew Morton a...@linux-foundation.org
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.
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:
The kgdb test suite mimics the behavior of gdb. For the sh
architecture the pc must be decremented by 2 for software breakpoint.
CC: Paul Mundt let...@linux-sh.org
Signed-off-by: Jason Wessel jason.wes...@windriver.com
---
drivers/misc/kgdbts.c |6 ++
1 files changed, 6 insertions(+), 0
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.
CC: Jesse Barnes jbar...@virtuousgeek.org
CC: David Airlie airl...@linux.ie
Signed-off-by: Jason Wessel jason.wes...@windriver.com
---
From: Jason Wessel jason.wes...@windriver.com
Date: Wed, 23 Dec 2009 15:19:20 -0600
+void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
+{
+ regs-pc = regs-npc;
+ regs-npc = ip;
+}
+
Is this right?
It should probably be something like:
+ regs-pc = ip;
+
From: Jason Wessel jason.wes...@windriver.com
Date: Wed, 23 Dec 2009 15:19:28 -0600
+static void sunzilog_put_poll_char(struct uart_port *port,
+ unsigned char ch)
+{
+ struct uart_sunzilog_port *up = (struct uart_sunzilog_port *)port;
+
+
David Miller wrote:
From: Jason Wessel jason.wes...@windriver.com
Date: Wed, 23 Dec 2009 15:19:28 -0600
+static void sunzilog_put_poll_char(struct uart_port *port,
+unsigned char ch)
+{
+struct uart_sunzilog_port *up = (struct uart_sunzilog_port *)port;
+
+
David Miller wrote:
From: Jason Wessel jason.wes...@windriver.com
Date: Wed, 23 Dec 2009 15:19:20 -0600
+void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
+{
+ regs-pc = regs-npc;
+ regs-npc = ip;
+}
+
Is this right?
It should probably be something
Jason Wessel jason.wes...@windriver.com writes:
I remember going with kaos through all the code
outside kdb/ in his own patch and for nearly all hooks
outside we found some way to eliminate them.
I think a lot of this is here too.
+#ifdef CONFIG_KGDB_KDB
+/* Like meminfo_proc_show()
Greg KH wrote:
On Wed, Dec 23, 2009 at 03:19:13PM -0600, Jason Wessel wrote:
Back in May 2009 an initial kdb prototype was posted to lkml as an RFC
to see if there was sufficient interest to merge kdb and kgdb together.
There was enough interest to continue on with the project, and it is
On Wed, Dec 23, 2009 at 03:43:04PM -0600, Jason Wessel wrote:
The kgdb test suite mimics the behavior of gdb. For the sh
architecture the pc must be decremented by 2 for software breakpoint.
CC: Paul Mundt let...@linux-sh.org
Signed-off-by: Jason Wessel jason.wes...@windriver.com
---
From: Jason Wessel jason.wes...@windriver.com
Date: Wed, 23 Dec 2009 17:04:11 -0600
This fix and the other fix you asked about are both in kgdb-next which
feeds into linux-next, if you are ultimately ok with the changes, I'll
add an ack from you as well.
Feel free to add it:
Acked-by: David
Dear All,
I was trying to debug loadable linux kernel modules using standard setup
environment.
It is x86_64, Kernel - 2.6.32, gdb - 6.8.29 (the same with 7.0 and even
gdbmod which is based on 6.4).
While it was complete success to debug kernel itself, debugging the module
is not -
I was able to
On Wed, Dec 23, 2009 at 03:19:27PM -0600, Jason Wessel wrote:
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.
CC: Paul
On Wed, Dec 23, 2009 at 03:19:21PM -0600, Jason Wessel wrote:
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
43 matches
Mail list logo