Module cwe_checker_lib::utils::symbol_utils
source · Expand description
Helper functions for common tasks utilizing extern symbols, e.g. searching for calls to a specific extern symbol.
Functions
- Find the extern symbol object for a symbol name and return the symbol tid and name.
- Match direct calls’ target tids in the program’s subroutines with the tids of the external symbols given to the function. When a match was found, add a triple of (caller name, callsite tid, callee name) to a vector. Lastly, return the vector with all callsites of all given external symbols.
- Find calls to TIDs contained as keys in the given symbol map. For each match return the block containing the call, the jump term representing the call itself and the symbol corresponding to the TID from the symbol map.
- Get a map from TIDs to the corresponding extern symbol struct.
- Get a map from TIDs to the corresponding extern symbol struct.