Local debugger fixes and extensions

- Adds q/quit option to console debugging
- Adds options (variable_prefix)
- Breaks into debugger with Ctrl-C in local debug mode (Unix/Windows)
- Added option to list all breakpoints
- Fixes add/remove breakpoint bug (invalid path parsing)
- Minor cleanup
This commit is contained in:
Blazej Floch
2018-02-11 06:08:37 -05:00
parent 9b1fdad035
commit c45f44d856
9 changed files with 209 additions and 45 deletions

View File

@ -152,6 +152,25 @@ void RedirectIOToConsole() {
// point to console as well
}
BOOL WINAPI HandlerRoutine(_In_ DWORD dwCtrlType) {
if (ScriptDebugger::get_singleton() == NULL)
return FALSE;
switch (dwCtrlType) {
case CTRL_C_EVENT:
ScriptDebugger::get_singleton()->set_depth(-1);
ScriptDebugger::get_singleton()->set_lines_left(1);
return TRUE;
default:
return FALSE;
}
}
void OS_Windows::initialize_debugging() {
SetConsoleCtrlHandler(HandlerRoutine, TRUE);
}
void OS_Windows::initialize_core() {
crash_handler.initialize();