How it works...

First, we log in to our target system as root and install gdbserver, unless it is already installed. Once installation is complete, we log in again with user credentials and run gdbserver, passing the name of the application to debug, the IP address, and the port to listen to for incoming connections as its parameters.

Then, we switch to our build system and run the GDB there. However, instead of running the application in the GDB directly, we instruct the GDB to initiate a connection to a remote host using the provided IP address and port. After that, all commands you type at the GDB prompt will be transferred to gdbserver and executed there.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.244.216