2016年10月20日
摘要: http://blog.csdn.net/nbabn/article/details/24984501 http://blog.csdn.net/zb872676223/article/details/37906049 阅读全文
posted @ 2016-10-20 14:45 邶风 阅读(154) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/xabc3000/article/details/6819867 http://www.cnblogs.com/xuxm2007/archive/2011/04/01/2002162.html http://blog.csdn.net/zb872676223 阅读全文
posted @ 2016-10-20 14:39 邶风 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 转自:http://blog.csdn.net/hanchaoman/article/details/5583457 汇编不懂,先把方法记下来。 glibc为我们提供了此类能够dump栈内容的函数簇,详见 /usr/include/execinfo.h(这些函数都没有提供man page,难怪我们找 阅读全文
posted @ 2016-10-20 14:34 邶风 阅读(767) 评论(0) 推荐(0) 编辑
摘要: 转载:http://www.nginx.cn/1521.html 如果开发板的操作系统也是linux,core调试方法依然适用。如果开发板上不支持gdb,可将开发板的环境(依赖库)、可执行文件和core文件拷贝到PC的linux下。在 PC上调试开发板上产生的core文件,需要使用交叉编译器自带的g 阅读全文
posted @ 2016-10-20 13:46 邶风 阅读(647) 评论(0) 推荐(0) 编辑
  2016年10月19日
摘要: 转载:http://blog.csdn.net/hanchaoman/article/details/5583457 在SIGSEGV的handler中调用gdb, 命令gdb [exec file] [pid]可以让gdb附加到这个进程上 阅读全文
posted @ 2016-10-19 17:58 邶风 阅读(556) 评论(0) 推荐(0) 编辑
摘要: nw.c void test_function (void){ unsigned char *ptr = 0x00; *ptr = 0x00;} int main (void){ test_function(); return 0;} gcc -g -o main nw.c 执行main,生成cor 阅读全文
posted @ 2016-10-19 16:56 邶风 阅读(684) 评论(0) 推荐(0) 编辑
  2016年10月18日
摘要: void dummy_function (void){ unsigned char *ptr = 0x00; *ptr = 0x00;} int main (void){ dummy_function (); return 0;} 1.core文件的生成开关和大小限制 uname -a 查看机器参数 阅读全文
posted @ 2016-10-18 18:02 邶风 阅读(600) 评论(0) 推荐(0) 编辑
摘要: 在bash里,这两个都是引号,用来表明字符串,区别是,双引号中的变量会被展开,而单引号中不再展开。举个例子:a="abc"echo "str=$a" # 结果显示 str=abcecho 'str=$a' # 结果显示str=$a 阅读全文
posted @ 2016-10-18 16:59 邶风 阅读(611) 评论(0) 推荐(0) 编辑
摘要: int *a = new int[4]; for(int i=0;i<4;i++) { a[i] = i; printf("a[%d]=%d\n", i, i); } delete[] a; return 0; 阅读全文
posted @ 2016-10-18 11:48 邶风 阅读(1152) 评论(0) 推荐(0) 编辑
  2016年10月17日
摘要: #define STR "xiamanman\n"#define STR_LEN 10#define STDOUT 1 #include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h> int main() 阅读全文
posted @ 2016-10-17 17:45 邶风 阅读(1146) 评论(0) 推荐(0) 编辑