Openwrt remote debugging

Source: Internet
Author: User

This article has been published by the author Wu Zhiqiang to authorize the Netease cloud community.

Welcome to the Netease cloud community to learn more about the operation experience of Netease technology products.


This article takes the WFD program as an example:

1. fl gdbserver to the router firmware

On the host side, use make menuconfig to select the following two items.

1) Advanced Configuration Options (for developers) → toolchain options → build GDB

2) Utilities → gdbserver

As follows:



2. Compile the program.

On the host side, add target_cflags + =-ggdb3 To The makefile header of your program.

Then compile the software package and add the config_debug option during compilation. Otherwise, the symbol table cannot be found during debugging. You can also enable global settings: Global build Settings> compile packages with debugging info.

Command:

3. Enable gdbserver.

After the compilation is successful, upload and install the software package on the vro through SSH, and run the gdbserver command to start the program. You can specify the port here.

Command syntax: gdbserver <local_ip >:< port> <program> <ARGs>

The last line is the output after the gdb connection, which can be ignored here.

4. Remote debugging

Connect to the server on the host side.

Command Format:

Remote-GDB serverip: Port executable


You can use the gdb command for normal debugging.



The Netease cloud free trial hall provides over 20 cloud products at zero cost!

For more information about Netease technologies, products, and operations, click.


Related Articles:
[Recommended] 360 ° perspective: Evolution of cloud native architecture
[Recommended] Spring boot + mybatis multi-data source configuration for read/write splitting
[Recommendation] comprehensive popularity of AI

Openwrt remote debugging

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.