linux/unix 段错误捕获【续】
[root@redhat tcpBreak]# g++ -g test.cpp ./libtest.so
- signal[8] catched when running code at 8048ab3
- signal[8] catched when running code at 4001771b
- signal[8] catched when running code at 400176fd
- [root@redhat tcpBreak]# addr2line 8048ab3 4001771b 400176fd -s -C -f -e a.out
- main
- test.cpp:15
- ??
- ??:0
- ??
- ??:0
- [root@redhat tcpBreak]# addr2line 4001771b 400176fd -s -C -f -e libtest.so
- ??
- ??:0
- ??
- ??:0
- -------------------------- 进程挂掉时的MAPS文件 --------------------------
- 08048000-08049000 r-xp 00000000 00:09 17256 /mnt/hgfs/share/net/tcpBreak/a.out
- 08049000-0804a000 rw-p 00001000 00:09 17256 /mnt/hgfs/share/net/tcpBreak/a.out
- 0804a000-0804b000 rwxp 00000000 00:00 0
- 40000000-40015000 r-xp 00000000 08:02 271023 /lib/ld-2.3.2.so
- 40015000-40016000 rw-p 00014000 08:02 271023 /lib/ld-2.3.2.so
- 40016000-40017000 rw-p 00000000 00:00 0
- 40017000-40018000 r-xp 00000000 00:09 17255 /mnt/hgfs/share/net/tcpBreak/libtest.so
- 40018000-40019000 rw-p 00000000 00:09 17255 /mnt/hgfs/share/net/tcpBreak/libtest.so
- 40019000-4001b000 rw-p 00000000 00:00 0
- 40026000-400cf000 r-xp 00000000 08:02 350892 /usr/lib/libstdc++.so.5.0.3
- 400cf000-400d4000 rw-p 000a9000 08:02 350892 /usr/lib/libstdc++.so.5.0.3
- 400d4000-400d9000 rw-p 00000000 00:00 0
- 400d9000-400fa000 r-xp 00000000 08:02 286922 /lib/tls/libm-2.3.2.so
- 400fa000-400fb000 rw-p 00020000 08:02 286922 /lib/tls/libm-2.3.2.so
- 400fb000-40102000 r-xp 00000000 08:02 271272 /lib/libgcc_s-3.2.2-20030225.so.1
- 40102000-40103000 rw-p 00007000 08:02 271272 /lib/libgcc_s-3.2.2-20030225.so.1
- 40103000-40104000 rw-p 00000000 00:00 0
- 42000000-4212e000 r-xp 00000000 08:02 286920 /lib/tls/libc-2.3.2.so
- 4212e000-42131000 rw-p 0012e000 08:02 286920 /lib/tls/libc-2.3.2.so
- 42131000-42133000 rw-p 00000000 00:00 0
- bfffd000-c0000000 rwxp ffffe000 00:00 0
- -------------------------------------------------------------------------
- --------------------------- 进程挂掉时的栈帧 --------------------------
- signal[8] catched when running code at 8048ab3
- signal[8] catched when running code at 4001771b
- signal[8] catched when running code at 400176fd
- -------------------------------------------------------------------------
- [root@redhat tcpBreak]# addr2line 71b 6fd -s -C -f -e libtest.so
- a()
- lib.cpp:14
- b()
- lib.cpp:10
- [root@redhat tcpBreak]# addr2line 8048ab3 -s -C -f -e a.out
- main
- test.cpp:15
- [root@redhat tcpBreak]# addr2line 71b 6fd -s -C -f -e libtest.so
- a()
- lib.cpp:14
- b()
- lib.cpp:10
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。