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>
This commit is contained in:
Viktor Prutyanov 2018-12-20 04:24:39 +03:00 committed by Paolo Bonzini
parent 4ea1a21d84
commit 4591f4ceef
3 changed files with 14 additions and 6 deletions

View File

@ -25,11 +25,15 @@ typedef struct DBGKD_GET_VERSION64 {
uint64_t DebuggerDataList; uint64_t DebuggerDataList;
} DBGKD_GET_VERSION64; } DBGKD_GET_VERSION64;
#ifndef _WIN32
typedef struct LIST_ENTRY64 {
struct LIST_ENTRY64 *Flink;
struct LIST_ENTRY64 *Blink;
} LIST_ENTRY64;
#endif
typedef struct DBGKD_DEBUG_DATA_HEADER64 { typedef struct DBGKD_DEBUG_DATA_HEADER64 {
struct LIST_ENTRY64 { LIST_ENTRY64 List;
struct LIST_ENTRY64 *Flink;
struct LIST_ENTRY64 *Blink;
} List;
uint32_t OwnerTag; uint32_t OwnerTag;
uint32_t Size; uint32_t Size;
} DBGKD_DEBUG_DATA_HEADER64; } DBGKD_DEBUG_DATA_HEADER64;

View File

@ -9,12 +9,14 @@
#define PDB_H #define PDB_H
#ifndef _WIN32
typedef struct GUID { typedef struct GUID {
unsigned int Data1; unsigned int Data1;
unsigned short Data2; unsigned short Data2;
unsigned short Data3; unsigned short Data3;
unsigned char Data4[8]; unsigned char Data4[8];
} GUID; } GUID;
#endif
struct PDB_FILE { struct PDB_FILE {
uint32_t size; uint32_t size;

View File

@ -9,6 +9,7 @@
#define PE_H #define PE_H
#ifndef _WIN32
typedef struct IMAGE_DOS_HEADER { typedef struct IMAGE_DOS_HEADER {
uint16_t e_magic; /* 0x00: MZ Header signature */ uint16_t e_magic; /* 0x00: MZ Header signature */
uint16_t e_cblp; /* 0x02: Bytes on last page of file */ uint16_t e_cblp; /* 0x02: Bytes on last page of file */
@ -87,8 +88,6 @@ typedef struct IMAGE_NT_HEADERS64 {
IMAGE_OPTIONAL_HEADER64 OptionalHeader; IMAGE_OPTIONAL_HEADER64 OptionalHeader;
} __attribute__ ((packed)) IMAGE_NT_HEADERS64; } __attribute__ ((packed)) IMAGE_NT_HEADERS64;
#define IMAGE_FILE_DEBUG_DIRECTORY 6
typedef struct IMAGE_DEBUG_DIRECTORY { typedef struct IMAGE_DEBUG_DIRECTORY {
uint32_t Characteristics; uint32_t Characteristics;
uint32_t TimeDateStamp; uint32_t TimeDateStamp;
@ -101,6 +100,9 @@ typedef struct IMAGE_DEBUG_DIRECTORY {
} __attribute__ ((packed)) IMAGE_DEBUG_DIRECTORY; } __attribute__ ((packed)) IMAGE_DEBUG_DIRECTORY;
#define IMAGE_DEBUG_TYPE_CODEVIEW 2 #define IMAGE_DEBUG_TYPE_CODEVIEW 2
#endif
#define IMAGE_FILE_DEBUG_DIRECTORY 6
typedef struct guid_t { typedef struct guid_t {
uint32_t a; uint32_t a;