4

ローカル ネットワーク内のサーバーでアプリケーションをリモート デバッグしようとしています。

サーバ:

$ uname -a 
Linux broatyctl.localdomain 3.6.11.2-rt33.39.el6rt.x86_64 #1 SMP PREEMPT RT Thu Jul 4 06:46:48 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux

$ gdbserver --version
GNU gdbserver (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
Copyright (C) 2010 Free Software Foundation, Inc.
gdbserver is free software, covered by the GNU General Public License.
This gdbserver was configured as "x86_64-redhat-linux-gnu"

ワークステーション:

$ uname -a
Linux workstation.localdomain 3.12.7-300.fc20.x86_64 #1 SMP Fri Jan 10 15:35:31 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ gdb --version
GNU gdb (GDB) Fedora 7.6.50.20130731-16.fc20

ワークステーションで「Hello World」アプリをコンパイルしたところ、ワークステーションとサーバーの両方でエラーなしで実行されました。

これはサーバーとワークステーションの両方で機能します

シェル 1:

$gdbserver localhost:2345 CrossTest

シェル 2:

$ gdb CrossTest
(gdb)target extended-remote localhost:2345
(gdb)run

これは動作しません

サーバ:

$ gdbserver workstation.ip.address:2345 CrossTest

ワークステーション:

$ gdb CrossTest
(gdb)target extended-remote server.ip.address:2345
(gdb)cont

GDB 出力

(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x00007f2a3b247d50 in ?? ()
(gdb) 

gdbserver は着信接続があることを通知しますが、hello world メッセージを書き込みません。

何か案は?

PS しばらく前に、この質問を linuxquestions.org に投稿しました。私はそれが適切なフォーラムではなかったと思うので、ここで運試しをしています。

4

1 に答える 1