public AddressRange GetSinglePredecessorAddressRange(Address addr) { ImageMapBlock block = null; foreach (Address addrPred in this.jumpGraph.Predecessors(addr)) { if (block != null) { return(null); } ImageMapItem item; if (!program.ImageMap.TryFindItem(addrPred, out item)) { return(null); } block = item as ImageMapBlock; } if (block == null) { return(null); } else { return(new AddressRange(block.Address, block.Address + block.Size)); } }
private int CountDisassembledLines(ImageMapBlock bi) { return(instructions[bi].Length); //if (!instructions.TryGetValue(bi, out var instrs)) // return 0; //return instrs.Length; }
public Address GetBlockStartAddress(Address addr) { ImageMapItem item; if (!program.ImageMap.TryFindItem(addr, out item)) { return(null); } ImageMapBlock block = item as ImageMapBlock; if (block == null) { return(null); } return(block.Address); }
private void Given_StubProcedure(uint addr, uint size) { var address = Address.Ptr32(addr); var m = new ProcedureBuilder(program.Architecture, "fnTest", address); m.Return(); this.proc = m.Procedure; this.program.Procedures[address] = proc; var item = new ImageMapBlock(address) { Size = size, Block = new Block(proc, address, "fakeBlock") }; program.ImageMap.AddItemWithSize(address, item); }
private int CountDisassembledLines(ImageMapBlock bi) { return(instructions[bi].Length); }