fix: Fix check for sysfs entry at debugger init time

Related-to: NEO-12656

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
This commit is contained in:
Brandon Yates 2024-09-13 19:34:05 +00:00 committed by Compute-Runtime-Automation
parent 97ce5ff68e
commit 9b68736074
2 changed files with 7 additions and 1 deletions

View File

@ -264,6 +264,7 @@ void Device::initializeCommonResources() {
if (rootDeviceEnvironment->debugger == nullptr) {
NEO::printDebugString(NEO::debugManager.flags.PrintDebugMessages.get(), stderr,
"Debug mode is not enabled in the system.\n");
getExecutionEnvironment()->setDebuggingMode(DebuggingMode::disabled);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -18,6 +18,11 @@ std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
if (!hwInfo.capabilityTable.l0DebuggerSupported) {
return nullptr;
}
auto osInterface = device->getRootDeviceEnvironment().osInterface.get();
if (!osInterface || !osInterface->isDebugAttachAvailable()) {
return nullptr;
}
auto success = initDebuggingInOs(device->getRootDeviceEnvironment().osInterface.get());
if (success) {
auto debugger = debuggerL0Factory[device->getHardwareInfo().platform.eRenderCoreFamily](device);