C Valgrind不显示行号
我读过无数关于这方面的问题,但没有一个答案有用 我不能发布我的代码,因为有太多,但我会提供我的makefile行和valgrind信息 我使用gcc-std=c99-Wall src/main.c src/filein.c src/make_game.c-g-O0-Iinclude-o bin/rogue-lncurses进行编译 我运行valgrind时使用以下命令:valgrind-leak check=full/home/pi/rogue/rogue/bin/rogue assets/room.txt 我的输出:C Valgrind不显示行号,c,line,valgrind,C,Line,Valgrind,我读过无数关于这方面的问题,但没有一个答案有用 我不能发布我的代码,因为有太多,但我会提供我的makefile行和valgrind信息 我使用gcc-std=c99-Wall src/main.c src/filein.c src/make_game.c-g-O0-Iinclude-o bin/rogue-lncurses进行编译 我运行valgrind时使用以下命令:valgrind-leak check=full/home/pi/rogue/rogue/bin/rogue assets/ro
==2939== Memcheck, a memory error detector
==2939== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==2939== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==2939== Command: /home/pi/rogue/rogue/bin/rogue assets/room.txt
==2939==
==2939==
==2939== HEAP SUMMARY:
==2939== in use at exit: 117,855 bytes in 197 blocks
==2939== total heap usage: 306 allocs, 109 frees, 121,129 bytes allocated
==2939==
==2939== 900 bytes in 6 blocks are definitely lost in loss record 1 of 4
==2939== at 0x4835978: malloc (in /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so)
==2939==
==2939== LEAK SUMMARY:
==2939== definitely lost: 900 bytes in 6 blocks
==2939== indirectly lost: 0 bytes in 0 blocks
==2939== possibly lost: 0 bytes in 0 blocks
==2939== still reachable: 116,955 bytes in 191 blocks
==2939== suppressed: 0 bytes in 0 blocks
==2939== Reachable blocks (those to which a pointer was found) are not shown.
==2939== To see them, rerun with: --leak-check=full --show-reachable=yes
==2939==
==2939== For counts of detected and suppressed errors, rerun with: -v
==2939== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 19 from 6)
此输出对我没有任何帮助,如果有人能提供帮助,我将不胜感激。您的输出没有显示太多行号问题,而是整个回溯太短,因为它只显示malloc函数,而不显示调用者
您可以尝试使用更新的Valgrind版本。您的3.7.0版本已经有好几年的历史了,同时在ARM系统的回溯方面也有了改进。我正在我的pi上运行这个Valgrind,我如何更新它?当我尝试用apt get升级它时,我被告知我有最新的版本。作为对上述的回应,我尝试从源代码安装valgrind,显然我的体系结构不受支持。我不能在我的Pi和Mac上使用Valgrind。。。伟大的