title: Remotely debugging a Linux process from Windows with gdb and gdbserver: what exactly is needed on the Windows side?
body: <p>I am running Eclipse CDT on Windows to develop C code that is built &amp; tested on remote Linux systems. Currently, the code is never compiled on Windows.</p>
  
  <p>I am able to use CDT to begin the remote process on the Linux target under gdbserver, and then attach gdb from the Windows host. However, gdb immediately fails with errors like:</p>
  
  <pre><code>warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
  of GDB.  Attempting to continue with the default i386 settings.
  [...]
  Remote 'g' packet reply is too long: 74afe9bff0aee9bf02000000f4af4a00a0aee9bf[...]
  </code></pre>
  
  <p>Debugging between two Linux systems works fine, so it's clear that I'm doing something wrong on the Windows host side. My specific questions are:</p>
  
  <ul>
  <li><p>Is the Cygwin version of gdb sufficient to debug remote Linux processes, or do I need a special cross-gdb in order to run it on Windows <em>and</em> work with Linux processes? If so, is there anywhere can I get hold of such a gdb?</p></li>
  <li><p>Remote debugging with gdb requires that symbols are available on the host system. What is the easiest way to achieve this? Can I just copy the symbols produced by the build on the Linux target to the Windows host, or do have to get a full build going on Windows? Is there a way to avoid this requirement, such that I can supply symbols only on the target?</p></li>
  </ul>
  
  <p>Thanks,</p>
  
  <p>-R</p>
  
  <hr>
  
  <p><strong>More info:</strong> The <a href="http://wiki.eclipse.org/TM_and_RSE_FAQ#How_can_I_do_Remote_Debugging_with_CDT.3F" rel="noreferrer">RSE FAQ</a> provides some pointers, but unfortunately I'm still blocked. The FAQ describes two approaches:</p>
  
  <ul>
  <li>Launch the gdb client on the remote system over ssh. Problem here is that certain fields in the CDT debug launcher are tied to the local system (project path, executable path etc...).</li>
  <li>Build/obtain a cross-debugging version of gdb that supports debugging Linux processes from Windows. Problem here is that there's little info on how to achieve this.</li>
  </ul>
  
  <p>I have also raised <a href="http://www.eclipse.org/forums/index.php?t=msg&amp;goto=553452&amp;S=1e7173b141211ca05ccc69abaca8d4f7#msg_553452-" rel="noreferrer">this issue on the CDT forum</a>.</p>