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 ...
随机推荐
- nyoj------擅长排列的小明
擅长排列的小明 时间限制:1000 ms | 内存限制:65535 KB 难度:4 描述 小明十分聪明,而且十分擅长排列计算.比如给小明一个数字5,他能立刻给出1-5按字典序 ...
- poj-------Common Subsequence(poj 1458)
Common Subsequence Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 34477 Accepted: 13 ...
- Redis下载和安装
原文地址:https://redis.io/download Download Redis uses a standard practice for its versioning: major.min ...
- oracle11g本地可以访问但局域网无法访问
问题描述,现在有两台电脑 A 和 B : 1)电脑 A 上有 Oracle11G服务端: ip地址 192.168.1.198; 端口1521: 2)电脑 A 本机连接数据库正常,可以登录及操作等: ...
- VS2012开发cocos游戏遇到问题汇总
1.编译成android时.须要改动jni/android.mk,每一个cpp都改动一下太麻烦,能够让他自己主动识别. # 遍历文件夹及子文件夹的函数 define walk $(wildcard $ ...
- yii2 数据库操作详解(转载)
开始使用数据库首先需要配置数据库连接组件,通过添加 db 组件到应用配置实现("基础的" Web 应用是 config/web.php),DSN( Data Source Name ...
- mac下安装mysqlcient 报错
一.我在mac下pip3安装mysqlclient 报错: pip3 install mysqlclient Collecting mysqlclient Using cached mysqlclie ...
- php里面的注解(通过反射获取注解)
/** * Created by PhpStorm. * User: Administrator * Date: 2018\10\12 0012 * Time: 14:30 */ /** * clas ...
- mini2440裸机音乐播放器(非常久曾经的笔记)
[这是好久曾经写的.有点乱,没时间整理.当做记录用的.] 图片粘贴失效.没上传图,想要的直接下载文档吧. 项目目的:通过IIS,触摸屏,LCD模块实现音乐播放器功能(button上一首.下一首.播放. ...
- [hihoCoder] #1158 : 质数相关
时间限制:2000ms 单点时限:1000ms 内存限制:256MB 描述 两个数a和 b (a<b)被称为质数相关,是指a × p = b,这里p是一个质数.一个集合S被称为质数相关,是指S中 ...