fix(l0debug): windows topology map should always be created

Topology map was only being created when ZET_ENABLE_PROGAM_DEBUGGING was
set.  This was not correct.  Now it is unconditionally created at init,
and debug attach will fail if it is not valid.

Related-to: LOCI-3937

Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
This commit is contained in:
Yates, Brandon
2023-03-22 21:43:29 +00:00
committed by Compute-Runtime-Automation
parent f1c64adb3c
commit 0f6140deb0
4 changed files with 35 additions and 13 deletions

View File

@@ -35,6 +35,13 @@ DebugSession *DebugSession::create(const zet_debug_config_t &config, Device *dev
auto debugSession = createDebugSessionHelper(config, device, 0, nullptr);
debugSession->setAttachMode(isRootAttach);
if (debugSession->getTopologyMap().count(0) == 0) {
result = ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
PRINT_DEBUGGER_ERROR_LOG("Topology map not valid, debug session cannot be created\n");
delete debugSession;
debugSession = nullptr;
return debugSession;
}
result = debugSession->initialize();
if (result != ZE_RESULT_SUCCESS) {
debugSession->closeConnection();