DPDK(四):GDB调试
来源:互联网 发布:最小截图软件下载 编辑:程序博客网 时间:2024/06/05 03:09
参考:http://blog.csdn.net/linzhaolover/article/details/9794285
用户态的好处是可以GDB,需要在编译时添加-g,且不进行编译优化
1、设置环境变量
- export RTE_SDK=`pwd`
- export RTE_TARGET=i686-default-linuxapp-gcc
- export EXTRA_CFLAGS="-O0 -g"
2、然后编译
make
make -C examples RTE_SDK=$(pwd) RTE_TARGET=build O=$(pwd)/build/examples
3、运行
root@ubuntu:/opt/code/dpdk-1.8.0# gdb examples/helloworld/build/helloworldGNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1Copyright (C) 2014 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law. Type "show copying"and "show warranty" for details.This GDB was configured as "i686-linux-gnu".Type "show configuration" for configuration details.For bug reporting instructions, please see:<http://www.gnu.org/software/gdb/bugs/>.Find the GDB manual and other documentation resources online at:<http://www.gnu.org/software/gdb/documentation/>.For help, type "help".Type "apropos word" to search for commands related to "word"...Reading symbols from examples/helloworld/build/helloworld...(no debugging symbols found)...done.(gdb) set args -c f -n 4(gdb) rStarting program: /opt/code/dpdk-1.8.0/examples/helloworld/build/helloworld -c f -n 4[Thread debugging using libthread_db enabled]Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".EAL: Cannot read numa node link for lcore 0 - using physical package id insteadEAL: Detected lcore 0 as core 0 on socket 0EAL: Cannot read numa node link for lcore 1 - using physical package id insteadEAL: Detected lcore 1 as core 1 on socket 0EAL: Cannot read numa node link for lcore 2 - using physical package id insteadEAL: Detected lcore 2 as core 0 on socket 1EAL: Cannot read numa node link for lcore 3 - using physical package id insteadEAL: Detected lcore 3 as core 1 on socket 1EAL: Support maximum 128 logical core(s) by configuration.EAL: Detected 4 lcore(s)EAL: unsupported IOMMU type!EAL: VFIO support could not be initializedEAL: Setting up memory...EAL: cannot open /proc/self/numa_maps, consider that all memory is in socket_id 0EAL: Ask a virtual area of 0x200000 bytesEAL: Virtual area found at 0xb7600000 (size = 0x200000)EAL: Ask a virtual area of 0x2c00000 bytesEAL: Virtual area found at 0xb4800000 (size = 0x2c00000)EAL: Ask a virtual area of 0x3800000 bytesEAL: Virtual area found at 0xb0e00000 (size = 0x3800000)EAL: Ask a virtual area of 0x200000 bytesEAL: Virtual area found at 0xb0a00000 (size = 0x200000)EAL: Ask a virtual area of 0x400000 bytesEAL: Virtual area found at 0xb0400000 (size = 0x400000)EAL: Ask a virtual area of 0x200000 bytesEAL: Virtual area found at 0xb0000000 (size = 0x200000)EAL: Ask a virtual area of 0x200000 bytesEAL: Virtual area found at 0xafc00000 (size = 0x200000)EAL: Ask a virtual area of 0x600000 bytesEAL: Virtual area found at 0xaf400000 (size = 0x600000)EAL: Requesting 59 pages of size 2MB from socket 0[New Thread 0xaf3ffb40 (LWP 20175)]EAL: TSC frequency is ~2494365 KHzEAL: Master core 0 is ready (tid=b7da3800)PMD: ENICPMD trace: rte_enic_pmd_init[New Thread 0xaebfeb40 (LWP 20176)]EAL: Core 1 is ready (tid=aebfeb40)[New Thread 0xae3fdb40 (LWP 20177)]EAL: Core 2 is ready (tid=ae3fdb40)[New Thread 0xadbfcb40 (LWP 20178)]EAL: Core 3 is ready (tid=adbfcb40)EAL: PCI device 0000:02:01.0 on NUMA socket -1EAL: probe driver: 8086:100f rte_em_pmdEAL: 0000:02:01.0 not managed by UIO driver, skippingEAL: PCI device 0000:02:06.0 on NUMA socket -1EAL: probe driver: 8086:100f rte_em_pmdEAL: 0000:02:06.0 not managed by UIO driver, skippinghello from core 0hello from core 1hello from core 3hello from core 2[Thread 0xadbfcb40 (LWP 20178) exited][Thread 0xae3fdb40 (LWP 20177) exited][Thread 0xaebfeb40 (LWP 20176) exited][Thread 0xb7da3800 (LWP 20164) exited][Inferior 1 (process 20164) exited normally](gdb) b rte_eal_initBreakpoint 1 at 0x80b9b70(gdb) set args -c f -n 4(gdb) rStarting program: /opt/code/dpdk-1.8.0/examples/helloworld/build/helloworld -c f -n 4[Thread debugging using libthread_db enabled]Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".Breakpoint 1, 0x080b9b70 in rte_eal_init ()(gdb) bt#0 0x080b9b70 in rte_eal_init ()#1 0x0805fd2c in main ()(gdb)
阅读全文
0 0
- DPDK(四):GDB调试
- GDB 调试(四)
- GDB调试程序(四)
- GDB程序调试(四)
- 用GDB调试程序(四)
- 用GDB调试程序(四)
- 用GDB调试程序(四)
- 用GDB调试程序(四)
- 用GDB调试程序(四)
- 用GDB调试程序(四)
- 用GDB调试程序(四)
- 用GDB调试程序(四)
- 用GDB调试程序(四)
- 用GDB调试程序(四)
- 用GDB调试程序(四)
- 用GDB调试程序(四)
- 用GDB调试程序(四)
- 用GDB调试程序(四)
- 如何判断电脑IP是内网IP还是外网IP
- Maven <Profiles>定义不同环境的参数变量
- LeetCode: 479. Largest Palindrome Product
- C语言之可重入函数 && 不可重入函数
- H2数据库操作
- DPDK(四):GDB调试
- A
- Java常见面试(15)
- 工厂模式
- Python爬虫入门案例
- 服务--service
- java02_java继承中的问题
- java基本概念
- Excel学习2_使用jxl.jar操作Excel之使用createSheet(String,int)要注意int的编号