| 16 | std::vector<TTD::GuestAddress> g_ret_stack2; |
| 17 | |
| 18 | void callCallback_diff(unsigned __int64 callback_value, TTD::GuestAddress addr_func, TTD::GuestAddress addr_ret, struct TTD::TTD_Replay_IThreadView* arg4) { |
| 19 | TTD::GuestAddress last_ret; |
| 20 | if (addr_ret == 0) { |
| 21 | // End of a call (RET's next instruction) |
| 22 | // `addr_func` is the instruction address |
| 23 | if (callback_value == 1) { |
| 24 | if (!g_func_stack.empty() && !g_ret_stack.empty()) { |
| 25 | g_func_stack.pop_back(); |
| 26 | last_ret = g_ret_stack.back(); |
| 27 | g_ret_stack.pop_back(); |
| 28 | assert(addr_func == last_ret); |
| 29 | } |
| 30 | } |
| 31 | else if (callback_value == 2) { |
| 32 | if (!g_func_stack2.empty() && !g_ret_stack2.empty()) { |
| 33 | g_func_stack2.pop_back(); |
| 34 | last_ret = g_ret_stack2.back(); |
| 35 | g_ret_stack2.pop_back(); |
| 36 | assert(addr_func == last_ret); |
| 37 | } |
| 38 | } |
| 39 | return; |
| 40 | } |
| 41 | |
| 42 | if (callback_value == 1) { |
| 43 | g_func_stack.push_back(addr_func); |
| 44 | g_ret_stack.push_back(addr_ret); |
| 45 | } |
| 46 | else if (callback_value == 2) { |
| 47 | g_func_stack2.push_back(addr_func); |
| 48 | g_ret_stack2.push_back(addr_ret); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | |
| 53 | struct Snapshot { |
nothing calls this directly
no outgoing calls
no test coverage detected