Mono.Debugger.Backend.Mono.MonoSymbolFile.MonoCodeBlock.CreateBlocks C# (CSharp) 메소드

CreateBlocks() 공개 정적인 메소드

public static CreateBlocks ( MonoMethod method, MethodAddress address, Mono.CompilerServices.SymbolWriter the_blocks, List &root_blocks ) : MonoCodeBlock[]
method MonoMethod
address MethodAddress
the_blocks Mono.CompilerServices.SymbolWriter
root_blocks List
리턴 MonoCodeBlock[]
            public static MonoCodeBlock[] CreateBlocks(MonoMethod method,
								    MethodAddress address,
								    C.CodeBlockEntry[] the_blocks,
								    out List<MonoCodeBlock> root_blocks)
            {
                MonoCodeBlock[] blocks = new MonoCodeBlock [the_blocks.Length];
                for (int i = 0; i < blocks.Length; i++) {
                    Block.Type type = (Block.Type) the_blocks [i].BlockType;
                    int start = find_address (address, the_blocks [i].StartOffset);
                    int end = find_address (address, the_blocks [i].EndOffset);
                    blocks [i] = new MonoCodeBlock (i, type, start, end);
                }

                root_blocks = new List<MonoCodeBlock> ();

                for (int i = 0; i < blocks.Length; i++) {
                    if (the_blocks [i].Parent < 0)
                        root_blocks.Add (blocks [i]);
                    else {
                        MonoCodeBlock parent = blocks [the_blocks [i].Parent - 1];
                        blocks [i].Parent = parent;
                        parent.AddChildBlock (blocks [i]);
                    }
                }

                return blocks;
            }