Gdb:
http://ftp.gnu.org/gnu/gdb/
Termcap:
http://ftp.gnu.org/gnu/termcap/
tar-zxvf termcap-1.3.1.tar.gz
1. Compiling termcap-1.3.1
a)./configure--host=arm-linux--prefix=/home/jkf5773/workspace/gdb/gdb-2/install--without-ada-- Enable-termcap--with-shared
If other such as MIPS platform, then--host=mipsel-linux
B) make
C) make install
2. Compile gdb-7.6
a)./configure--host=arm-linux--enable-shared--prefix=/home/jkf5773/workspace/gdb/gdb-2/install--without-x-- DISABLE-GDBTK--disable-tui--without-included-regex--without-included-gettext LDFLAGS= "-L/home/jkf5773/workspace /gdb/gdb-2/install/lib "cppflags="-i/home/jkf5773/workspace/gdb/gdb-2/install/include "
if other such as MIPS platform, then--host= Mipsel-linux
B) Make
C) do install
D) can find the GDB executable under Gdb-7.6\gdb, in Gdb-7.6\gdb\ Gdbserver you can find the Gdbserver executable,
Name the GDB command arm-linux-gdb gdbserver named Arm-linux-gdbserver
3, GDB Cross version use
Equipment ip:192.168.1.110
pcip:192.168.1.5
A) device side
./arm-linux-gdbserver 192.168.1.110:1234 Hello
b) PC PC side
Arm-linux-gdb Hello
c) Remote to the device after entering GDB
Target Remote 192.168.1.110:1234
D) After successful connection
PC-Side tips:
Remote Debugging using 192.168.1.110:1234
Malformed packet (b) (missing colon): ore:0;
Packet: ' t050b:00000000;0d:30edf4be;0f:b0f70040;thread:3cb;core:0; '
Device-Side tips:
Remote Debugging from Host 192.168.1.5
Readchar:got EOF
Remote side has terminated connection. GDBserver'll reopen the connection.
Listening on port 1234
Cross version Gdb:arm-linux-gdbserver runs on the device side, GDB runs on the PC, the Arm-linux-gdbserver file is small, so it takes up less memory space on the device.
While the local version of GDB:ARM-LINUX-GDB runs on the device side of the file is large
GDB porting (Cross version)