Enable branch tracing for hardware breakpoints
This commit is contained in:
parent
a9ef15c526
commit
3fce9f6fdd
@ -89,6 +89,17 @@ namespace utils::hardware_breakpoint
|
||||
}
|
||||
}
|
||||
|
||||
void set_branch_tracing(const bool enabled, CONTEXT& context)
|
||||
{
|
||||
set_bits(context.Dr7, 8, 1, enabled ? 1 : 0);
|
||||
}
|
||||
|
||||
void set_branch_tracing(const bool enabled, const uint32_t thread_id)
|
||||
{
|
||||
debug_context context(thread_id);
|
||||
set_branch_tracing(enabled, context);
|
||||
}
|
||||
|
||||
uint32_t activate(const uint64_t address, uint32_t length, const condition cond, CONTEXT& context)
|
||||
{
|
||||
const auto index = find_free_index(context);
|
||||
|
@ -11,6 +11,10 @@ namespace utils::hardware_breakpoint
|
||||
read_write = 3
|
||||
};
|
||||
|
||||
|
||||
void set_branch_tracing(bool enabled, CONTEXT& context);
|
||||
void set_branch_tracing(bool enabled, uint32_t thread_id = GetCurrentThreadId());
|
||||
|
||||
uint32_t activate(uint64_t address, uint32_t length, condition cond, CONTEXT& context);
|
||||
uint32_t activate(void* address, uint32_t length, condition cond, uint32_t thread_id = GetCurrentThreadId());
|
||||
uint32_t activate(uint64_t address, uint32_t length, condition cond, uint32_t thread_id = GetCurrentThreadId());
|
||||
|
Loading…
Reference in New Issue
Block a user