Shadow Stack  0.2
 All Classes Namespaces Files Functions Variables Typedefs Macros
dr_print_sym.hpp
Go to the documentation of this file.
1 
2 #ifndef __DR_PRINT_SYM_HPP__
3 #define __DR_PRINT_SYM_HPP__
4 
5 #include "dr_api.h"
6 
7 
9 struct Sym {
10  private:
12  using PrintFn = void ( * )( const char *const format, ... );
13 
15  static bool setup;
16 
17  public:
19  Sym() = delete;
20 
23  static void init();
24 
26  static void finish();
27 
30  static void print( const char *const description, const app_pc addr );
31 };
32 
33 #endif
Sym()=delete
Disable construction.
Wrap symbols in a static class.
Definition: dr_print_sym.hpp:9
static void finish()
This function should be called when the client terminates.
Definition: dr_print_sym.cpp:26
static void init()
The setup function for dr_print_sym Must be called by the DR client before print. ...
Definition: dr_print_sym.cpp:19
static void print(const char *const description, const app_pc addr)
Print symbol information for the what is located at addr description is a description of what the add...
Definition: dr_print_sym.cpp:33
void(*)(const char *const format,...) PrintFn
For clarity of the dependency injection below.
Definition: dr_print_sym.hpp:12
static bool setup
Record if syms is already setup.
Definition: dr_print_sym.hpp:15