mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
refactor(debugger): Move PF exception check into bitmask
Related-to: NEO-8617 Signed-off-by: Brandon Yates <brandon.yates@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3a21b3b228
commit
9c56a11c2e
@@ -802,7 +802,7 @@ void DebugSessionImp::generateEventsAndResumeStoppedThreads() {
|
||||
}
|
||||
|
||||
bool DebugSessionImp::isForceExceptionOrForceExternalHaltOnlyExceptionReason(uint32_t *cr0) {
|
||||
const uint32_t cr0ExceptionBitmask = 0xFC000000;
|
||||
const uint32_t cr0ExceptionBitmask = 0xFC010000;
|
||||
const uint32_t cr0ForcedExcpetionBitmask = 0x44000000;
|
||||
|
||||
return (((cr0[1] & cr0ExceptionBitmask) & (~cr0ForcedExcpetionBitmask)) == 0);
|
||||
@@ -826,7 +826,7 @@ void DebugSessionImp::fillResumeAndStoppedThreadsFromNewlyStopped(std::vector<Eu
|
||||
reg[1] = reg[1] | cr0PFBit16;
|
||||
writeRegistersImp(newlyStopped, ZET_DEBUG_REGSET_TYPE_CR_INTEL_GPU, 0, 1, reg.get());
|
||||
}
|
||||
if (isForceExceptionOrForceExternalHaltOnlyExceptionReason(reg.get()) && !allThreads[newlyStopped]->getPageFault()) {
|
||||
if (isForceExceptionOrForceExternalHaltOnlyExceptionReason(reg.get())) {
|
||||
bool threadWasInterrupted = false;
|
||||
|
||||
for (auto &request : pendingInterrupts) {
|
||||
|
||||
@@ -769,7 +769,7 @@ TEST(DebugSessionTest, givenThreadsStoppedWithPageFaultWhenCallingfillResumeAndS
|
||||
EuThread::ThreadId thread = {0, 0, 0, 0, 1};
|
||||
|
||||
sessionMock->newlyStoppedThreads.push_back(thread);
|
||||
sessionMock->onlyForceException = true;
|
||||
sessionMock->onlyForceException = false;
|
||||
|
||||
std::vector<EuThread::ThreadId> resumeThreads;
|
||||
std::vector<EuThread::ThreadId> stoppedThreads;
|
||||
|
||||
Reference in New Issue
Block a user