Beispiel #1
0
        public bool VirtualQuery(ulong addr, out VirtualQueryData vq)
        {
            bool result = _reader.VirtualQuery(addr, out vq);

            _file.WriteLine("VirtualQuery {0}: {1:x} {2:x} {3}", result ? "" : "failed ", addr, vq.BaseAddress, vq.Size);
            return(result);
        }
Beispiel #2
0
        public bool VirtualQuery(ulong addr, out VirtualQueryData vq)
        {
            vq = new VirtualQueryData();

            MEMORY_BASIC_INFORMATION mem = new MEMORY_BASIC_INFORMATION();
            IntPtr ptr = new IntPtr((long)addr);

            int res = VirtualQueryEx(_process, ptr, ref mem, new IntPtr(Marshal.SizeOf(mem)));

            if (res == 0)
                return(false); }
Beispiel #3
0
        public bool VirtualQuery(ulong addr, out VirtualQueryData vq)
        {
            if (_spaces.QueryVirtual(addr, out MEMORY_BASIC_INFORMATION64 mem))
            {
                vq = new VirtualQueryData(mem.BaseAddress, mem.RegionSize);
                return true;
            }

            vq = default;
            return false;
        }
Beispiel #4
0
        public bool VirtualQuery(ulong addr, out VirtualQueryData vq)
        {
            vq = new VirtualQueryData();
            if (_spaces2 == null)
            {
                return(false);
            }

            SetClientInstance();
            int hr = _spaces2.QueryVirtual(addr, out MEMORY_BASIC_INFORMATION64 mem);

            vq.BaseAddress = mem.BaseAddress;
            vq.Size        = mem.RegionSize;

            return(hr == 0);
        }
Beispiel #5
0
        public bool VirtualQuery(ulong address, out VirtualQueryData vq)
        {
            long addr = (long)address;

            foreach (ElfProgramHeader item in _core.ElfFile.ProgramHeaders)
            {
                long start = item.RefHeader.VirtualAddress;
                long end   = start + item.RefHeader.VirtualSize;

                if (start <= addr && addr < end)
                {
                    vq = new VirtualQueryData((ulong)start, (ulong)item.RefHeader.VirtualSize);
                    return(true);
                }
            }

            vq = new VirtualQueryData();
            return(false);
        }
Beispiel #6
0
 public bool VirtualQuery(ulong addr, out VirtualQueryData vq)
 {
     bool result = m_reader.VirtualQuery(addr, out vq);
     m_file.WriteLine("VirtualQuery {0}: {1:x} {2:x} {3}", result ? "" : "failed ", addr, vq.BaseAddress, vq.Size);
     return result;
 }
Beispiel #7
0
 public bool VirtualQuery(ulong addr, out VirtualQueryData vq)
 {
     return(_dumpReader.VirtualQuery(addr, out vq));
 }
Beispiel #8
0
 public bool VirtualQuery(ulong addr, out VirtualQueryData vq)
 {
     return m_dumpReader.VirtualQuery(addr, out vq);
 }
Beispiel #9
0
        public bool VirtualQuery(ulong addr, out VirtualQueryData vq)
        {
            vq = new VirtualQueryData();

            MEMORY_BASIC_INFORMATION mem = new MEMORY_BASIC_INFORMATION();
            IntPtr ptr = new IntPtr((long)addr);

            int res = VirtualQueryEx(_process, ptr, ref mem, new IntPtr(Marshal.SizeOf(mem)));
            if (res == 0)
                return false;

            vq.BaseAddress = mem.BaseAddress;
            vq.Size = mem.Size;
            return true;
        }
 public bool VirtualQuery(ulong addr, out VirtualQueryData vq)
 {
     return _impl.VirtualQuery(addr, out vq);
 }
Beispiel #11
0
        public bool VirtualQuery(ulong addr, out VirtualQueryData vq)
        {
            vq = new VirtualQueryData();
            if (_spaces2 == null)
                return false;

            MEMORY_BASIC_INFORMATION64 mem;
            SetClientInstance();
            int hr = _spaces2.QueryVirtual(addr, out mem);
            vq.BaseAddress = mem.BaseAddress;
            vq.Size = mem.RegionSize;

            return hr == 0;
        }
Beispiel #12
0
 /// <summary>
 ///     Converts the specified data.
 /// </summary>
 /// <param name="data">The data.</param>
 /// <returns>VirtualQueryData.</returns>
 public VirtualQueryData Convert(ClrMd.VirtualQueryData data)
 {
     return(Cache.GetOrAdd(data, () => new VirtualQueryData(data.BaseAddress, data.Size)));
 }