Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e431a9d authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
  kgdb,ppc: Individual register get/set for ppc
  kgdbts: prevent re-entry to kgdbts before it unregisters
  debug_core,x86,blackfin: Clean up hw debug disable API
  kdb: Fix early debugging crash regression
  kgdb,arm: fix register dump
  kdb: fix per_cpu command to remove supress mask
  kdb: Add kdb kernel module sample
parents 75d73126 ff10b88b
Loading
Loading
Loading
Loading
+12 −1
Original line number Original line Diff line number Diff line
@@ -710,7 +710,18 @@ Task Addr Pid Parent [*] cpu State Thread Command
        <listitem><para>A simple shell</para></listitem>
        <listitem><para>A simple shell</para></listitem>
        <listitem><para>The kdb core command set</para></listitem>
        <listitem><para>The kdb core command set</para></listitem>
        <listitem><para>A registration API to register additional kdb shell commands.</para>
        <listitem><para>A registration API to register additional kdb shell commands.</para>
        <para>A good example of a self-contained kdb module is the "ftdump" command for dumping the ftrace buffer.  See: kernel/trace/trace_kdb.c</para></listitem>
	<itemizedlist>
        <listitem><para>A good example of a self-contained kdb module
        is the "ftdump" command for dumping the ftrace buffer.  See:
        kernel/trace/trace_kdb.c</para></listitem>
        <listitem><para>For an example of how to dynamically register
        a new kdb command you can build the kdb_hello.ko kernel module
        from samples/kdb/kdb_hello.c.  To build this example you can
        set CONFIG_SAMPLES=y and CONFIG_SAMPLE_KDB=m in your kernel
        config.  Later run "modprobe kdb_hello" and the next time you
        enter the kdb shell, you can run the "hello"
        command.</para></listitem>
	</itemizedlist></listitem>
        <listitem><para>The implementation for kdb_printf() which
        <listitem><para>The implementation for kdb_printf() which
        emits messages directly to I/O drivers, bypassing the kernel
        emits messages directly to I/O drivers, bypassing the kernel
        log.</para></listitem>
        log.</para></listitem>
+3 −2
Original line number Original line Diff line number Diff line
@@ -70,7 +70,8 @@ extern int kgdb_fault_expected;
#define _GP_REGS		16
#define _GP_REGS		16
#define _FP_REGS		8
#define _FP_REGS		8
#define _EXTRA_REGS		2
#define _EXTRA_REGS		2
#define DBG_MAX_REG_NUM		(_GP_REGS + (_FP_REGS * 3) + _EXTRA_REGS)
#define GDB_MAX_REGS		(_GP_REGS + (_FP_REGS * 3) + _EXTRA_REGS)
#define DBG_MAX_REG_NUM		(_GP_REGS + _FP_REGS + _EXTRA_REGS)


#define KGDB_MAX_NO_CPUS	1
#define KGDB_MAX_NO_CPUS	1
#define BUFMAX			400
#define BUFMAX			400
@@ -93,7 +94,7 @@ extern int kgdb_fault_expected;
#define _SPT			13
#define _SPT			13
#define _LR			14
#define _LR			14
#define _PC			15
#define _PC			15
#define _CPSR			(DBG_MAX_REG_NUM - 1)
#define _CPSR			(GDB_MAX_REGS - 1)


/*
/*
 * So that we can denote the end of a frame for tracing,
 * So that we can denote the end of a frame for tracing,
+1 −1
Original line number Original line Diff line number Diff line
@@ -79,7 +79,7 @@ sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task)
		return;
		return;


	/* Initialize to zero */
	/* Initialize to zero */
	for (regno = 0; regno < DBG_MAX_REG_NUM; regno++)
	for (regno = 0; regno < GDB_MAX_REGS; regno++)
		gdb_regs[regno] = 0;
		gdb_regs[regno] = 0;


	/* Otherwise, we have only some registers from switch_to() */
	/* Otherwise, we have only some registers from switch_to() */
+2 −1
Original line number Original line Diff line number Diff line
@@ -320,7 +320,7 @@ static void bfin_correct_hw_break(void)
	}
	}
}
}


void kgdb_disable_hw_debug(struct pt_regs *regs)
static void bfin_disable_hw_debug(struct pt_regs *regs)
{
{
	/* Disable hardware debugging while we are in kgdb */
	/* Disable hardware debugging while we are in kgdb */
	bfin_write_WPIACTL(0);
	bfin_write_WPIACTL(0);
@@ -406,6 +406,7 @@ struct kgdb_arch arch_kgdb_ops = {
#endif
#endif
	.set_hw_breakpoint = bfin_set_hw_break,
	.set_hw_breakpoint = bfin_set_hw_break,
	.remove_hw_breakpoint = bfin_remove_hw_break,
	.remove_hw_breakpoint = bfin_remove_hw_break,
	.disable_hw_break = bfin_disable_hw_debug,
	.remove_all_hw_break = bfin_remove_all_hw_break,
	.remove_all_hw_break = bfin_remove_all_hw_break,
	.correct_hw_break = bfin_correct_hw_break,
	.correct_hw_break = bfin_correct_hw_break,
};
};
+1 −0
Original line number Original line Diff line number Diff line
@@ -31,6 +31,7 @@ static inline void arch_kgdb_breakpoint(void)
	asm(".long 0x7d821008"); /* twge r2, r2 */
	asm(".long 0x7d821008"); /* twge r2, r2 */
}
}
#define CACHE_FLUSH_IS_SAFE	1
#define CACHE_FLUSH_IS_SAFE	1
#define DBG_MAX_REG_NUM     70


/* The number bytes of registers we have to save depends on a few
/* The number bytes of registers we have to save depends on a few
 * things.  For 64bit we default to not including vector registers and
 * things.  For 64bit we default to not including vector registers and
Loading