title: Is it possible to use gdb to debug remotely over ssh?
body: <p>Can I debug a program running on a remote target to which I have ssh access, using local source files?</p>
  
  <p>Say I've got a program called hello.c, in directory <code>/home/jla/hello</code> on my home machine.</p>
  
  <p>And on the remote machine I put this same file in a directory /hello, and compile it with 
  <code>$ gcc -g -o hello hello.c</code>, and then delete the remote hello.c, but leave the executable.</p>
  
  <p>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?</p>
  
  <p>Notes:</p>
  
  <ol>
  <li><p>Annoyingly, the remote machine is very stripped down and can't be altered. It has gdb, but it doesn't have gdbserver</p></li>
  <li><p>Note that the local and the remote machine have different architectures. In this particular case 64bit and 32bit intel</p></li>
  <li><p>What I really want to do is run it under emacs/gud. But this would be a great start.</p></li>
  </ol>