MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / seg_mapper

Method seg_mapper

source/kernel/kthread.cpp:1254–1267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1252// bit 4 - 0 = n/a, 1 = fault was an instruction fetch
1253
1254void KThread::seg_mapper(U32 address, bool readFault, bool writeFault, bool throwException) {
1255 if (this->process->sigActions[K_SIGSEGV].handlerAndSigAction!=K_SIG_IGN && this->process->sigActions[K_SIGSEGV].handlerAndSigAction!=K_SIG_DFL) {
1256 this->process->sigActions[K_SIGSEGV].sigInfo[0] = K_SIGSEGV;
1257 this->process->sigActions[K_SIGSEGV].sigInfo[1] = 0;
1258 this->process->sigActions[K_SIGSEGV].sigInfo[2] = 1; // SEGV_MAPERR
1259 this->process->sigActions[K_SIGSEGV].sigInfo[3] = address;
1260 this->runSignal(K_SIGSEGV, EXCEPTION_PAGE_FAULT, (writeFault?2:0));
1261 if (throwException) {
1262 throw 2;
1263 }
1264 } else {
1265 this->memory->logPageFault(this, address);
1266 }
1267}
1268
1269// motorhead demo installer, tomb raider 3 demo will trigger this
1270void KThread::seg_access(U32 address, bool readFault, bool writeFault, bool throwException) {

Callers 7

readbMethod · 0.80
writebMethod · 0.80
readwMethod · 0.80
writewMethod · 0.80
readdMethod · 0.80
writedMethod · 0.80
startExceptionMethod · 0.80

Calls 2

runSignalMethod · 0.95
logPageFaultMethod · 0.80

Tested by

no test coverage detected