2017-01-30 33 views
0

我想記錄valgrind memcheck的xml和文本輸出結果。 我試過這個命令。Valgrind同時記錄xml.log和text.log

valgrind --tool=memcheck --xml=yes --log-file=TextLog.log --xml-file=XMLFile.log test 

但只有XML文件written.text文件沒有數據..

回答

0

無需使用工具選項將其設置爲「MEMCHECK」的,因爲在默認情況下的valgrind使用「MEMCHECK」作爲工具。只是爲了您的信息。 即使在使用工具選項中也沒有問題。

嘗試使用以下命令來獲取XML文件和日誌文件中的日誌。

valgrind --xml=yes --xml-file=XMLFile.log > Textlog.log 2>&1 test 

這是你期待的嗎?

的更多信息可在下面的鏈接中找到,

http://valgrind.org/docs/manual/manual-core.html#manual-core.basicopts