Add another kernel test, fix small bugs (#156)

* temp

* run function in process test

* windows debug

* debug

* update

* update

* again

* update

* fix same bug in debugger
This commit is contained in:
water111
2020-12-10 20:26:40 -05:00
committed by GitHub
parent e05f3ceefc
commit ba919a069c
10 changed files with 131 additions and 22 deletions
+3 -3
View File
@@ -193,8 +193,8 @@ void Debugger::update_break_info() {
int rip_offset = 0;
if (m_continue_info.valid && m_continue_info.is_addr_breakpiont) {
int offset_in_fmem = int(m_continue_info.addr_breakpoint.goal_addr) -
(map_loc.start_addr + info->offset_in_seg);
int offset_in_fmem = uint64_t(m_continue_info.addr_breakpoint.goal_addr) -
uint64_t(map_loc.start_addr + info->offset_in_seg);
if (offset_in_fmem < 0 || offset_in_fmem >= int(function_mem.size())) {
m_break_info.disassembly_failed = true;
} else {
@@ -580,7 +580,7 @@ void Debugger::update_continue_info() {
update_break_info();
}
auto kv = m_addr_breakpoints.find(get_regs().rip - 1);
auto kv = m_addr_breakpoints.find(get_regs().rip - m_debug_context.base - 1);
if (kv == m_addr_breakpoints.end()) {
m_continue_info.subtract_1 = false;
m_continue_info.is_addr_breakpiont = false;