GDB porting (Cross version)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.