Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to add gdbserver remote debugging for embedded Devices

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Embedded devices how to add gdbserver Remote Debugging, many novices are not very clear about this, in order to help you solve this problem, the following small series will explain in detail for everyone, there are people who need this can learn, I hope you can gain something.

A small embedded device, memory is small, flash is also small, even no gdb, here you can through gdbserver for Remote Debugging 1.1 download source code from ftp.gnu.org/gnu/gdb/Cross-compile gdb and gdbserver versions to be consistent

cd /gdb-7.6.1/gdb/gdbserver configure compilation

(1)configured

./ configure --host=mips64-octeon-linux-gnu --target=mips64-octeon-linux-gnu CC=mips64-octeon-linux-gnu-gcc --prefix=/home/install_lib/gdbserver

(2)source code compilation

make

(3)Install the executable to: /home/install_lib/gdbserver

make install

1.2 Download the compiled gdbserver executive program to the target machine

mips64-octeon-linux-gnu-gdbserver Download to target machine using tftp

1.3 Execute on target aircraft:

./ mips64-octeon-linux-gnu-gdbserver 172.16.105.111:8080 test1

test1 is an executable program

1.4. On the host machine (virtual machine or other Linux server):

Guide the corresponding gdb executable to the current path

export PATH:/usr/local/mips64/tools-3.1.2_build_49/bin:$PATH

Enter gdb gui debugging interface

mips64-octeon-linux-gnu-gdb -tui

1.5 remote connections

First load:file test1

target remote 172.16.105.165:8080

c

Enter gdb interface debugging

If you can't connect to the network, you can also debug it through serial port.

Did reading the above help you? If you still want to have further understanding of related knowledge or read more related articles, please pay attention to the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report