示例#1
0
            Block lookup_block(TargetAddress address, Block[] blocks)
            {
                foreach (MonoCodeBlock block in blocks) {
                    if ((address < StartAddress + block.StartAddress) ||
                        (address >= StartAddress + block.EndAddress))
                        continue;

                    if (block.Children != null) {
                        Block child = lookup_block (address, block.Children);
                        return child ?? block;
                    }

                    return block;
                }

                return null;
            }
示例#2
0
 protected MonoCodeBlock(int index, Block.Type type, int start, int end)
     : base(type, index, start, end)
 {
 }
示例#3
0
 void dump_blocks(Block[] blocks, string ident)
 {
     foreach (MonoCodeBlock block in blocks) {
         Console.WriteLine ("{0} {1}", ident, block);
         if (block.Children != null)
             dump_blocks (block.Children, ident + "  ");
     }
 }