SlickEdit Product Discussion > SlickEdit®

Remote debugging with gdbserver failed

(1/2) > >>

Bwana The Bigg:
I am running gdbserver on a remote computer with my program:
> $ gdbserver ./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, 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 ?

Bwana The Bigg:
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.

Bwana The Bigg:
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 []
  Port [1436]


[0] Message Index

[#] Next page

Go to full version