Initial bulk commit for "Git on MSys"
[msysgit/historical-msysgit.git] / mingw / info / gdb / NetWare.html
blob92b32ac18268130c8921c26e948a20bca09d3694
1 <html lang="en">
2 <head>
3 <title>Debugging with GDB</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="Debugging with GDB">
6 <meta name="generator" content="makeinfo 4.3">
7 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
8 </head>
9 <body>
10 <div class="node">
11 <p>
12 Node:<a name="NetWare">NetWare</a>,
13 Next:<a rel="next" accesskey="n" href="remote-stub.html#remote%20stub">remote stub</a>,
14 Previous:<a rel="previous" accesskey="p" href="Server.html#Server">Server</a>,
15 Up:<a rel="up" accesskey="u" href="Remote-Debugging.html#Remote%20Debugging">Remote Debugging</a>
16 <hr><br>
17 </div>
19 <h3 class="section">Using the <code>gdbserve.nlm</code> program</h3>
21 <p><code>gdbserve.nlm</code> is a control program for NetWare systems, which
22 allows you to connect your program with a remote GDB via
23 <code>target remote</code>.
25 GDB and <code>gdbserve.nlm</code> communicate via a serial line,
26 using the standard GDB remote serial protocol.
28 <dl>
29 <dt><em>On the target machine,</em>
30 <dd>you need to have a copy of the program you want to debug.
31 <code>gdbserve.nlm</code> does not need your program's symbol table, so you
32 can strip the program if necessary to save space. GDB on the
33 host system does all the symbol handling.
35 <p>To use the server, you must tell it how to communicate with
36 GDB; the name of your program; and the arguments for your
37 program. The syntax is:
39 <pre class="smallexample"> load gdbserve [ BOARD=<var>board</var> ] [ PORT=<var>port</var> ]
40 [ BAUD=<var>baud</var> ] <var>program</var> [ <var>args</var> ... ]
41 </pre>
43 <p><var>board</var> and <var>port</var> specify the serial line; <var>baud</var> specifies
44 the baud rate used by the connection. <var>port</var> and <var>node</var> default
45 to 0, <var>baud</var> defaults to 9600bps.
47 <p>For example, to debug Emacs with the argument <code>foo.txt</code>and
48 communicate with GDB over serial port number 2 or board 1
49 using a 19200bps connection:
51 <pre class="smallexample"> load gdbserve BOARD=1 PORT=2 BAUD=19200 emacs foo.txt
52 </pre>
54 <br><dt><em>On the GDB host machine,</em>
55 <dd>you need an unstripped copy of your program, since GDB needs
56 symbols and debugging information. Start up GDB as usual,
57 using the name of the local copy of your program as the first argument.
58 (You may also need the <code>--baud</code> option if the serial line is
59 running at anything other than 9600bps. After that, use <code>target
60 remote</code> to establish communications with <code>gdbserve.nlm</code>. Its
61 argument is a device name (usually a serial device, like
62 <code>/dev/ttyb</code>). For example:
64 <pre class="smallexample"> (gdb) target remote /dev/ttyb
65 </pre>
67 <p>communications with the server via serial line <code>/dev/ttyb</code>.
68 </dl>
70 </body></html>