diff options
author | Joel Brobecker <brobecker@gnat.com> | 2009-10-28 15:01:27 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2009-10-28 15:01:27 +0000 |
commit | 9a7071a8ce92ca34996d97b77e72ac8cc3946cd6 (patch) | |
tree | 9f70f54a268195155ff17a5b382b60a41d5d38f3 /gdb/doc | |
parent | 14610ad10e3d4b84565d3590eaa9582f9793f743 (diff) | |
download | gdb-9a7071a8ce92ca34996d97b77e72ac8cc3946cd6.zip gdb-9a7071a8ce92ca34996d97b77e72ac8cc3946cd6.tar.gz gdb-9a7071a8ce92ca34996d97b77e72ac8cc3946cd6.tar.bz2 |
gdb/:
* remote.c (interrupt_sequence_control_c)
(interrupt_sequence_break, interrupt_sequence_break_g)
(interrupt_sequence_modes): New constants.
(interrupt_sequence_mode, interrupt_on_connect): New variable.
(show_interrupt_sequence): New function.
(set_remotebreak, show_remotebreak): New function.
(send_interrupt_sequence): New function.
(remote_start_remote): Call send_interrupt_sequence if
interrupt_on_connect is true.
(remote_stop_as): Call send_interrupt_sequence.
(_initialize_remote): Add interrupt-sequence and interrupt-on-connect,
modify remotebreak to call set_remotebreak and show_remotebreak.
* NEWS: Add entry for "set/show remote interrupt-sequence" and
"set/show remote interrupt-on-connect". Also mention that
"set/show remotebreak" is now deprecated.
gdb/doc/:
* gdb.texinfo (Remote Configuration): Add "set/show remote
interrupt-sequence" and "set/show remote interrupt-on-connect" command.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/gdb.texinfo | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 6a74aeb..aa28bc3 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -15234,6 +15234,34 @@ extended-remote}. This should be set to a filename valid on the target system. If it is not set, the target will use a default filename (e.g.@: the last program run). +@item set remote interrupt-sequence +@cindex interrupt remote programs +@cindex select Ctrl-C, BREAK or BREAK-g +Allow the user to select one of @samp{Ctrl-C}, a @code{BREAK} or +@samp{BREAK-g} as the +sequence to the remote target in order to interrupt the execution. +@samp{Ctrl-C} is a default. Some system prefers @code{BREAK} which +is high level of serial line for some certain time. +Linux kernel prefers @samp{BREAK-g}, a.k.a Magic SysRq g. +It is @code{BREAK} signal followed by character @code{g}. + +@item show interrupt-sequence +Show which of @samp{Ctrl-C}, @code{BREAK} or @code{BREAK-g} +is sent by @value{GDBN} to interrupt the remote program. +@code{BREAK-g} is BREAK signal followed by @code{g} and +also known as Magic SysRq g. + +@item set remote interrupt-on-connect +@cindex send interrupt-sequence on start +Specify whether interrupt-sequence is sent to remote target when +@value{GDBN} connects to it. This is mostly needed when you debug +Linux kernel. Linux kernel expects @code{BREAK} followed by @code{g} +which is known as Magic SysRq g in order to connect @value{GDBN}. + +@item show interrupt-on-connect +Show whether interrupt-sequence is sent +to remote target when @value{GDBN} connects to it. + @kindex set tcp @kindex show tcp @item set tcp auto-retry on @@ -30084,9 +30112,9 @@ or -1 if an error occurs. @var{pathname} is a string. @cindex interrupts (remote protocol) When a program on the remote target is running, @value{GDBN} may -attempt to interrupt it by sending a @samp{Ctrl-C} or a @code{BREAK}, -control of which is specified via @value{GDBN}'s @samp{remotebreak} -setting (@pxref{set remotebreak}). +attempt to interrupt it by sending a @samp{Ctrl-C}, @code{BREAK} or +a @code{BREAK} followed by @code{g}, +control of which is specified via @value{GDBN}'s @samp{interrupt-sequence}. The precise meaning of @code{BREAK} is defined by the transport mechanism and may, in fact, be undefined. @value{GDBN} does not @@ -30103,6 +30131,10 @@ and does @emph{not} represent an interrupt. E.g., an @samp{X} packet (@pxref{X packet}), used for binary downloads, may include an unescaped @code{0x03} as part of its packet. +@code{BREAK} followed by @code{g} is also known as Magic SysRq g. +When Linux kernel receives this sequence from serial port, +it stops execution and connects to gdb. + Stubs are not required to recognize these interrupt mechanisms and the precise meaning associated with receipt of the interrupt is implementation defined. If the target supports debugging of multiple |