MCPcopy Create free account
hub / github.com/WheretIB/nullc / BeginCallStack

Method BeginCallStack

NULLC/Executor_X86.cpp:1718–1742  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1716}
1717
1718void ExecutorX86::BeginCallStack()
1719{
1720 int count = 0;
1721 if(!NULLC::abnormalTermination)
1722 {
1723 if(NULLC::dataHead->instructionPtr)
1724 {
1725 genStackPtr = (void*)(intptr_t)NULLC::dataHead->instructionPtr;
1726 NULLC::dataHead->instructionPtr = ((int*)(intptr_t)NULLC::dataHead->instructionPtr)[-1];
1727 unsigned int *paramData = &NULLC::dataHead->nextElement;
1728 while((unsigned)count < (NULLC::STACK_TRACE_DEPTH - 1) && paramData)
1729 {
1730 NULLC::stackTrace[count++] = paramData[-1];
1731 paramData = (unsigned int*)(long long)(*paramData);
1732 }
1733 }
1734 NULLC::stackTrace[count] = 0;
1735 NULLC::dataHead->instructionPtr = (unsigned int)(intptr_t)genStackPtr;
1736 }else{
1737 while((unsigned)count < NULLC::STACK_TRACE_DEPTH && NULLC::stackTrace[count++]);
1738 count--;
1739 }
1740
1741 callstackTop = NULLC::stackTrace + count - 1;
1742}
1743
1744unsigned int ExecutorX86::GetNextAddress()
1745{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected