SlickEdit Community
SlickEdit Product Discussion => SlickEdit® => Topic started by: Bwana The Bigg on January 10, 2023, 10:57:06 AM
-
Hello!
I am running gdbserver on a remote computer with my program:
> $ gdbserver 192.168.10.24:1436 ./server 1426
> Process ./server created; pid = 1045784
> Listening on port 1436
Then I try to connect to it from slickedit using pulldown Debug>>Attach Debugger>>Attach to Remote Process (GDB). gdbserver reports:
> Remote debugging from host 192.168.10.24, port 44974
slickedit freezes and after a while displays a window with the message:
> Error starting debugger. GDB returned an error attaching to the remote process
> "ptrace: No such process"
The behavior is the same when selecting both the "built-in" gdb and the one installed in the system.
If I run gdb from the command line everything works as it should
-
You have it listening on port 1436, but you try to attach to port 44974 ?
-
Port 1436 is the port that the gdbserver is listening on. If it accepts a connection, and it does accept it, then the new socket and port (44974) for the session communication is returned to the debugger from the connection request. gdbserver also reports it to stdout. However, the slickedit debugger doesn't get a socket, hangs waiting for connect() to return, and exits by timeout. "Regular" gdb from the command line connects and works fine, unlike
-
Which port are you putting gin the "Attach to Remote Process (GDB)" dialog? It should be 1436. I do not see how you make the jump from 1436 to 44974 otherwise.
-
Yes, I enter 1436 in the panel you are asking about.
The exchange involves two parties -- gdbserver and gdb. gdbserver is started remotely and listens on port 1436. This port is entered on the gdb side in the panel you are talking about and I enter exactly it -- 1436.
(@) Connect via socket
Host [192.168.10.1]
Port [1436]
-
We have a logging subsystem for the GDB integration. So try this:
1) Macro > Set Macro Variable... > def_debug_logging = 1
2) Debug > Attach debugger > Attach to Remote Process (GDB)... (like you have done)
3) Let it do it's thing
4) Macro > Set Macro Variable... > def_debug_logging = 0
5) The trace will be in your slickedit configuration directory: <config>/logs/debug.log
6) Attach that here and I'll look it over.