Fix Source Level Debugger scenario

- when Program is compiled and linked, kernel debug options must be
added when linking
- when linking by CompilerInterface, store debugData in Program

Change-Id: Ie93a8fa7586681b94307a30c109c103f78ec861a
This commit is contained in:
Hoppe, Mateusz
2018-12-05 10:58:08 +01:00
committed by sys_ocldev
parent a39660de92
commit 3d35bf4291
9 changed files with 142 additions and 61 deletions

View File

@@ -131,17 +131,11 @@ cl_int Program::compile(
internalOptions.append(platform()->peekCompilerExtensions());
if (isKernelDebugEnabled()) {
internalOptions.append(CompilerOptions::debugKernelEnable);
options.append(" -g ");
if (pDevice->getSourceLevelDebugger()) {
if (pDevice->getSourceLevelDebugger()->isOptimizationDisabled()) {
options.append("-cl-opt-disable ");
}
std::string filename;
pDevice->getSourceLevelDebugger()->notifySourceCode(sourceCode.c_str(), sourceCode.size(), filename);
if (!filename.empty()) {
options = std::string("-s ") + filename + " " + options;
}
std::string filename;
appendKernelDebugOptions();
notifyDebuggerWithSourceCode(filename);
if (!filename.empty()) {
options = std::string("-s ") + filename + " " + options;
}
}