From patchwork Fri Nov 2 00:28:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viktor Prutyanov X-Patchwork-Id: 992151 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=phystech.edu Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=phystech-edu.20150623.gappssmtp.com header.i=@phystech-edu.20150623.gappssmtp.com header.b="JvO/N+8a"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42mNHQ6j4wz9sWX for ; Fri, 2 Nov 2018 11:29:21 +1100 (AEDT) Received: from localhost ([::1]:47979 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gINKx-00063h-4i for incoming@patchwork.ozlabs.org; Thu, 01 Nov 2018 20:29:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gINKU-000636-Hc for qemu-devel@nongnu.org; Thu, 01 Nov 2018 20:28:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gINKP-0003hh-HA for qemu-devel@nongnu.org; Thu, 01 Nov 2018 20:28:50 -0400 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]:43291) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gINKP-0003gq-0N for qemu-devel@nongnu.org; Thu, 01 Nov 2018 20:28:45 -0400 Received: by mail-lj1-x241.google.com with SMTP id g26-v6so220633lja.10 for ; Thu, 01 Nov 2018 17:28:44 -0700 (PDT) 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; bh=WGbJ5lW+NSrva1CGq8myzu1UejGEAQpDWAm0fbR87r8=; b=JvO/N+8aU6haSrZw7ifU1Nb/1Isyf0/tBzI6VWgqKByuU2vUaRcFB0/NmmrsGvavKL VueqcYJWd0Jp+e+CmKO7lRWQ3XqsNuQb8N5PFpX749E27hJLPOBWIj0Bay2t+XI9Opjn 1aIRLAwv+UttiwcxCU7HzyChvix4VpkqXNIq5DA8JP4VL0xuh19IakinXPJzOUuhwG8S ahTmD9jucoC1nxhcyju57lrHRpJJK4ra7jUXWZ3hddv+v8Qrssq8oBbQ5vtwT9t32PLu yq5WosfgnbyM2vxN3NGjT/V9vsb+3TwsdN/JohFaf8LaR5pIW6G+V8o1oRDSYCgoYFNW GEEw== 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; bh=WGbJ5lW+NSrva1CGq8myzu1UejGEAQpDWAm0fbR87r8=; b=OOnBbfT5942OEh2PwWXSU24yheVOWmHG3temd09B8I+ld88hvxcloRgohrNOHah8bL XQd1I+Hejm7zNYpudTd53cpZkkNMkg4EFg8LSJkq6YPi75Mrz9KoaBhb1FXWL7+BYuiq ITkroTtKdDlcx7pGIWXj40zqc0r/SWqhuaYDFCPEP5VqGT1+Z7tXwfCR1jOwrvCESPCY qhLv/vJR5Dx8Ne/0+u/wx+cJcRwbND1zle5oTPPe+aJOJEY4L4rwTFt9MzR1zCiQEckR xauSTzSNU9XabWuzfv4NaclfPG5+CXesXDMo5G2AL978Ml9a1V83izhKXAU663lvkT44 WxXg== X-Gm-Message-State: AGRZ1gJ9aRCr8NQQZx6pqZhe3JOAgB4wY6kaweT935kLMWz4nlkisuoI bHUiZlhynFr7yYbvLzLnVOHGpg== X-Google-Smtp-Source: AJdET5cIXE/x59k/nW/qNVJYEjaLogDWHVpnf1QqfEbxmMJPwwav1IP5kGFLMaAJkZZ5rarDDHBjcA== X-Received: by 2002:a2e:84c5:: with SMTP id q5-v6mr5973533ljh.65.1541118523305; Thu, 01 Nov 2018 17:28:43 -0700 (PDT) Received: from localhost.localdomain ([93.175.11.132]) by smtp.gmail.com with ESMTPSA id r85-v6sm2019900lfd.18.2018.11.01.17.28.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Nov 2018 17:28:42 -0700 (PDT) From: Viktor Prutyanov To: pbonzini@redhat.com, rkagan@virtuozzo.com Date: Fri, 2 Nov 2018 03:28:16 +0300 Message-Id: <20181102002818.8568-1-viktor.prutyanov@phystech.edu> X-Mailer: git-send-email 2.17.2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::241 Subject: [Qemu-devel] [PATCH 0/2] contrib/elf2dmp: elf2dmp for Windows hosts 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" In most cases, it is more convenient to convert a dump on the same machine on which the analysis is performed. Because of WinDbg, the analysis of guest Windows problems needs Windows host anyway, so it is useful to have dump convertion tool near the debugger. After these patches elf2dmp can be built both for Linux and Windows hosts. Viktor Prutyanov (2): contrib/elf2dmp: use GLib file mapping contrib/elf2dmp: elf2dmp for Windows hosts Makefile | 4 ++-- contrib/elf2dmp/Makefile.objs | 2 +- contrib/elf2dmp/addrspace.c | 7 ++++--- contrib/elf2dmp/file_map.c | 30 ++++++++++++++++++++++++++++++ contrib/elf2dmp/file_map.h | 21 +++++++++++++++++++++ contrib/elf2dmp/kdbg.h | 12 ++++++++---- contrib/elf2dmp/main.c | 27 +++++++++++++++------------ contrib/elf2dmp/pdb.c | 32 ++++++++------------------------ contrib/elf2dmp/pdb.h | 7 +++++-- contrib/elf2dmp/pe.h | 6 ++++-- contrib/elf2dmp/qemu_elf.c | 34 ++++++++++++---------------------- contrib/elf2dmp/qemu_elf.h | 15 ++++++++------- 12 files changed, 118 insertions(+), 79 deletions(-) create mode 100644 contrib/elf2dmp/file_map.c create mode 100644 contrib/elf2dmp/file_map.h