From patchwork Thu Dec 20 01:24:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viktor Prutyanov X-Patchwork-Id: 10738435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F9196C2 for ; Thu, 20 Dec 2018 01:26:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EBB6285D3 for ; Thu, 20 Dec 2018 01:26:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6175A2862D; Thu, 20 Dec 2018 01:26:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E86BD285D3 for ; Thu, 20 Dec 2018 01:26:36 +0000 (UTC) Received: from localhost ([::1]:34851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZn6i-0006hF-2c for patchwork-qemu-devel@patchwork.kernel.org; Wed, 19 Dec 2018 20:26:36 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZn5S-0005lh-7u for qemu-devel@nongnu.org; Wed, 19 Dec 2018 20:25:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZn5O-0002rO-HR for qemu-devel@nongnu.org; Wed, 19 Dec 2018 20:25:17 -0500 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]:44101) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZn5M-0002hn-G9 for qemu-devel@nongnu.org; Wed, 19 Dec 2018 20:25:14 -0500 Received: by mail-lj1-x242.google.com with SMTP id k19-v6so53687lji.11 for ; Wed, 19 Dec 2018 17:25:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=phystech-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Umqhn6Kkplin6YC4y1bAqCXn4bmOnF6f82wm8iUV7Ek=; b=pfNUgzq/SDBeTTAFCuFl+aCxTXUnGlPqpYt98TfqFW66gWl8XGftDKaWr55YTdhEQp sQ6zkFUx1qr7JZa7oS0q1GpfncyhquR600bRhmJP/DVnYWIBsw4lg5GiO8RNRm/ftzuu iRvwkxXDN2KK78nFaUkLxAVV6Q4jbco5J3vu9eNATd9ShDmCAEDRi+Q+JaCRsESt738c 2FAzRkoXcLW6Vv+M9/HaFVg9qNiVXRO79VBDdNaNn0gop/I/vNWN1Dpxm68XH0GS2Kra 0gFlzZKfWlqBhYqxIdyZjvhdT0X+b4clWbWXLa88u3x+Fq5MdMPtZIqIgk30GR/i1hQR mF9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Umqhn6Kkplin6YC4y1bAqCXn4bmOnF6f82wm8iUV7Ek=; b=QhwVuP30+u1y+CaU8yEI3vb85Y5uKqk583sTtql/PWtrJWiF44CV+Bo8PvETziuivA skVt+0Wf2W6qD3vQz+SAmR8wRDf6q8p5D5tpPSWlhlnAHpC/u70U+i/eRt3zDQ/KRC3R RWH3Mm6Stgwjh5tCPmggHO1M5rbvYfEoxaG4DJWB8ClfmlETtQOonx674yEL4ui4ZPOz j+v2kX+M7CgyPDvCThdTQbFTE3gkcFhu+TCx8q7AG5dRECv+CfJv20N6WxNG2obc5lii FP+Ew57JvvaKYJnQIDQYIrtgox6MIrUDwkITdbX9Q4y6Mne5KHh2tswa8AV3IhlHOgUA uR+w== X-Gm-Message-State: AA+aEWb0WsGsdOfZSnpO87KNPn0HBOeFCnA3ka6OQ9hSToQUMYf4TqCl Zw3niv/kiqTraA9evHpju7gZeQ== X-Google-Smtp-Source: AFSGD/W8WjyDw8EKgOoRTCHBB0QQBVAoNXuMkv0U4VVt3KdaUsg/Pognl+mwIsaJFqpECMqNDdXMEA== X-Received: by 2002:a2e:89d7:: with SMTP id c23-v6mr15407796ljk.0.1545269107863; Wed, 19 Dec 2018 17:25:07 -0800 (PST) Received: from localhost.localdomain ([93.175.11.132]) by smtp.gmail.com with ESMTPSA id z7-v6sm3737540lji.42.2018.12.19.17.25.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Dec 2018 17:25:07 -0800 (PST) From: Viktor Prutyanov To: pbonzini@redhat.com, rkagan@virtuozzo.com Date: Thu, 20 Dec 2018 04:24:39 +0300 Message-Id: <20181220012441.13694-5-viktor.prutyanov@phystech.edu> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181220012441.13694-1-viktor.prutyanov@phystech.edu> References: <20181220012441.13694-1-viktor.prutyanov@phystech.edu> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::242 Subject: [Qemu-devel] [PATCH v2 4/6] contrib/elf2dmp: fix structures definitions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, Viktor Prutyanov Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Remove duplicate structures definitions in case of build for Windows hosts. Signed-off-by: Viktor Prutyanov --- contrib/elf2dmp/kdbg.h | 12 ++++++++---- contrib/elf2dmp/pdb.h | 2 ++ contrib/elf2dmp/pe.h | 6 ++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/contrib/elf2dmp/kdbg.h b/contrib/elf2dmp/kdbg.h index 851b57c321..002e3d0cd5 100644 --- a/contrib/elf2dmp/kdbg.h +++ b/contrib/elf2dmp/kdbg.h @@ -25,11 +25,15 @@ typedef struct DBGKD_GET_VERSION64 { uint64_t DebuggerDataList; } 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 { - struct LIST_ENTRY64 { - struct LIST_ENTRY64 *Flink; - struct LIST_ENTRY64 *Blink; - } List; + LIST_ENTRY64 List; uint32_t OwnerTag; uint32_t Size; } DBGKD_DEBUG_DATA_HEADER64; diff --git a/contrib/elf2dmp/pdb.h b/contrib/elf2dmp/pdb.h index 8e395119d1..9a848f75e2 100644 --- a/contrib/elf2dmp/pdb.h +++ b/contrib/elf2dmp/pdb.h @@ -11,12 +11,14 @@ #include #include +#ifndef _WIN32 typedef struct GUID { unsigned int Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; +#endif struct PDB_FILE { uint32_t size; diff --git a/contrib/elf2dmp/pe.h b/contrib/elf2dmp/pe.h index 374e06a9c5..0fd5c23c7f 100644 --- a/contrib/elf2dmp/pe.h +++ b/contrib/elf2dmp/pe.h @@ -10,6 +10,7 @@ #include +#ifndef _WIN32 typedef struct IMAGE_DOS_HEADER { uint16_t e_magic; /* 0x00: MZ Header signature */ uint16_t e_cblp; /* 0x02: Bytes on last page of file */ @@ -88,8 +89,6 @@ typedef struct IMAGE_NT_HEADERS64 { IMAGE_OPTIONAL_HEADER64 OptionalHeader; } __attribute__ ((packed)) IMAGE_NT_HEADERS64; -#define IMAGE_FILE_DEBUG_DIRECTORY 6 - typedef struct IMAGE_DEBUG_DIRECTORY { uint32_t Characteristics; uint32_t TimeDateStamp; @@ -102,6 +101,9 @@ typedef struct IMAGE_DEBUG_DIRECTORY { } __attribute__ ((packed)) IMAGE_DEBUG_DIRECTORY; #define IMAGE_DEBUG_TYPE_CODEVIEW 2 +#endif + +#define IMAGE_FILE_DEBUG_DIRECTORY 6 typedef struct guid_t { uint32_t a;