kgdb,debug_core: pass the breakpoint struct instead of address and memory
authorJason Wessel <jason.wessel@windriver.com>
Wed, 21 Mar 2012 15:17:03 +0000 (10:17 -0500)
committerVarun Wadekar <vwadekar@nvidia.com>
Wed, 18 Apr 2012 13:08:59 +0000 (18:08 +0530)
commit11acd19532bee2208eb613e27c96a8e774bf83e6
tree010c3a984f1b0445afa651bee7293e4b60d89ad8
parent171f492999049222821c861ca8619b7223b54309
kgdb,debug_core: pass the breakpoint struct instead of address and memory

There is extra state information that needs to be exposed in the
kgdb_bpt structure for tracking how a breakpoint was installed.  The
debug_core only uses the the probe_kernel_write() to install
breakpoints, but this is not enough for all the archs.  Some arch such
as x86 need to use text_poke() in order to install a breakpoint into a
read only page.

Passing the kgdb_bpt structure to kgdb_arch_set_breakpoint() and
kgdb_arch_remove_breakpoint() allows other archs to set the type
variable which indicates how the breakpoint was installed.

Cc: stable@vger.kernel.org # >= 2.6.36
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
include/linux/kgdb.h
kernel/debug/debug_core.c