--break_on_debugbreak

This commit is contained in:
Ben Vanik
2015-02-01 11:38:16 -08:00
parent f60677f359
commit 5f3ab7979f
3 changed files with 6 additions and 1 deletions

View File

@@ -9,6 +9,7 @@
#include "alloy/backend/x64/x64_emitter.h"
#include "alloy/alloy-private.h"
#include "alloy/backend/x64/x64_backend.h"
#include "alloy/backend/x64/x64_code_cache.h"
#include "alloy/backend/x64/x64_function.h"
@@ -371,7 +372,9 @@ void X64Emitter::Trap(uint16_t trap_type) {
case 22:
// Always trap?
// TODO(benvanik): post software interrupt to debugger.
db(0xCC);
if (FLAGS_break_on_debugbreak) {
db(0xCC);
}
break;
default:
PLOGW("Unknown trap type %d", trap_type);