Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6690521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:38:48+00:00 2026-05-26T05:38:48+00:00

Can I debug a program running on a remote target to which I have

  • 0

Can I debug a program running on a remote target to which I have ssh access, using local source files?

Say I’ve got a program called hello.c, in directory /home/jla/hello on my home machine.

And on the remote machine I put this same file in a directory /hello, and compile it with
$ gcc -g -o hello hello.c, and then delete the remote hello.c, but leave the executable.

Can I then run gdb locally, get it to ssh in to the remote machine to run the executable, but use the local sources as reference?

Notes:

  1. Annoyingly, the remote machine is very stripped down and can’t be altered. It has gdb, but it doesn’t have gdbserver

  2. Note that the local and the remote machine have different architectures. In this particular case 64bit and 32bit intel

  3. What I really want to do is run it under emacs/gud. But this would be a great start.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:38:49+00:00Added an answer on May 26, 2026 at 5:38 am

    The architectures of remote and local machines matter very little. What matters is how hello, gdb and gdbserver are built.

    It sounds from your description that hello is built (on remote machine) for x86_64-linux-gnu

    That means you need x86_64-linux-gnu gdbserver, and also a 32-bit GDB that is capable of debugging x86_64 binaries. You should be able to build both, copy gdbserver to the remote machine, and debug “normally”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a server-socket running in an android application, which I debug using the emulator.
I have a messy stored procedure which uses dynamic sql. I can debug it
How can I use Eclipse to debug a (C/C++) console program running external from
I can't find an option to stop a running program (whether in debug or
Is there any virtual machine to test Android? How can I debug the program
When trying to debug a program on Windows I can't seem to find where
Is there any profiler sort of tool which can debug which javascript/object in the
In accordance with the steps from MSDN , I can debug .net framework source
0xE8000003A Error: I have developed AppOne for several weeks. I can debug on both
I have acustom sharepoint page. on my machine I can debug the code normaly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.