Objective:
The idea of this paper comes from embedded development, remote Debugging and Development Board under Linux. No more nonsense, let's get started!!
Windown End:
First, download and decompression MINIGW,
Download MINIGW from official website, unzip. (This example is placed in C \)
Ii. download and decompress GDB:
is: http://ftp.gnu.org/gnu/gdb/(this article takes gdb-7.2 as an example, put in C: \)
Iii. compiling gdb under the windowns
Run C:\MinGW\msys\1.0\msys.bat
$ CD C:
$ cd gdb-7.2
$./configure--target=i686-pc-linux-gnu--program-prefix=my---prefix=/home/gotohell/gdb-build
$ make
$ make Install
If successful, three subdirectories are generated in the directory specified by--prefix: Bin, lib, share, and the my-gdb we need is in the bin directory.
(C:\MinGW\msys\1.0\home\gotohell\gdb-build\bin\my-gdb.exe)
Special Note:
(1) 、--target= I686-pc-linux-gnu means that the target platform is the Linux kernel running in i686 architecture;
(2) 、--program-prefix=my-is the prefix of the generated executable file, such as My-gdb;
(3) 、--prefix is the directory in which the generated executable file is installed, which needs to be selected according to the actual situation. If the directory does not exist, it will be created automatically, of course, with sufficient permissions.
Iv. Configuration Tool Slickedi
Tools->options->debugging->configurations->add
Import the Gdb.exe file that you just generated.
Five, a new project, the source code and executable files under Linux are downloaded and imported into the project via FTP.
Vi. Debug->attachdebugger->gdb-> Attach to remote process
In the CONNECTT tab, file selects the executable file under Linux, the socket selects the remote Linux IP,
In the Remote Options tab, gdbconfiguration Select the GDB that was just newly added.
Ok!! Windowns under the set is successful!!!
Linux side: (GdB used must be of the same version)
First, download and decompression GDB:
is: http://ftp.gnu.org/gnu/gdb/(this article takes gdb-7.2 as an example, put in/root)
Ii. compiling gdb under Linux
$ TAR–XJVF gdb-7.2.tar.bz2
$ CD gdb-7.2
$./configure$ make
$ make Install
Third, compile Gdbserver under Linux
$ CD GDB
$ CD Gdbserver
$./configure--target=i686-pc-linux-gnu--host=i686-pc-linux-gnu
$ make
$ make Install
Special Note:
1. The--host here specifies the platform and system on which the executable file is built: The Linux system running on the i686 platform
Iv. Start Gdbserver
$ gdbserver Local IP: Open port pending Debug program
Ok!! Linux is set up successfully!!!
Postscript:
There are a lot of imperfect places, here is just a simple way to take the process once.
Windowns under the remote debugging Linux under the program (Mingw+gdb+slickedit+gdbserver) (needs to be perfected)