Content deleted Content added
m WP:CHECKWIKI error fixes + general fixes, References after punctuation per WP:REFPUNC and WP:PAIC using AWB (7510) |
Sammi Brie (talk | contribs) Adding short description: "Remote debugging program" |
||
(30 intermediate revisions by 22 users not shown) | |||
Line 1:
{{Short description|Remote debugging program}}
{{lowercase|title=gdbserver}}
{{compu-prog-stub|date=February 2010}}▼
'''gdbserver''' is a computer program that makes it possible to remotely [[Debugging|debug]] other programs.<ref>[http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_node/gdb_130.html GDB Manual]</ref> Running on the same system as the program to be debugged, it allows the [[GNU Debugger]] to connect from another system; that is, only the executable
▲'''gdbserver''' is a computer program that makes it possible to remotely [[Debugging|debug]] other programs.<ref>[http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_node/gdb_130.html GDB Manual]</ref> Running on the same system as the program to be debugged, it allows the [[GNU Debugger]] to connect from another system; that is, only the executable{{Clarify|date=June 2010}} needs to be resident on the target system, while the source code{{Clarify|date=June 2010}} and a copy of the binary file{{Clarify|date=June 2010}} reside on the developer’s local computer.
▲== How It Works ==
# <code>gdbserver</code> is launched on the target system, with the arguments:
#* Either a device name (to use a serial line) or a TCP hostname and port number, and
#* The path and filename of the executable to be debugged
#:It then
# <code>gdb</code> is run on the host, with the arguments:
#* The path and filename of the executable
#*
Example for debugging a program called <code>hello_world</code> on a remote
<syntaxhighlight lang="console">
remote@~$ gdbserver :
Process hello_world created; pid = 2509
Listening on port
</syntaxhighlight>
<syntaxhighlight lang="console">
local@~$ gdb -q hello_world
Reading symbols from /home/user/hello_world...done.
(gdb) target remote 192.168.0.11:
Remote debugging using 192.168.0.11:
0x002f3850 in ?? () from /lib/ld-linux.so.2
(gdb) continue
Line 33 ⟶ 32:
10 printf("x[%d] = %g\n", i, x[i]);
(gdb)
</syntaxhighlight>
== Alternatives ==
Another technique for debugging programs remotely is to use a ''remote stub''.<ref>[
== See also ==
Line 48 ⟶ 45:
== References ==
* Andreas Zeller: <cite>Why Programs Fail: A Guide to Systematic Debugging</cite>, Morgan Kaufmann, 2005. {{ISBN
== External links ==
* [
* [http://davis.lbl.gov/Manuals/GDB/gdb_17.html Debugging with GDB]
Line 62 ⟶ 58:
[[Category:Unix programming tools]]
|