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)
committerLuis Henriques <luis.henriques@canonical.com>
Mon, 30 Apr 2012 18:15:01 +0000 (19:15 +0100)
commit1deaff3335a398729e39daec6008135c50d2fb12
tree40fd83cb45e5c990a993084ad9be0bb527023b72
parentf430b7d740840b17a6aca42dccbd8e2deb1a95af
kgdb,debug_core: pass the breakpoint struct instead of address and memory

BugLink: http://bugs.launchpad.net/bugs/981162

commit 98b54aa1a2241b59372468bd1e9c2d207bdba54b upstream.

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.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
include/linux/kgdb.h
kernel/debug/debug_core.c