2006-03-07 Jim Blandy <jimb@red-bean.com>

* gdb.texinfo (Connecting): Organize the different 'target remote'
	connection methods into a table.  Add a 'target remote' index
	entry. (!!!)
This commit is contained in:
Jim Blandy
2006-03-09 17:59:12 +00:00
parent f530741d16
commit 86941c2759
2 changed files with 53 additions and 30 deletions

View File

@ -1,3 +1,9 @@
2006-03-07 Jim Blandy <jimb@red-bean.com>
* gdb.texinfo (Connecting): Organize the different 'target remote'
connection methods into a table. Add a 'target remote' index
entry. (!!!)
2006-02-17 Fred Fish <fnf@specifix.com> 2006-02-17 Fred Fish <fnf@specifix.com>
* gdb.texinfo (Symbols): Update descriptions of 'whatis' and * gdb.texinfo (Symbols): Update descriptions of 'whatis' and

View File

@ -12143,37 +12143,51 @@ your program, since @value{GDBN} needs symobl and debugging information.
Start up @value{GDBN} as usual, using the name of the local copy of your Start up @value{GDBN} as usual, using the name of the local copy of your
program as the first argument. program as the first argument.
@cindex serial line, @code{target remote} @cindex @code{target remote}
If you're using a serial line, you may want to give @value{GDBN} the @value{GDBN} can communicate with the target over a serial line, or
@w{@samp{--baud}} option, or use the @code{set remotebaud} command over an @acronym{IP} network using @acronym{TCP} or @acronym{UDP}. In
(@pxref{Remote configuration, set remotebaud}) before the each case, @value{GDBN} uses the same protocol for debugging your
@code{target} command. program; only the medium carrying the debugging packets varies. The
@code{target remote} command establishes a connection to the target.
Its arguments indicate which medium to use:
After that, use @code{target remote} to establish communications with @table @code
the target machine. Its argument specifies how to communicate---either
via a devicename attached to a direct serial line, or a TCP or UDP port @item target remote @var{serial-device}
(possibly to a terminal server which in turn has a serial line to the @cindex serial line, @code{target remote}
target). For example, to use a serial line connected to the device Use @var{serial-device} to communicate with the target. For example,
named @file{/dev/ttyb}: to use a serial line connected to the device named @file{/dev/ttyb}:
@smallexample @smallexample
target remote /dev/ttyb target remote /dev/ttyb
@end smallexample @end smallexample
@cindex TCP port, @code{target remote} If you're using a serial line, you may want to give @value{GDBN} the
To use a TCP connection, use an argument of the form @w{@samp{--baud}} option, or use the @code{set remotebaud} command
@code{@var{host}:@var{port}} or @code{tcp:@var{host}:@var{port}}. (@pxref{Remote configuration, set remotebaud}) before the
For example, to connect to port 2828 on a @code{target} command.
terminal server named @code{manyfarms}:
@item target remote @code{@var{host}:@var{port}}
@itemx target remote @code{tcp:@var{host}:@var{port}}
@cindex @acronym{TCP} port, @code{target remote}
Debug using a @acronym{TCP} connection to @var{port} on @var{host}.
The @var{host} may be either a host name or a numeric @acronym{IP}
address; @var{port} must be a decimal number. The @var{host} could be
the target machine itself, if it is directly connected to the net, or
it might be a terminal server which in turn has a serial line to the
target.
For example, to connect to port 2828 on a terminal server named
@code{manyfarms}:
@smallexample @smallexample
target remote manyfarms:2828 target remote manyfarms:2828
@end smallexample @end smallexample
If your remote target is actually running on the same machine as If your remote target is actually running on the same machine as your
your debugger session (e.g.@: a simulator of your target running on debugger session (e.g.@: a simulator for your target running on the
the same host), you can omit the hostname. For example, to connect same host), you can omit the hostname. For example, to connect to
to port 1234 on your local machine: port 1234 on your local machine:
@smallexample @smallexample
target remote :1234 target remote :1234
@ -12182,22 +12196,25 @@ target remote :1234
Note that the colon is still required here. Note that the colon is still required here.
@cindex UDP port, @code{target remote} @item target remote @code{udp:@var{host}:@var{port}}
To use a UDP connection, use an argument of the form @cindex @acronym{UDP} port, @code{target remote}
@code{udp:@var{host}:@var{port}}. For example, to connect to UDP port 2828 Debug using @acronym{UDP} packets to @var{port} on @var{host}. For example, to
on a terminal server named @code{manyfarms}: connect to @acronym{UDP} port 2828 on a terminal server named @code{manyfarms}:
@smallexample @smallexample
target remote udp:manyfarms:2828 target remote udp:manyfarms:2828
@end smallexample @end smallexample
When using a UDP connection for remote debugging, you should keep in mind When using a @acronym{UDP} connection for remote debugging, you should
that the `U' stands for ``Unreliable''. UDP can silently drop packets on keep in mind that the `U' stands for ``Unreliable''. @acronym{UDP}
busy or unreliable networks, which will cause havoc with your debugging can silently drop packets on busy or unreliable networks, which will
session. cause havoc with your debugging session.
Now you can use all the usual commands to examine and change data and to @end table
step and continue the remote program.
Once the connection has been established, you can use all the usual
commands to examine and change data and to step and continue the
remote program.
@cindex interrupting remote programs @cindex interrupting remote programs
@cindex remote programs, interrupting @cindex remote programs, interrupting