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
linux/unix 段错误捕获_转的更多相关文章
- linux/unix 段错误捕获【续】
本文为“在C/C++中捕获段错误,打印出错的具体位置”的续篇,进一步解决涉及动态链接库的情况. 背景知识: ·linux/unix下动态链接库的基本原理 ·/proc/pid/maps文件的基本格 ...
- Linux的段错误调试方法
linux段错误的调试方法 相关博文: http://blog.csdn.net/htianlong/article/details/7439030 http://www.cnblogs.com/pa ...
- Linux 下段错误 core文件
什么是core dump? core的意思是内存,dump的意思是扔出来,堆出来:当一个程序奔溃时,在进程当前工作目录的core文件中复制了该进程的存储图像.core文件仅仅是一个内存映像(同时加上调 ...
- golang 程序 在linux 出现 段错误
刚做的 golang 程序 发布到linux 竟然出现 段错误 原因是 内核版本过低,请升级内核
- Linux下段错误(C语言)
问题描述:在Linux下编程有时会出现段错误的提醒,出现这种错误有可能是因为以下几种原因 1.数组越界:如果在初始化或者接收输入时内容超过了定义好的数组元素个数时会出现段错误,Linux的数组越界检查 ...
- gdb调试段错误及使用
在编程调试中,经常出现段错误,此时可用gdb调试.具体方法为注册段错误信号处理函数,在处理函数中启动gdb.具体代码如下: void segv_handler(int no) { ]; ]; FILE ...
- C/C++捕获段错误,打印出错的具体位置(精确到哪一行)_转
转自:C/C++捕获段错误,打印出错的具体位置(精确到哪一行) 修订:2013-02-16 其实还可以使用 glibc 的 backtrace_symbols 函数,把栈帧各返回地址里面的数字地址翻译 ...
- C/C++捕获段错误,打印出错的具体位置(精确到哪一行)
修订:2013-02-16 其实还可以使用 glibc 的 backtrace_symbols 函数,把栈帧各返回地址里面的数字地址翻译成符号描述的 修订:2011-06-11 背景知识: · 在li ...
- linux Segmentation faults 段错误详解
什么是段错误 下面是来自 Answers.com 的定义: A segmentation fault (often shortened to segfault) is a particular err ...
随机推荐
- 使用Apache FtpServer
Java大法一统天下.遇到任何问题,先查一下Java中的解决方案. 地球上的许多事情,在Java中都能找到完美的解决方案. FtpServer是apache MINA项目的一个子项目,它实现了一个ft ...
- Python 绘图库的使用:matplotlib
Matplotlib 官方API地址:https://matplotlib.org/ 例子: import matplotlib.pyplot as plt num_list=[1.5,0.6,7.8 ...
- php数据库操作类(转)
<?php Class DB { private $link_id; private $handle; private $is_log; private $t ...
- 区块链的java实现
原文地址:http://blog.csdn.net/xiangzhihong8/article/details/53931213 本文90%来着于翻译,原文地址:http://java-lang-pr ...
- SQL Server 2005/2008遍历所有表更新统计信息
DECLARE UpdateStatisticsTables CURSOR READ_ONLY FOR 02 SELECT sst.name, 03 Schema_name(ss ...
- android语音识别方法
http://www.apkbus.com/forum.php?mod=viewthread&tid=3473 android语音识别方法一:使用intent调用语音识别程序 1. 说明 以下 ...
- Error parsing XML: not well-formed (invalid token) 报错
鼠标右键选择Source然后再选Format 就可以解决此问题
- Linux时间子系统(六) POSIX timer
一.前言 在用户空间接口函数文档中,我们描述了和POSIX timer相关的操作,主要包括创建一个timer.设定timer.获取timer的状态.获取timer overrun的信息.删除timer ...
- Intelligence System (hdu 3072 强联通缩点+贪心)
Intelligence System Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Othe ...
- STM32F4—fsmc的配置步骤
0:开启GPIO时钟和FSMC时钟 1:配置GPIO 2:配置片选控制寄存器 3:配置片选时序寄存器 4:配置写入时序寄存器 GPIO_InitTypeDef GPIO_InitStructure;/ ...