Mono.Debugger.Backend.BfdDisassembler.read_memory_func C# (CSharp) Method

read_memory_func() private method

private read_memory_func ( long address, IntPtr data, int size ) : int
address long
data System.IntPtr
size int
return int
        int read_memory_func(long address, IntPtr data, int size)
        {
            try {
                TargetAddress location = new TargetAddress (
                    memory.AddressDomain, address);
                byte[] buffer = memory.ReadBuffer (location, size);
                Marshal.Copy (buffer, 0, data, size);
            } catch (Exception e) {
                memory_exception = e;
                return 1;
            }
            return 0;
        }