如何远程调试运行在嵌入式设备上的用户空间程序?

1. 安装gdbserver程序到嵌入式设备

2. 在嵌入式设备上运行gdbserver作为代理(agent)
    $ gdbserver :<port> <your_app>

3. 在宿主机上运行cross gdb
    $ your-cross-gdb
    (gdb) file <your_app> (指定带调试信息的应用程序)

    (gdb) set sysroot <your_root_fs> (指定根文件系统,用来搜索库)
    (gdb) target remote <target ip>:<port> (连接嵌入式设备上的代理)


原文地址:https://www.cnblogs.com/dakewei/p/12326798.html