CTF-All-In-One/doc/5.2.3_valgrind.md

25 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2018-03-24 18:51:04 +07:00
# 5.2.3 Valgrind
2018-05-29 20:51:00 +07:00
- [简介](#简介)
- [使用方法](#使用方法)
- [VEX IR](#vex-ir)
- [参考资料](#参考资料)
## 简介
2018-08-05 16:43:10 +07:00
Valgrind 是一个用于内存调试、内存泄漏检测以及性能分析的动态二进制插桩工具。Valgrind 由 core 以及基于 core 的其他调试工具组成。core 类似于一个框架,它模拟了一个 CPU 环境,并提供服务给其他工具,而其他工具以插件的形式利用 core 提供的服务完成各种特定的任务。
2018-05-29 20:51:00 +07:00
## 使用方法
## VEX IR
2018-08-05 16:43:10 +07:00
2018-05-29 20:51:00 +07:00
VEX IR 是 Valgrind 所使用的中间表示,供 DBI 使用,后来这一部分被分离出去作为 libVEXlibVEX 负责将机器码转换成 VEX IR转换结果存放在 cache 中。
顺便,再简单提一下其他的类似用途的 IR 还有BAP、REIL、LLVM、TCG 等。
## 参考资料
2018-08-05 16:43:10 +07:00
2018-05-29 20:51:00 +07:00
- [Valgrind: A Framework for Heavyweight Dynamic Binary Instrumentation](http://valgrind.org/docs/valgrind2007.pdf)
- [Optimizing Binary Code Produced by Valgrind](https://pdfs.semanticscholar.org/6761/acf36975d38fd5f616cb4798bfa3a92cbfa3.pdf)
- [libvex_ir.h](https://github.com/angr/vex/blob/dev/pub/libvex_ir.h)