diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2008-08-01 09:39:34 -0400 |
---|---|---|
committer | Jason Wessel <jason.wessel@windriver.com> | 2008-08-01 09:39:34 -0400 |
commit | a9b60bf4c29e07a5a2f26a6f74937972fee9b58b (patch) | |
tree | 6862f0442a9ab4e2da20fb93e3cf3be2c36b76b2 /Documentation | |
parent | 5f5ddfb3605d2a4f555a7ff034859e623eafcd27 (diff) |
kgdb: fix kgdb_validate_break_address to perform a mem write
A regression to the kgdb core was found in the case of using the
CONFIG_DEBUG_RODATA kernel option. When this option is on, a breakpoint
cannot be written into any readonly memory page. When an external
debugger requests a breakpoint to get set, the
kgdb_validate_break_address() was only checking to see if the address
to place the breakpoint was readable and lacked a write check.
This patch changes the validate routine to try reading (via the
breakpoint set request) and also to try immediately writing the break
point. If either fails, an error is correctly returned and the
debugger behaves correctly. Then an end user can make the
descision to use hardware breakpoints.
Also update the documentation to reflect that using
CONFIG_DEBUG_RODATA will inhibit the use of software breakpoints.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/DocBook/kgdb.tmpl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl index 54d3b158d080..372dec20c8da 100644 --- a/Documentation/DocBook/kgdb.tmpl +++ b/Documentation/DocBook/kgdb.tmpl | |||
@@ -106,6 +106,16 @@ | |||
106 | while debugging the kernel. | 106 | while debugging the kernel. |
107 | </para> | 107 | </para> |
108 | <para> | 108 | <para> |
109 | If the architecture that you are using supports the kernel option | ||
110 | CONFIG_DEBUG_RODATA, you should consider turning it off. This | ||
111 | option will prevent the use of software breakpoints because it | ||
112 | marks certain regions of the kernel's memory space as read-only. | ||
113 | If kgdb supports it for the architecture you are using, you can | ||
114 | use hardware breakpoints if you desire to run with the | ||
115 | CONFIG_DEBUG_RODATA option turned on, else you need to turn off | ||
116 | this option. | ||
117 | </para> | ||
118 | <para> | ||
109 | Next you should choose one of more I/O drivers to interconnect debugging | 119 | Next you should choose one of more I/O drivers to interconnect debugging |
110 | host and debugged target. Early boot debugging requires a KGDB | 120 | host and debugged target. Early boot debugging requires a KGDB |
111 | I/O driver that supports early debugging and the driver must be | 121 | I/O driver that supports early debugging and the driver must be |