loki.transformations.drhook
Utility transformations to update or remove calls to DR_HOOK.
Functions
|
Remove unsed DRHOOK imports and corresponding handle. |
Classes
|
Re-write or remove the DrHook label markers either by appending a suffix string or by applying an explicit mapping. |
- class DrHookTransformation(suffix=None, rename=None, remove=False, kernel_only=True)
Bases:
Transformation
Re-write or remove the DrHook label markers either by appending a suffix string or by applying an explicit mapping.
In addition, calls to DR_HOOK can also be removed, including their enclosing inline-conditional.
- Parameters:
suffix (str) – String suffix to append to DrHook labels
rename (dict of str, optional) – Dict with explicit label rename mappings
remove (bool) – Flag to explicitly remove calls to
DR_HOOK
kernel_only (boolean) – Only apply to subroutines marked as “kernel”; default:
False
- recurse_to_internal_procedures = True
- transform_subroutine(routine, **kwargs)
Apply transformation to subroutine object