Skip to content

coder-drinker/dead_code_analyzer

 
 

Repository files navigation

DeadCode Detection Tool

Using DynamoRIO and XED to find redundant executions (Dead code)

poster-Feijiang Han

Important

This tool aims to detect and analyze dead code (redundant executions) in binary files using DynamoRIO and XED. Here, I implement a basic logic to detect dead writes and reads

The process can be summarized as follows:

  1. Obtain the binary file (trace) that needs to be parsed.
  2. Extract the necessary code from DynamoRIO for parsing the target binary. This step gathers detailed information about instructions, such as read/write operations and parameter details.
  3. Utilize Intel XED to decode register details and analyze fine-grained parameters.
  4. Modify the dead code detection logic in dead_code_analysis.cpp. The implementation includes detecting redundant reads and redundant writes.
  5. The results of the analysis will be output to the 'out' file, which can be further analyzed.

TODO:

  • Optimize the output format for better readability.
  • Implement more sophisticated dead code detection logic.

For more information and access to the source code, please refer to the project repository.

About

Using DynamoRIO and XED to find redundant executions (Dead code)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 92.3%
  • C++ 7.6%
  • CMake 0.1%