I am trying to remote debug applications on a server in my local network.
Server:
$ 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"
Workstation:
$ 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
I compiled a "Hello World" app on the workstation and it runs without errors on both workstation and server.
This works on both server and workstation
Shell 1:
$gdbserver localhost:2345 CrossTest
Shell 2:
$ gdb CrossTest
(gdb)target extended-remote localhost:2345
(gdb)run
This does not work
Server:
$ gdbserver workstation.ip.address:2345 CrossTest
Workstation:
$ gdb CrossTest
(gdb)target extended-remote server.ip.address:2345
(gdb)cont
GDB output
(gdb) cont
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x00007f2a3b247d50 in ?? ()
(gdb)
gdbserver tells me that there is an incomming connection, but it doesn't write my hello world message.
Any ideas?
P.S. I allready posted this question on linuxquestions.org a while ago. I don't think that was the right forum, so I am trying my luck here.