Remote debugging

General questions regarding the usage of CodeLite
fargnoli
CodeLite Curious
Posts: 6
Joined: Thu Nov 16, 2017 3:57 am
Genuine User: Yes
IDE Question: ABC
Contact:

Remote debugging

Post by fargnoli »

I've checked the Debugging a remote target checkbox, and entered the hostname and port. However, when I choose Debugger-->Attach to process..., all I get is a list of local processes. Can you point me to any documentation on attaching the CodeLite debugger to a gdb server running on a remote host?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Remote debugging

Post by eranif »

GDB connects to the remote gdb-server instance.
You need to start the remote gdb-server to be able to debug a remote process
Make sure you have read the HOW TO POST thread
fargnoli
CodeLite Curious
Posts: 6
Joined: Thu Nov 16, 2017 3:57 am
Genuine User: Yes
IDE Question: ABC
Contact:

Re: Remote debugging

Post by fargnoli »

So, CodeLite reaches out to the host and looks for an instance of gdb server? Thanks. I'll have to try that when my colleague returns after Thanksgiving. It's his Linux board we're trying to connect to.
fargnoli
CodeLite Curious
Posts: 6
Joined: Thu Nov 16, 2017 3:57 am
Genuine User: Yes
IDE Question: ABC
Contact:

Re: Remote debugging

Post by fargnoli »

Still does not work. All I get is a dialog listing local processes even though the project settings include a checkmark for remote debugging and the IP address of the host where gdbserver is running. There's gotta be some configuration setting I'm just missing. Any ideas?
fargnoli
CodeLite Curious
Posts: 6
Joined: Thu Nov 16, 2017 3:57 am
Genuine User: Yes
IDE Question: ABC
Contact:

Re: Remote debugging

Post by fargnoli »

Every time I start the Codelite debugger, the gdbserver on the remote host prints:

Remote debugging from host 10.100.2.173
readchar: Got EOF
Remote side has terminated connection. GDBserver will reopen the connection.

So, I am a little bit closer than I thought. I thought I had to use the Attach to Process command on the Debug menu, but it seems to be trying to attach and failing as soon as I kick off the debugger. Any idea why Codelite is sending EOF? More importantly, how can I stop Codelite from sending EOF? Do I have to point Codelight to the local copy of the executable somehow?
fargnoli
CodeLite Curious
Posts: 6
Joined: Thu Nov 16, 2017 3:57 am
Genuine User: Yes
IDE Question: ABC
Contact:

Re: Remote debugging

Post by fargnoli »

I went into the project's General settings and pointed it to the executable, but now I just get a new error stating that there was an error creating the process. This is the underlying problem. I need to attach to an existing process, but the GUI doesn't have a way to do that. Oddly, the gdbserver spit out the same information. I am not sure what Codelight is doing. How do I attach to a remote process?
fargnoli
CodeLite Curious
Posts: 6
Joined: Thu Nov 16, 2017 3:57 am
Genuine User: Yes
IDE Question: ABC
Contact:

Re: Remote debugging

Post by fargnoli »

I don't have any virtual folders, unlike what's described here:

How can I add an existing file?

First you need to have a project (see above). Go to the workspace tab, expand the workspace and the project. You will notice two virtual folders by default "Source files" and "Header files". Right click either of them and hit "add existing file" to add the file to that folder.
Post Reply