Files
compute-runtime/core/helpers/debug_helpers.cpp
Jobczyk, Lukasz 882a216688 Move Debug helpers to the core dir
Related-To: NEO-3677

Change-Id: I2c98595190fadfa8ffd9e378e774c0d4485cbf9e
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
2019-09-05 16:00:35 +02:00

27 lines
617 B
C++

/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "core/helpers/debug_helpers.h"
#include "runtime/os_interface/debug_settings_manager.h"
#include <assert.h>
#include <cstdio>
namespace NEO {
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 NEO