Page 1 of 1
Remote debugging
Posted: Thu Nov 16, 2017 4:05 am
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?
Re: Remote debugging
Posted: Fri Nov 17, 2017 2:53 pm
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
Re: Remote debugging
Posted: Sat Nov 18, 2017 12:44 am
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.
Re: Remote debugging
Posted: Wed Mar 21, 2018 10:27 pm
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?
Re: Remote debugging
Posted: Wed Mar 21, 2018 10:35 pm
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?
Re: Remote debugging
Posted: Wed Mar 21, 2018 10:42 pm
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?
Re: Remote debugging
Posted: Wed Mar 21, 2018 11:03 pm
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.