- 官方的教學文件: http://valgrind.org/docs/manual/manual-writing-tools.html
- 朋友的筆記, 基本上就是跑完官方文件, 有修正一點官方文件過舊的地方(autotool): https://github.com/wdv4758h/notes/blob/797f11e8d09edc761f38cc72254ee6f8e53d857f/valgrind/new-plugin.rst
- 閱讀程式碼, nulgrind 是空的 tool, lackey 是很簡單的 tool.
先說結論, valgrind internal 的技術文件很少, 大部份已經過舊. 最新的 valgrind internal 相關的論文是 2007 年發的, 技術文件最新且相對完整的是官方基於 valgrind 3.3 寫的技術文件(有出成書).
- valgrind internal 論文: http://valgrind.org/docs/pubs.html
- valgrind 3.3 技術文件: http://valgrind.org/docs/manual/manual.html
- Fossies 幫忙 host 的 valgrind doxygen (請自行將 url 的版本號換成最新版的 valgrind): http://fossies.org/dox/valgrind-3.11.0
另外, 非官方的技術文件中有找到一篇很棒的, 是在解釋 libVEX 如何 instrument code 的 8 個步驟, 包含 native to VEX IR, VEX IR instrumentation, VEX IR to native 的過程.
- libVEX 8 步驟解釋: http://publicclu2.blogspot.tw/2013/05/notes-on-valgrind.html
朋友閱讀 2007 valgrind paper 的筆記
我跟專題隊友研究 record-replay debugger on valgrind 時留下的 slide 跟筆記.
slide 雖然是在介紹 RR on valgrind, 但中間有很大篇幅在講解 valgrind internal 中我們已經理解的部份, 應該會對初次想研究 valgrind internal 的朋友有幫助.
筆記很貼近程式碼, 是我跟隊友因為 valgrind 程式碼不易閱讀, 而在閱讀過程中留下一些幫助下次閱讀的筆記, 基本上應該只對要看程式碼的人有幫助.
我們有著墨到的部份主要是 Core/Tool Architecture, libVEX translate, Core 的 Translation Table/Cache, Scheduler, System Call Handling, Tool Interface.
- slide: https://docs.google.com/presentation/d/1s90qUFLgHqVX0NdCDvSp859LJLU_v3Ep5aQLz9p26QQ/edit?usp=sharing
- 筆記: https://github.com/u1240976/valgrindrr_note
- 朋友整理的 valgrind 相關 tool: https://github.com/Grindland
- Taminoo - a simple valgrind tool for taint analysis: http://shell-storm.org/blog/Concolic-execution-taint-analysis-with-valgrind-and-constraints-path-solver-with-z3/
挖寶區, 我也還沒看過的資料.
FOSDEM 2014/2015 有些 valgrind 相關的 talks: https://github.com/wdv4758h/notes/blob/797f11e8d09edc761f38cc72254ee6f8e53d857f/valgrind/valgrind-talks.rst
特別感謝: 專題隊友 ruinland 跟一起研究 valgrind 的朋友 wdv4758h。