示例#1
0
 public ETMBranch(SymAddress aAddress, int aNumber, TETMBranchType aType, TArmInstructionSet aInstructionSet, TArmExceptionType aExceptionType)
 {
     iAddress        = aAddress;
     iNumber         = aNumber;
     iType           = aType;
     iInstructionSet = aInstructionSet;
     iExceptionType  = aExceptionType;
 }
示例#2
0
        // <summary>
        // Set the known address bits of the program counter. We may not know all
        // bits until an I-sync packet is reached, or then until we see a full 5-byte
        // branch.
        // </summary>
        internal void SetKnownAddressBits(uint aAddress, int aNumberOfValidBits, TETMBranchType aBranchType)
        {
            iLastBranch.SetKnownAddressBits(aAddress, aNumberOfValidBits);

            iPC.Address   = iLastBranch.Address;
            iPC.KnownBits = iLastBranch.KnownBits;

            // If we know the full branch address, then inform the engine
            if (iPC.IsKnown)
            {
                iEngine.OnBranch(iPC, iCurrentInstructionSet, iCurrentException, aBranchType);
            }
        }
示例#3
0
        internal void OnBranch(uint aAddress, TArmInstructionSet aInstructionSet, TArmExceptionType aExceptionType, TETMBranchType aBranchType)
        {
            if (Branch != null)
            {
                ETMBranch branch = new ETMBranch(new SymAddress(aAddress), iBranchCounter, aBranchType, aInstructionSet, aExceptionType);

                // Try to find a symbol
                SymbolCollection col = null;
                Symbol           sym = LookUpSymbol(aAddress, out col);
                //
                if (sym != null)
                {
                    branch.Symbol = sym;
                }
                else if (col != null)
                {
                    branch.SymbolText = string.Format("Unknown Symbol from \'{0}\'", col.FileName.FileNameInHost);
                }

                // Cascade event
                Branch(branch);
            }

            ++iBranchCounter;
        }