Skip to content

General principles

tmatis edited this page Mar 26, 2023 · 1 revision

General principles

Steps

  1. The host program initializes the symbolizer

    The symbolizer is used to get the function name column number and line number from the address of a function. It can be llvm-symbolizer or addr2line. It's lifetime is the same as the host program.

  2. It will run the program to debug to fetch all functions to test with the library.

    It will run the program to debug with the library and the library will send all functions hooked to test to the host program. The host program will store them in a binary tree. as a symbolized backtrace.

  3. It will test all functions by running the program for each function to test.

    To know if a function call should be blocked or not the library will compare the backtrace of the function called with the one in the shared memory. If the backtrace is the same the function call should be blocked. The error to return is defined in the hook function.

Clone this wiki locally