在程序运行结束时,“泄漏检查满”“显示泄漏种类”以如下节的形式显示了一些泄漏事件,举个例子:
[...]
==12522==
==12522== x bytes in 1 blocks are still reachable in loss record y of z
==12522== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==12522== by 0x42350D: whatever_1 (whatever_1.c:3401)
==12522== by 0x4225B9: whatever_2 (whatever_2.c:2948)
==12522== by 0x41D93E: whatever_3 (whatever_3.c:1185)
==12522== by 0x423A07: whatever_4 (whatever_4.c:1370)
==12522== by 0x4294A4: whatever_5 (whatever_5.y:1413)
==12522== by 0x403998: whatever_6 (whatever_6.c:205)
==12522== by 0x4038AC: whatever_7 (whatever_7.c:180)
==12522== by 0x4036AF: whatever_8 (whatever_8.c:143)
==12522== by 0x413C7F: whatever_test_0 (whatever_9.c:53)
==12522== by 0x413F92: whatever_tests (whatever_10.c:177)
==12522== by 0x45AD69: run_tests (whatever_11.c:153)
==12522==
[...]最上面的作用域是main,在多个块中,比如这个块,有足够的深度,调用堆栈不会显示到main中。在其他的事件中,有足够的上下文来显示每一个层次。
我已经看到,在这个主机中,这里只显示了12个级别(vg_replace_malloc.c,然后是我的11个用户级别)。
可以配置为显示超过12个级别吗?
我读过Val差尔参数,Memcheck参数,增加了冗长,但没有成功。
发布于 2019-08-11 16:59:52
使用选项--num-callers (默认值为12):
--num-callers=<number> show <number> callers in stack traces [12]https://stackoverflow.com/questions/57451721
复制相似问题