2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2019-02-27 11:39:32 +01:00
|
|
|
* Copyright (C) 2017-2019 Intel Corporation
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
#include "runtime/helpers/debug_helpers.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
#include "runtime/os_interface/debug_settings_manager.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
#include <assert.h>
|
|
|
|
|
#include <cstdio>
|
|
|
|
|
|
|
|
|
|
namespace OCLRT {
|
|
|
|
|
void debugBreak(int line, const char *file) {
|
|
|
|
|
if (DebugManager.flags.EnableDebugBreak.get()) {
|
|
|
|
|
printf("Assert was called at %d line in file:\n%s\n", line, file);
|
|
|
|
|
assert(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void abortUnrecoverable(int line, const char *file) {
|
|
|
|
|
printf("Abort was called at %d line in file:\n%s\n", line, file);
|
|
|
|
|
abortExecution();
|
|
|
|
|
}
|
|
|
|
|
} // namespace OCLRT
|