fix debugger

This commit is contained in:
water
2021-08-11 20:21:58 -04:00
parent 3bba86ce18
commit a65357642d
3 changed files with 6 additions and 2 deletions
+1
View File
@@ -733,6 +733,7 @@ void clean_up_cond_no_else_final(Function& func, CondNoElseElement* cne) {
assert(branch);
if (branch_info_i.written_and_unused.find(reg->reg()) ==
branch_info_i.written_and_unused.end()) {
lg::error("Branch delay register used improperly: {}", reg->to_string(func.ir2.env));
throw std::runtime_error("Bad delay slot in clean_up_cond_no_else_final");
}
// assert(branch_info_i.written_and_unused.find(reg->reg()) !=
+2 -2
View File
@@ -78,9 +78,9 @@ static int gl_init() {
}
// request Debug OpenGL 3.3 Core
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); // 3.3
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); // 3.3
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GLFW_TRUE); // debug
// glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GLFW_TRUE); // debug
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // core profile, not compat
return 0;
+3
View File
@@ -600,6 +600,9 @@ void Debugger::watcher() {
case xdbg::SignalInfo::MATH_EXCEPTION:
printf("Target has crashed with a MATH_EXCEPTION! Run (:di) to get more information.\n");
break;
case xdbg::SignalInfo::DISAPPEARED:
printf("Target has disappeared. Maybe it quit or was killed.\n");
break;
default:
printf("[Debugger] unhandled signal in watcher: %d\n", int(signal_info.kind));
assert(false);