qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

contrib/elf2dmp: fix structures definitions

Remove duplicate structures definitions in case of build for Windows hosts.

Signed-off-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Message-Id: <20181220012441.13694-5-viktor.prutyanov@phystech.edu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

authored by

Viktor Prutyanov and committed by
Paolo Bonzini
4591f4ce 4ea1a21d

+14 -6
+8 -4
contrib/elf2dmp/kdbg.h
··· 25 25 uint64_t DebuggerDataList; 26 26 } DBGKD_GET_VERSION64; 27 27 28 + #ifndef _WIN32 29 + typedef struct LIST_ENTRY64 { 30 + struct LIST_ENTRY64 *Flink; 31 + struct LIST_ENTRY64 *Blink; 32 + } LIST_ENTRY64; 33 + #endif 34 + 28 35 typedef struct DBGKD_DEBUG_DATA_HEADER64 { 29 - struct LIST_ENTRY64 { 30 - struct LIST_ENTRY64 *Flink; 31 - struct LIST_ENTRY64 *Blink; 32 - } List; 36 + LIST_ENTRY64 List; 33 37 uint32_t OwnerTag; 34 38 uint32_t Size; 35 39 } DBGKD_DEBUG_DATA_HEADER64;
+2
contrib/elf2dmp/pdb.h
··· 9 9 #define PDB_H 10 10 11 11 12 + #ifndef _WIN32 12 13 typedef struct GUID { 13 14 unsigned int Data1; 14 15 unsigned short Data2; 15 16 unsigned short Data3; 16 17 unsigned char Data4[8]; 17 18 } GUID; 19 + #endif 18 20 19 21 struct PDB_FILE { 20 22 uint32_t size;
+4 -2
contrib/elf2dmp/pe.h
··· 9 9 #define PE_H 10 10 11 11 12 + #ifndef _WIN32 12 13 typedef struct IMAGE_DOS_HEADER { 13 14 uint16_t e_magic; /* 0x00: MZ Header signature */ 14 15 uint16_t e_cblp; /* 0x02: Bytes on last page of file */ ··· 87 88 IMAGE_OPTIONAL_HEADER64 OptionalHeader; 88 89 } __attribute__ ((packed)) IMAGE_NT_HEADERS64; 89 90 90 - #define IMAGE_FILE_DEBUG_DIRECTORY 6 91 - 92 91 typedef struct IMAGE_DEBUG_DIRECTORY { 93 92 uint32_t Characteristics; 94 93 uint32_t TimeDateStamp; ··· 101 100 } __attribute__ ((packed)) IMAGE_DEBUG_DIRECTORY; 102 101 103 102 #define IMAGE_DEBUG_TYPE_CODEVIEW 2 103 + #endif 104 + 105 + #define IMAGE_FILE_DEBUG_DIRECTORY 6 104 106 105 107 typedef struct guid_t { 106 108 uint32_t a;