Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

181
Views
Remote debugging problems

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.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Compiling with -ggdb instead of -g AND using target remote instead of extended-remote did it.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!