
调试技术
淡泊的猪
对的事情,坚持做
展开
-
内存泄露调试经验
使用mallinfo确定是否有内存泄露:static struct mallinfo mi1,mi2;static struct timeval oldTime, currentTime;#define MALLOC_STAT_TIME (60)void sk_factory_test_malloc_stat(void){ gettimeofday (&currentTime, ...原创 2018-05-16 09:34:46 · 5944 阅读 · 0 评论 -
How Does a C Debugger Work? (GDB Ptrace/x86 example)
原文出处:https://blog.0x972.info/?d=2014/11/13/10/40/50-how-does-a-debugger-workWhen you use GDB, you can see that it has a complete control over your application process. Hit Ctrl-C while the application...转载 2018-05-24 10:29:54 · 435 阅读 · 0 评论 -
Linux signal捕获
signal的原理这里不打算多讲,这里主要讲一下应用man 7 signal,可以看到一些关于signal的介绍:每个信号都对应着一个action,默认的有:Term, Ign,core,Stop,Cont, 文档上明确的写着是以进程为修改单位的,所有的线程的action都相同:The signal disposition is a per-process attribute: in...原创 2019-01-14 09:36:33 · 1716 阅读 · 0 评论 -
AddressSanitizer
sanitizersThis project is the home for Sanitizers: AddressSanitizer, MemorySanitizer, ThreadSanitizer, LeakSanitizer, and more The actual code resides in the LLVM repository. Here we keep extended do...原创 2019-07-03 10:03:52 · 6054 阅读 · 0 评论 -
linux core文件解析
Linux ELF core filesA core file is essentially a snapshot of the process and its state right before it cored(crashed or dumped). A core file is a type of ELF file that is primarily made up of progra...原创 2019-07-05 17:08:52 · 3882 阅读 · 0 评论