38 #define bfcolor_green "\033[1;32m" 39 #define bfcolor_red "\033[1;31m" 41 #define bfcolor_end "\033[0m" 42 #define bfcolor_debug "\033[1;32m" 43 #define bfcolor_warning "\033[1;33m" 44 #define bfcolor_error "\033[1;31m" 45 #define bfcolor_func "\033[1;36m" 46 #define bfcolor_line "\033[1;35m" 55 #define __FUNC__ static_cast<const char *>(__PRETTY_FUNCTION__) 67 template<
class V,
class T>
68 void output_to_vcpu(V
vcpuid, T func)
104 std::cout << bfcolor_debug << "DEBUG" << bfcolor_end << ": " 117 std::cerr << bfcolor_warning << "WARNING" << bfcolor_end << ": " 130 std::cerr << bfcolor_error << "ERROR" << bfcolor_end << ": " 143 std::cerr << bfcolor_error << "FATAL ERROR" << bfcolor_end << ": " 154 #define INFO(...) printf(__VA_ARGS__) 155 #define DEBUG(...) printf("[BAREFLANK DEBUG]: " __VA_ARGS__) 156 #define ALERT(...) printf("[BAREFLANK ERROR]: " __VA_ARGS__) 164 #if defined(__linux__) 165 #include <linux/module.h> 166 #define INFO(...) printk(KERN_INFO __VA_ARGS__) 167 #define DEBUG(...) printk(KERN_INFO "[BAREFLANK DEBUG]: " __VA_ARGS__) 168 #define ALERT(...) printk(KERN_ALERT "[BAREFLANK ERROR]: " __VA_ARGS__) 179 #define INFO(...) DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, __VA_ARGS__) 180 #define DEBUG(...) DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "[BAREFLANK DEBUG]: " __VA_ARGS__) 181 #define ALERT(...) DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL, "[BAREFLANK ERROR]: " __VA_ARGS__) 191 #include <IOKit/IOLib.h> 192 #define INFO(...) IOLog(__VA_ARGS__) 193 #define DEBUG(...) IOLog("[BAREFLANK DEBUG]: " __VA_ARGS__) 194 #define ALERT(...) IOLog("[BAREFLANK ERROR]: " __VA_ARGS__)
const void * view_as_pointer(const T val)