Turnstone Operating System
|
debug implementation More...
#include <debug.h>
#include <hashmap.h>
#include <memory.h>
#include <logging.h>
#include <systeminfo.h>
#include <linker.h>
#include <memory/paging.h>
Classes | |
struct | debug_breakpoint_t |
Typedefs | |
typedef enum debug_breakpoint_type_t | debug_breakpoint_type_t |
typedef struct debug_breakpoint_t | debug_breakpoint_t |
Enumerations | |
enum | debug_breakpoint_type_t { DEBUG_BREAKPOINT_TYPE_SINGLE_TIME } |
Functions | |
MODULE ("turnstone.lib") | |
static const char_t * | debug_get_symbol_name_by_symbol_name_offset (uint64_t symbol_name_offset) |
int8_t | debug_init (void) |
initializes debug More... | |
uint64_t | debug_get_symbol_address (const char_t *symbol_name) |
gets function address by function name More... | |
void | debug_put_single_time_breakpoint_at_address (uint64_t address) |
puts 0xcc (int3) instruction to address More... | |
void | debug_remove_single_time_breakpoint_from_address (uint64_t address) |
removes 0xcc (int3) instruction from address More... | |
void | debug_put_breakpoint_at_symbol (const char_t *symbol_name) |
puts 0xcc (int3) instruction to function More... | |
void | debug_remove_breakpoint_from_symbol (const char_t *symbol_name) |
removes 0xcc (int3) instruction from function More... | |
uint8_t | debug_get_original_byte (uint64_t address) |
gets original byte from address More... | |
void | debug_revert_original_byte_at_address (uint64_t address) |
sets original byte to address More... | |
void | debug_put_debug_for_address (uint64_t address) |
sets dr0 to address and enables dr0 More... | |
void | debug_put_debug_for_symbol (const char_t *symbol_name) |
sets dr0 to function and enables dr0 More... | |
void | debug_remove_debug_for_address (uint64_t address) |
disables dr0 More... | |
Variables | |
hashmap_t * | debug_location_map = NULL |
hashmap_t * | debug_symbol_map = NULL |
debug implementation
This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.
gets original byte from address
address | address to get original byte |
gets function address by function name
function_name | function name |
int8_t debug_init | ( | void | ) |
initializes debug
void debug_put_breakpoint_at_symbol | ( | const char_t * | function_name | ) |
puts 0xcc (int3) instruction to function
function_name | function name to put breakpoint |
void debug_put_debug_for_address | ( | uint64_t | address | ) |
sets dr0 to address and enables dr0
address | address to set dr0 |
void debug_put_debug_for_symbol | ( | const char_t * | function_name | ) |
sets dr0 to function and enables dr0
function_name | function name to set dr0 |
void debug_put_single_time_breakpoint_at_address | ( | uint64_t | address | ) |
puts 0xcc (int3) instruction to address
address | address to put breakpoint |
void debug_remove_breakpoint_from_symbol | ( | const char_t * | function_name | ) |
removes 0xcc (int3) instruction from function
function_name | function name to remove breakpoint |
void debug_remove_debug_for_address | ( | uint64_t | address | ) |
disables dr0
address | address to disable dr0 |
void debug_remove_single_time_breakpoint_from_address | ( | uint64_t | address | ) |
removes 0xcc (int3) instruction from address
address | address to remove breakpoint |
void debug_revert_original_byte_at_address | ( | uint64_t | address | ) |
sets original byte to address
address | address to set original byte |