MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / load

Method load

pcsx2/DebugTools/DisassemblyManager.cpp:521–702  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521void DisassemblyFunction::load()
522{
523 generateBranchLines();
524
525 // gather all branch targets
526 std::set<u32> branchTargets;
527 for (size_t i = 0; i < lines.size(); i++)
528 {
529 switch (lines[i].type)
530 {
531 case LINE_DOWN:
532 branchTargets.insert(lines[i].second);
533 break;
534 case LINE_UP:
535 branchTargets.insert(lines[i].first);
536 break;
537 }
538 }
539
540 u32 funcPos = address;
541 u32 funcEnd = address+size;
542
543 SymbolInfo nextData = cpu->GetSymbolGuardian().SymbolAfterAddress(
544 funcPos-1, ccc::GLOBAL_VARIABLE | ccc::LOCAL_VARIABLE);
545 u32 opcodeSequenceStart = funcPos;
546 while (funcPos < funcEnd)
547 {
548 if (funcPos == nextData.address.value && nextData.size > 0)
549 {
550 if (opcodeSequenceStart != funcPos)
551 addOpcodeSequence(opcodeSequenceStart,funcPos);
552
553 DisassemblyData* data = new DisassemblyData(cpu,funcPos,nextData.size,DATATYPE_WORD);
554 entries[funcPos] = data;
555 lineAddresses.push_back(funcPos);
556 funcPos += data->getTotalSize();
557
558 nextData = cpu->GetSymbolGuardian().SymbolAfterAddress(funcPos-1,
559 ccc::GLOBAL_VARIABLE | ccc::LOCAL_VARIABLE);
560 opcodeSequenceStart = funcPos;
561 continue;
562 }
563
564 // force align
565 if (funcPos % 4)
566 {
567 u32 nextPos = (funcPos+3) & ~3;
568
569 DisassemblyComment* comment = new DisassemblyComment(cpu,funcPos,nextPos-funcPos,".align","4");
570 entries[funcPos] = comment;
571 lineAddresses.push_back(funcPos);
572
573 funcPos = nextPos;
574 opcodeSequenceStart = funcPos;
575 continue;
576 }
577
578 MIPSAnalyst::MipsOpcodeInfo opInfo = MIPSAnalyst::GetOpcodeInfo(cpu,funcPos);

Callers 15

DequeueMethod · 0.45
IsQueueEmptyMethod · 0.45
recvMethod · 0.45
~NetAdapterMethod · 0.45
InternalServerThreadMethod · 0.45
WriteImageMethod · 0.45
IO_ThreadMethod · 0.45
RecvMethod · 0.45
WillReciveMethod · 0.45
RecvMethod · 0.45

Calls 13

GetOpcodeInfoFunction · 0.85
SymbolAfterAddressMethod · 0.80
read32Method · 0.80
setMacroLiMethod · 0.80
setMacroMemoryMethod · 0.80
sizeMethod · 0.45
insertMethod · 0.45
push_backMethod · 0.45
getTotalSizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45
getNumLinesMethod · 0.45

Tested by

no test coverage detected