ECLIPSE-CDT with Gdbserver for remote debugging of ARM program

Source: Internet
Author: User
Tags gdb debugger

In the previous article, how to compile, run Arm-linux-gdb and Gdbserver, this article describes how to combine ECLIPSE-CDT for graphical compilation debugging

The first thing to do is to create the project with the CDT and add the source files.

    1. On the left side of Project Explorer, right-click->properties Enter project property settings
    2. Select C/C + + build->settings in tool Settings, change toolchain to arm version
      GCC c COMPILER:ARM-LINUX-GCCGCC C LINKER:ARM-LINUX-GCCGCC c Assembler:arm-linux-ar

      Other options are good by default and need to be modified by yourself



    3. [Optional] Build Steps Here you can fill in the compilation steps, I would like to compile the program automatically copied to the TFTPD directory to facilitate direct download of the arm side
      Then fill in the Command: post-build steps

      CP Ipcam/tftpboot

The compilation section is finished, and the debugging section follows

    1. Select Item--Menu bar "Run"->debug configurations ...
    2. Double-click Applecation to create a new configuration, eclipse initializes most of the configuration based on the currently selected project, just modify the debugger configuration page
    3. Choose to go to the debugger configuration page
      Debugger:
      Select Gdbserver Debugger
      Debugger Options:
      GDB Debugger This, if the previous article compiled the ARM-LINUX-GDB copy to the path directory, or the ARM-LINUX-GDB directory to join the path, then the direct fill arm-linux-gdb here, Otherwise browse directory Select the command with path shared libraries This, you can add a library path, such as the debugging process to step into the external function, you must give the debug information in the library file path, otherwise you will not find the definition of the function

      Connection this is the key: type select Tcp,host name or IP address to fill the arm side of the IP, the port number is default, this port number will be completed on the arm side when running Gdbserver
    4. All configurations complete, click Apple and then turn off the configuration page

Start debugging

      1. Running programs on the arm side
        # tftp-g-R ipcam 192.168.1.100# gdbserver 192.168.1.100:10000 Ipcam

        192.168.1.100 is the host IP 10000 is the previously set port

      2. Start debugging at Eclipse

ECLIPSE-CDT with Gdbserver for remote debugging of ARM program

Related Article

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.