move GOAL stack to GOAL memory (#114)

* move GOAL code stack to GOAL memory

* fix win arg reg and check rsp in debugger

* fix windows maybe and fix some incorrect logging formatters
This commit is contained in:
water111
2020-11-06 21:42:05 -05:00
committed by GitHub
parent c09541fa98
commit 71a894c393
10 changed files with 137 additions and 19 deletions
+5
View File
@@ -170,6 +170,11 @@ TEST(Debugger, SimpleBreakpoint) {
// instructions can be at most 15 bytes long.
EXPECT_TRUE(rip > expected_instr_before_rip && rip < expected_instr_before_rip + 15);
// check rsp in goal code to make sure the GOAL stack is in the right space.
auto rsp = compiler.get_debugger().get_regs().gprs[emitter::RSP];
EXPECT_TRUE(rsp < compiler.get_debugger().get_x86_base_addr() + EE_MAIN_MEM_SIZE);
EXPECT_TRUE(rsp > compiler.get_debugger().get_x86_base_addr() + EE_MAIN_MEM_SIZE - (16 * 1024));
EXPECT_TRUE(compiler.get_debugger().is_halted());
compiler.get_debugger().remove_addr_breakpoint(func_addr);
compiler.get_debugger().do_continue();