Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/818533/?format=api
{ "id": 818533, "url": "http://patchwork.ozlabs.org/api/patches/818533/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/150642387446.3900.8629683985208127854.stgit@Misha-PC.lan02.inno/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<150642387446.3900.8629683985208127854.stgit@Misha-PC.lan02.inno>", "list_archive_url": null, "date": "2017-09-26T11:04:34", "name": "[05/43] windbg: added helper features", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "2bf123802d63a08abc280a99f6e14be7ab734d09", "submitter": { "id": 71645, "url": "http://patchwork.ozlabs.org/api/people/71645/?format=api", "name": "Mikhail Abakumov", "email": "mikhail.abakumov@ispras.ru" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/150642387446.3900.8629683985208127854.stgit@Misha-PC.lan02.inno/mbox/", "series": [ { "id": 5104, "url": "http://patchwork.ozlabs.org/api/series/5104/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=5104", "date": "2017-09-26T11:04:06", "name": "Windbg supporting", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/5104/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/818533/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/818533/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1dQm5Qh9z9t3Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 21:05:20 +1000 (AEST)", "from localhost ([::1]:46687 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dwnfy-0003E2-Rw\n\tfor incoming@patchwork.ozlabs.org; Tue, 26 Sep 2017 07:05:18 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:58745)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <mikhail.abakumov@ispras.ru>) id 1dwnfJ-0003C8-W8\n\tfor qemu-devel@nongnu.org; Tue, 26 Sep 2017 07:04:39 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <mikhail.abakumov@ispras.ru>) id 1dwnfI-0008Ik-Vt\n\tfor qemu-devel@nongnu.org; Tue, 26 Sep 2017 07:04:37 -0400", "from mail.ispras.ru ([83.149.199.45]:51694)\n\tby eggs.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <mikhail.abakumov@ispras.ru>) id 1dwnfI-0008IW-Nn\n\tfor qemu-devel@nongnu.org; Tue, 26 Sep 2017 07:04:36 -0400", "from Misha-PC.lan02.inno (unknown [85.142.117.226])\n\tby mail.ispras.ru (Postfix) with ESMTPSA id F3B09540080;\n\tTue, 26 Sep 2017 14:04:35 +0300 (MSK)" ], "From": "Mihail Abakumov <mikhail.abakumov@ispras.ru>", "To": "qemu-devel@nongnu.org", "Date": "Tue, 26 Sep 2017 14:04:34 +0300", "Message-ID": "<150642387446.3900.8629683985208127854.stgit@Misha-PC.lan02.inno>", "In-Reply-To": "<150642384156.3900.3326424823772221077.stgit@Misha-PC.lan02.inno>", "References": "<150642384156.3900.3326424823772221077.stgit@Misha-PC.lan02.inno>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 3.x [fuzzy]", "X-Received-From": "83.149.199.45", "Subject": "[Qemu-devel] [PATCH 05/43] windbg: added helper features", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Id": "<qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Cc": "sw@weilnetz.de, lprosek@redhat.com, dovgaluk@ispras.ru,\n\trkagan@virtuozzo.com, pbonzini@redhat.com, den@openvz.org", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>" }, "content": "Added some helper features for windbgstub.\n\nSigned-off-by: Mihail Abakumov <mikhail.abakumov@ispras.ru>\nSigned-off-by: Pavel Dovgalyuk <dovgaluk@ispras.ru>\nSigned-off-by: Dmitriy Koltunov <koltunov@ispras.ru>\n---\n include/exec/windbgstub-utils.h | 46 +++++++++++++++++++++++++++++++++++++++\n include/exec/windbgstub.h | 3 +++\n windbgstub.c | 1 +\n 3 files changed, 50 insertions(+)", "diff": "diff --git a/include/exec/windbgstub-utils.h b/include/exec/windbgstub-utils.h\nindex 2390597f1f..65f336e4bf 100755\n--- a/include/exec/windbgstub-utils.h\n+++ b/include/exec/windbgstub-utils.h\n@@ -13,7 +13,53 @@\n #define WINDBGSTUB_UTILS_H\n \n #include \"qemu/osdep.h\"\n+#include \"qemu/error-report.h\"\n+#include \"cpu.h\"\n #include \"exec/windbgstub.h\"\n #include \"exec/windbgkd.h\"\n \n+#ifndef TARGET_I386\n+#error Unsupported Architecture\n+#endif\n+#ifdef TARGET_X86_64 /* Unimplemented yet */\n+#error Unsupported Architecture\n+#endif\n+\n+#if (WINDBG_DEBUG_ON)\n+\n+# define WINDBG_DEBUG(...) do { \\\n+ printf(\"Debug: \" __VA_ARGS__); \\\n+ printf(\"\\n\"); \\\n+} while (false)\n+\n+# define WINDBG_ERROR(...) do { \\\n+ printf(\"Error: \" __VA_ARGS__); \\\n+ printf(\"\\n\"); \\\n+} while (false)\n+\n+#else\n+\n+# define WINDBG_DEBUG(...)\n+# define WINDBG_ERROR(...) error_report(WINDBG \": \" __VA_ARGS__)\n+\n+#endif\n+\n+#define FMT_ADDR \"addr:0x\" TARGET_FMT_lx\n+#define FMT_ERR \"Error:%d\"\n+\n+#define UINT8_P(ptr) ((uint8_t *) (ptr))\n+#define UINT32_P(ptr) ((uint32_t *) (ptr))\n+#define FIELD_P(type, field, ptr) ((typeof_field(type, field) *) (ptr))\n+#define PTR(var) UINT8_P(&var)\n+\n+#define M64_SIZE sizeof(DBGKD_MANIPULATE_STATE64)\n+\n+#define sizeof_field(type, field) sizeof(((type *) NULL)->field)\n+\n+#define READ_VMEM(cpu, addr, type) ({ \\\n+ type _t; \\\n+ cpu_memory_rw_debug(cpu, addr, PTR(_t), sizeof(type), 0); \\\n+ _t; \\\n+})\n+\n #endif\ndiff --git a/include/exec/windbgstub.h b/include/exec/windbgstub.h\nindex 1a6e1cc6e5..703fc26b8f 100755\n--- a/include/exec/windbgstub.h\n+++ b/include/exec/windbgstub.h\n@@ -12,6 +12,9 @@\n #ifndef WINDBGSTUB_H\n #define WINDBGSTUB_H\n \n+#define WINDBG \"windbg\"\n+#define WINDBG_DEBUG_ON false\n+\n int windbg_server_start(const char *device);\n \n #endif\ndiff --git a/windbgstub.c b/windbgstub.c\nindex 4951f59203..3830446988 100755\n--- a/windbgstub.c\n+++ b/windbgstub.c\n@@ -11,6 +11,7 @@\n \n #include \"qemu/osdep.h\"\n #include \"exec/windbgstub.h\"\n+#include \"exec/windbgstub-utils.h\"\n \n int windbg_server_start(const char *device)\n {\n", "prefixes": [ "05/43" ] }