When I run gdbserver to listen for port and connect remotely with gdb:
gdbserver --multi 0.0.0.0:4444
target remote 192.168.1.99 4444
In gdb . How can I connect to pid with
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.Sign up to join this community
You have two options there, you could attach to a running process with GDB server or spawn it.
gdbserver 0.0.0.0:44444 --attach <PID>
or run GDB server and then from the connected GDB client lunch
gdbserver 0.0.0.0:44444 <program> <args>
If you need a list of running process on the remote machine, you can lunch
info os processes from your GDB client once connected to the remote server.