CGDB Remote Debugging

Source: Internet
Author: User
cgdb Remote Debugging

Can be downloaded from the official website of Cgdb http://cgdb.github.io/
Tutorial:
Linux installation Cgdb
Using CGDB to debug installing in embedded system

Cgdb depends on Libreadline and ncurses development libraries.

$./configure–prefix=/usr/local/cgdb
$ make
$ sudo make install
$ ln-s/usr/local/cgdb/bin/cgdb/usr/local/bin/cgdb CGDB installation process encountered problems

Error occurred:
Configure:error:CGDB requires Curses.h or ncurses/curses.h to build.
Solution:
sudo apt-get install Libncurses5-dev Libncursesw5-dev

Error occurred:
Configure:error:Please Install makeinfo before installing
Solution:
sudo apt-get install autoconf automake

sudo apt-get install Texinfo
sudo apt-get install Libreadline6 Libreadline6-dev

Error occurred:
Configure:error:Please Install flex before installing
Solution:
sudo apt-get install Flex cross-compilation

$ sudo./configure–prefix=/usr/local/arm-cgdb/–program-suffix=-arm-linux–target= ARM-LINUX-GNUEABIHF
$ sudo make-k-j 4//virtual machine configured with 2 CPUs, set up 4 thread compilation
$ sudo make install
$ ln-s/usr/local/arm-cgdb/bin/cgdb-arm-linux/usr/local/bin/cgdb-arm-linux remote Debugging

Remote Development Board Execution Gdbserver:
# gdbserver–remote-debug:8080 LGW

PC with the-D parameter can set target GDB, and target to remote IP, can achieve remote debugging:
$ cgdb-d arm-linux-gnueabihf-gdb LGW
(GDB) Target remote 10.205.0.193:8080

The GUI is shown in the following illustration:

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.