/* uint Magic = 0x53445352; Guid Signature; uint Age; string FileName; */ public bool ProcessDebugHeader(ImageDebugDirectory directory, byte [] header) { if (header.Length < 24) return false; var magic = ReadInt32 (header, 0); if (magic != 0x53445352) return false; var guid_bytes = new byte [16]; Buffer.BlockCopy (header, 4, guid_bytes, 0, 16); this.guid = new Guid (guid_bytes); this.age = ReadInt32 (header, 20); return PopulateFunctions (); }
public byte[] GetDebugInfo(out ImageDebugDirectory idd) { int size; // get size of debug info m_writer.GetDebugInfo (out idd, 0, out size, null); byte[] debug_info = new byte[size]; m_writer.GetDebugInfo (out idd, size, out size, debug_info); return debug_info; }
public ImageDebugDirectory GetDebugHeader(out byte [] header) { var section = GetSectionAtVirtualAddress (Debug.VirtualAddress); var buffer = new ByteBuffer (section.Data); buffer.position = (int) (Debug.VirtualAddress - section.VirtualAddress); var directory = new ImageDebugDirectory { Characteristics = buffer.ReadInt32 (), TimeDateStamp = buffer.ReadInt32 (), MajorVersion = buffer.ReadInt16 (), MinorVersion = buffer.ReadInt16 (), Type = buffer.ReadInt32 (), SizeOfData = buffer.ReadInt32 (), AddressOfRawData = buffer.ReadInt32 (), PointerToRawData = buffer.ReadInt32 (), }; if (directory.SizeOfData == 0 || directory.PointerToRawData == 0) { header = Empty<byte>.Array; return directory; } buffer.position = (int) (directory.PointerToRawData - section.PointerToRawData); header = new byte [directory.SizeOfData]; Buffer.BlockCopy (buffer.buffer, buffer.position, header, 0, header.Length); return directory; }
public bool GetDebugHeader(out ImageDebugDirectory directory, out byte [] header) { directory = new ImageDebugDirectory (); header = empty_header; return false; }
public bool GetDebugHeader(out ImageDebugDirectory directory, out byte [] header) { header = writer.GetDebugInfo (out directory); return true; }
public bool ProcessDebugHeader(ImageDebugDirectory directory, byte [] header) { return symbol_file.Guid == module.Mvid; }