Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-debug-dev] Remote gdb debug doesn't work

Hi,
 
This mailing list is only for developers working on CDT code.  Please use the eclipse.tools.cdt newsgroup for usability questions in the future.  http://www.eclipse.org/newsgroups/index_project.php
 
To debug remotely, you will generally need:
1. A compiler toolchain to cross-compile for the target you're using (the linux server in your case).   In other words, you need a compiler that is run on your windows machine but will output a binary that will run on your linux server.
2. A specially built gdb located on your windows host that targets your linux server architecture.  A matching gdbserver on your linux server.  This is done during compilation of gdb by specifying the host and target configurations. 
3. On your windows host, a copy of the linux server shared libraries (the ones used by your linux server program).
 
Your workflow should be something like:
1. Within Eclipse, build your program on the windows host using the compiler toolchain that cross-compiles for your linux server machine. 
2. Download the resulting binary to your linux server.
3. On your linux server, start up the gdbserver session on the binary you downloaded.
4. Within Eclipse,  create a new C/C++ Local Application launch configuration.    Specify "gdbserver Debugger" as the debugger on the Debugger Tab. Specify the gdb built to target your linux server. Fill in the connection details for the gdbserver connection on the Connection Tab within the Debugger Tab.  Specify the location of the copy of the shared libraries from your linux server host on your windows host.
 
I can't comment on using Cygwin.  My usual workflow is a linux machine to another host.
 
Ewa.
 


From: cdt-debug-dev-bounces@xxxxxxxxxxx [mailto:cdt-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of Eclipse User
Sent: Tuesday, June 26, 2007 11:02 PM
To: cdt-debug-dev@xxxxxxxxxxx
Subject: [cdt-debug-dev] Remote gdb debug doesn't work

Hello
 I have had tough time today trying to remotely debug my C server code running using gdbserver on Linux Server. I am trying to remotely debug this application using  gdb from Eclipse on Windows machine whic has cygwin.

Is it possible to debug C application running on Linux from Eclipse running on Windows? My C code doesn't compile on windows machine. I am totally lost.

Thanks in advance for any help in this regard

Vick


Boardwalk for $500? In 2007? Ha!
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.

Back to the top