OSDN Git Service

GNU_gdb: Update to gdb-7.4.1.
[linuxjm/jm.git] / manual / GNU_gdb / release / man1 / gdbserver.1
1 .\" Copyright (C) 1993, 2011-2012 Free Software Foundation, Inc.
2 .\" See section COPYING for conditions for redistribution
3 .\"*******************************************************************
4 .\"
5 .\" This file was generated with po4a. Translate the source file.
6 .\"
7 .\"*******************************************************************
8 .TH gdbserver 1 "2 November 1993" "Cygnus Support" "GNU Development Tools"
9 .SH 名前
10 gdbserver \- GNU デバッガ用リモートサーバ
11 .SH 書式
12 .na
13 .TP 
14 \fBgdbserver\fP
15 tty prog [\|\fBargs...\fP\|]
16 .PP
17 \fBgdbserver\fP tty \fB\-\-attach\fP PID
18 .ad b
19 .SH 説明
20 GDBSERVER は、デバッグ対象のプログラムを実行しているマシンとは異なる マシン上で GDB を実行することを可能にするプログラムです。
21
22 使用方法 (サーバ(ターゲット)側):
23
24 まず、デバッグ対象のプログラムのコピーをターゲットシステムに用意します。 GDBserver は、シンボルを関知しないので、使用スペースを節約するために
25 プログラムをストリップしても構いません。全てのシンボルは、ホストシステムで 実行される GDB によって考慮されます。
26
27 サーバを使用するためには、ターゲットシステムにログインし、`gdbserver' プログラムを実行します。(a) GDB との通信方法、(b)
28 プログラム名、 (c) プログラムへの引数 を指定する必要があります。一般的な書式は以下のように なります:
29
30   target> gdbserver COMM PROGRAM [ARGS ...]
31
32 例えば、シリアルポートを使用する場合は、以下のようになります。
33
34   target> gdbserver /dev/com1 emacs foo.txt
35
36 この例では、emacs を引数 foo.txt を用いてデバッグすることを指定し、 GDB との通信に /dev/com1
37 を使用します。gdbserver は、ホストの GDB が 通信して来ることを辛抱強く待ちます。
38
39 TCP 接続を使用する場合は、以下のようになります。
40
41   target> gdbserver host:2345 emacs foo.txt
42
43 この例では、ホストの GDB との通信に TCP を用いる以外は、前の例と同じです。 引数 `host:2345' は、`host' からの TCP
44 接続が ローカルの TCP ポート 2345 に接続されるのを待つ、という意味です。(現状では `host' 部は無視されます。)
45 ターゲットシステムで存在する TCP ポートとの衝突が無ければ、ポート番号は 自由に選ぶことができます。ホストの GDB の `target
46 remote' コマンドで、 同じポート番号を指定する必要があります。他のサービスと衝突するポート番号を 選んだ場合、gdbserver
47 はエラーメッセージを出力して終了します。
48
49 いくつかのターゲットでは、 gdbserver を実行中のプログラムに接続することができます。これを行うには \-\-attach
50 引き数を使用します。書式は次の通りです。
51
52   target> gdbserver COMM \-\-attach PID
53
54 PID は現在実行中のプロセスのプロセス ID です。
55 gdbserver に実行中のプロセスのバイナリを指定する必要はありません。
56
57 使用方法 (ホスト側):
58
59 GDB がシンボルテーブルを検査したりするため、ホストシステムには、ターゲット プログラムのストリップされていないコピーが必要です。通常の場合同様、
60 最初の引数にターゲットプログラムを指定して GDB を起動します。(シリアルラインが 9600 baud 以外で動作している場合は、\-\-baud
61 オプションが必要です。)  つまり、`gdb TARGET\-PROG' あるいは、`gdb \-\-baud BAUD TARGET\-PROG' のように
62 起動します。その後、新たに覚える必要のあるコマンドは、`target remote' だけです。
63 コマンドの引数は、デバイス名(通常、`/dev/ttyb' のようなシリアルデバイス)か、 HOST:PORT 記述子です。例えば、
64
65   (gdb) target remote /dev/ttyb
66
67 は、シリアルライン /dev/ttyb を使用してサーバと通信します。また、
68
69   (gdb) target remote the\-target:2345
70
71 は、TCP 接続で、ホスト `the\-target' の gdbserver を起動した時に指定した ポートと同じポート 2345
72 を使用してサーバと通信します。TCP 接続の場合、 `target remote' コマンドを実行する前に gdbserver
73 を実行しておく必要があります。 そうしないと、`Connection refused' というようなエラーになるでしょう。
74 .SH オプション
75 デバッグの対象となるプログラムの名前と、通信に使用する tty を指定する 必要があります。他の全てのことはリモートの GDB が行います。
76 その他の引数は、そのままプログラムに渡されます。
77 .SH 関連項目
78 \fBinfo\fP 内の `\|\fBgdb\fP\|' エントリー\&; \fIUsing GDB: A Guide to the GNU
79 Source\-Level Debugger\fP, Richard M. Stallman and Roland H. Pesch, July 1991.
80 .SH 著作権
81 Copyright (c) 1993 Free Software Foundation, Inc.
82 .PP
83 Permission is granted to make and distribute verbatim copies of this manual
84 provided the copyright notice and this permission notice are preserved on
85 all copies.
86 .PP
87 Permission is granted to copy and distribute modified versions of this
88 manual under the conditions for verbatim copying, provided that the entire
89 resulting derived work is distributed under the terms of a permission notice
90 identical to this one.
91 .PP
92 Permission is granted to copy and distribute translations of this manual
93 into another language, under the above conditions for modified versions,
94 except that this permission notice may be included in translations approved
95 by the Free Software Foundation instead of in the original English.