Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1882059/?format=api
{ "id": 1882059, "url": "http://patchwork.ozlabs.org/api/patches/1882059/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20240103173349.398526-33-alex.bennee@linaro.org/", "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": "<20240103173349.398526-33-alex.bennee@linaro.org>", "list_archive_url": null, "date": "2024-01-03T17:33:38", "name": "[v2,32/43] gdbstub: Simplify XML lookup", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "e893b54ebd612fcbd44ce8941fc71266feb5a721", "submitter": { "id": 39532, "url": "http://patchwork.ozlabs.org/api/people/39532/?format=api", "name": "Alex Bennée", "email": "alex.bennee@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20240103173349.398526-33-alex.bennee@linaro.org/mbox/", "series": [ { "id": 388742, "url": "http://patchwork.ozlabs.org/api/series/388742/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=388742", "date": "2024-01-03T17:33:08", "name": "testing and plugin updates for 9.0 (pre-PR)", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/388742/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1882059/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1882059/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@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=dfRl4ePf;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4T4xj06qqgz1ydb\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 4 Jan 2024 04:36:20 +1100 (AEDT)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1rL58x-0004h7-VP; Wed, 03 Jan 2024 12:35:03 -0500", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>)\n id 1rL58T-00042l-Sa\n for qemu-devel@nongnu.org; Wed, 03 Jan 2024 12:34:34 -0500", "from mail-wm1-x333.google.com ([2a00:1450:4864:20::333])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>)\n id 1rL584-0002XH-AO\n for qemu-devel@nongnu.org; Wed, 03 Jan 2024 12:34:33 -0500", "by mail-wm1-x333.google.com with SMTP id\n 5b1f17b1804b1-40d5a41143fso67859845e9.3\n for <qemu-devel@nongnu.org>; Wed, 03 Jan 2024 09:34:05 -0800 (PST)", "from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id\n n4-20020a7bc5c4000000b0040d376ac369sm2876694wmk.40.2024.01.03.09.33.58\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 03 Jan 2024 09:34:02 -0800 (PST)", "from draig.lan (localhost [IPv6:::1])\n by draig.lan (Postfix) with ESMTP id 7E2865F9CE;\n Wed, 3 Jan 2024 17:33:52 +0000 (GMT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1704303245; x=1704908045; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=0Ha0YdQiAm0Sb5o4T4mCAdJBoZ8w/bFrJlrZ9NOmRtI=;\n b=dfRl4ePf7Dr6ChMa1wCC7lRkl6NegGD1rreCGDC/HvcNy1sFo/1LbKc/Oqq5uPwWz6\n d17n7lwA6+rPWIKE1CSlnmrvm3h/qEsxtq9FEruepK46weqSyDOOGygsRJBaRwk1Y/Lb\n iLU/NQtVQL9fzFbxlnF0lBZAcF/wsReM8X6gytQ+HDAu3juD7wmScuhWeK/rQ+K5QHci\n LK+g+WNS7woyj6Ipfi1vKW/WggZuuM0gKx5rEDRZTvNfMSG3qC2xw1jKGxNQ0196yFZt\n AKDjGfyA+3WsMozAu0rGqdsqcuObYfVdCvhURIlqvd+L3yCDaqJs8YvvkaqyfejdluLn\n /h8g==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1704303245; x=1704908045;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=0Ha0YdQiAm0Sb5o4T4mCAdJBoZ8w/bFrJlrZ9NOmRtI=;\n b=gFa/xvLuX+XXX6+gKhRkZs7ZUsWUF22xsAfzc0tWo4LEt09B3O+zx2OTYi23USKT7I\n KtqqHoJSbuKz3UCoaAHicUDT2dx5ZzS7400ohhBiwn1P07pc8PZYWyJKv50YJjBmDCH0\n G5Z73i3y19ecj7wkmRkW1QHRVsiCsCDT3KTNl62+15kY3+2rOWtyMKEdXbk7VpU6eRZt\n KBCvquX4Pels3wsHnHv6gKSu7zrpRMDQ1pKDiOUKllXC15CZMi0tm3No76BPJ/ZP4bvi\n pZRs3EesscS0qHKW/YruS3+qOHVIa7Ii69fiPJAwOpMd6Rf3CqvWILXa+U+trQAoe4zB\n 0hJw==", "X-Gm-Message-State": "AOJu0Yz/EmVsOyXIHoO7Saj4/Ll/0of0dr/FVudDib6V8Fwg5BbPNiim\n GivM/lQxaNCqk1fUvpUbkfkNsRayU3YFZA==", "X-Google-Smtp-Source": "\n AGHT+IHjLvu6KPD2FrIUf9TYJkByieLtz07J+9jEYgU+WYMdFWcTWKR5vUAW4coDj7LrLXbftjyRKw==", "X-Received": "by 2002:a05:600c:4444:b0:40d:77d4:395b with SMTP id\n v4-20020a05600c444400b0040d77d4395bmr4184643wmn.59.1704303244894;\n Wed, 03 Jan 2024 09:34:04 -0800 (PST)", "From": "=?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>", "To": "qemu-devel@nongnu.org", "Cc": "qemu-s390x@nongnu.org, qemu-ppc@nongnu.org,\n Richard Henderson <richard.henderson@linaro.org>,\n Song Gao <gaosong@loongson.cn>,\n =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n David Hildenbrand <david@redhat.com>, Aurelien Jarno <aurelien@aurel32.net>,\n Yoshinori Sato <ysato@users.sourceforge.jp>,\n Yanan Wang <wangyanan55@huawei.com>, Bin Meng <bin.meng@windriver.com>,\n Laurent Vivier <lvivier@redhat.com>, Michael Rolnik <mrolnik@gmail.com>,\n Alexandre Iooss <erdnaxe@crans.org>, David Woodhouse <dwmw2@infradead.org>,\n Laurent Vivier <laurent@vivier.eu>, Paolo Bonzini <pbonzini@redhat.com>,\n Brian Cain <bcain@quicinc.com>,\n Daniel Henrique Barboza <danielhb413@gmail.com>,\n Beraldo Leal <bleal@redhat.com>, Paul Durrant <paul@xen.org>,\n Mahmoud Mandour <ma.mandourr@gmail.com>, Thomas Huth <thuth@redhat.com>,\n Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Cleber Rosa <crosa@redhat.com>,\n kvm@vger.kernel.org, Peter Maydell <peter.maydell@linaro.org>,\n Wainer dos Santos Moschetta <wainersm@redhat.com>, =?utf-8?q?Alex_Benn?=\n\t=?utf-8?q?=C3=A9e?= <alex.bennee@linaro.org>, qemu-arm@nongnu.org,\n Weiwei Li <liwei1518@gmail.com>,\n =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n John Snow <jsnow@redhat.com>,\n Daniel Henrique Barboza <dbarboza@ventanamicro.com>,\n Nicholas Piggin <npiggin@gmail.com>, Palmer Dabbelt <palmer@dabbelt.com>,\n Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,\n Ilya Leoshkevich <iii@linux.ibm.com>,\n =?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org>,\n \"Edgar E. Iglesias\" <edgar.iglesias@gmail.com>,\n Eduardo Habkost <eduardo@habkost.net>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>, qemu-riscv@nongnu.org,\n Alistair Francis <alistair.francis@wdc.com>,\n Akihiko Odaki <akihiko.odaki@daynix.com>", "Subject": "[PATCH v2 32/43] gdbstub: Simplify XML lookup", "Date": "Wed, 3 Jan 2024 17:33:38 +0000", "Message-Id": "<20240103173349.398526-33-alex.bennee@linaro.org>", "X-Mailer": "git-send-email 2.39.2", "In-Reply-To": "<20240103173349.398526-1-alex.bennee@linaro.org>", "References": "<20240103173349.398526-1-alex.bennee@linaro.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2a00:1450:4864:20::333;\n envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com", "X-Spam_score_int": "-20", "X-Spam_score": "-2.1", "X-Spam_bar": "--", "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,\n T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no", "X-Spam_action": "no action", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://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 <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "From: Akihiko Odaki <akihiko.odaki@daynix.com>\n\nNow we know all instances of GDBFeature that is used in CPU so we can\ntraverse them to find XML. This removes the need for a CPU-specific\nlookup function for dynamic XMLs.\n\nSigned-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>\nReviewed-by: Alex Bennée <alex.bennee@linaro.org>\nMessage-Id: <20231213-gdb-v17-7-777047380591@daynix.com>\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>\n---\n include/exec/gdbstub.h | 6 +++\n gdbstub/gdbstub.c | 118 +++++++++++++++++++++--------------------\n hw/core/cpu-common.c | 5 +-\n 3 files changed, 69 insertions(+), 60 deletions(-)", "diff": "diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h\nindex bcaab1bc750..82a8afa237f 100644\n--- a/include/exec/gdbstub.h\n+++ b/include/exec/gdbstub.h\n@@ -27,6 +27,12 @@ typedef struct GDBFeatureBuilder {\n typedef int (*gdb_get_reg_cb)(CPUState *cpu, GByteArray *buf, int reg);\n typedef int (*gdb_set_reg_cb)(CPUState *cpu, uint8_t *buf, int reg);\n \n+/**\n+ * gdb_init_cpu(): Initialize the CPU for gdbstub.\n+ * @cpu: The CPU to be initialized.\n+ */\n+void gdb_init_cpu(CPUState *cpu);\n+\n /**\n * gdb_register_coprocessor() - register a supplemental set of registers\n * @cpu - the CPU associated with registers\ndiff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c\nindex 21fea7fffae..1d5c1da1b24 100644\n--- a/gdbstub/gdbstub.c\n+++ b/gdbstub/gdbstub.c\n@@ -352,6 +352,7 @@ static const char *get_feature_xml(const char *p, const char **newp,\n {\n CPUState *cpu = gdb_get_first_cpu_in_process(process);\n CPUClass *cc = CPU_GET_CLASS(cpu);\n+ GDBRegisterState *r;\n size_t len;\n \n /*\n@@ -365,7 +366,6 @@ static const char *get_feature_xml(const char *p, const char **newp,\n /* Is it the main target xml? */\n if (strncmp(p, \"target.xml\", len) == 0) {\n if (!process->target_xml) {\n- GDBRegisterState *r;\n g_autoptr(GPtrArray) xml = g_ptr_array_new_with_free_func(g_free);\n \n g_ptr_array_add(\n@@ -380,18 +380,12 @@ static const char *get_feature_xml(const char *p, const char **newp,\n g_markup_printf_escaped(\"<architecture>%s</architecture>\",\n cc->gdb_arch_name(cpu)));\n }\n- g_ptr_array_add(\n- xml,\n- g_markup_printf_escaped(\"<xi:include href=\\\"%s\\\"/>\",\n- cc->gdb_core_xml_file));\n- if (cpu->gdb_regs) {\n- for (guint i = 0; i < cpu->gdb_regs->len; i++) {\n- r = &g_array_index(cpu->gdb_regs, GDBRegisterState, i);\n- g_ptr_array_add(\n- xml,\n- g_markup_printf_escaped(\"<xi:include href=\\\"%s\\\"/>\",\n- r->feature->xmlname));\n- }\n+ for (guint i = 0; i < cpu->gdb_regs->len; i++) {\n+ r = &g_array_index(cpu->gdb_regs, GDBRegisterState, i);\n+ g_ptr_array_add(\n+ xml,\n+ g_markup_printf_escaped(\"<xi:include href=\\\"%s\\\"/>\",\n+ r->feature->xmlname));\n }\n g_ptr_array_add(xml, g_strdup(\"</target>\"));\n g_ptr_array_add(xml, NULL);\n@@ -400,20 +394,11 @@ static const char *get_feature_xml(const char *p, const char **newp,\n }\n return process->target_xml;\n }\n- /* Is it dynamically generated by the target? */\n- if (cc->gdb_get_dynamic_xml) {\n- g_autofree char *xmlname = g_strndup(p, len);\n- const char *xml = cc->gdb_get_dynamic_xml(cpu, xmlname);\n- if (xml) {\n- return xml;\n- }\n- }\n- /* Is it one of the encoded gdb-xml/ files? */\n- for (int i = 0; gdb_static_features[i].xmlname; i++) {\n- const char *name = gdb_static_features[i].xmlname;\n- if ((strncmp(name, p, len) == 0) &&\n- strlen(name) == len) {\n- return gdb_static_features[i].xml;\n+ /* Is it one of the features? */\n+ for (guint i = 0; i < cpu->gdb_regs->len; i++) {\n+ r = &g_array_index(cpu->gdb_regs, GDBRegisterState, i);\n+ if (strncmp(p, r->feature->xmlname, len) == 0) {\n+ return r->feature->xml;\n }\n }\n \n@@ -508,12 +493,10 @@ static int gdb_read_register(CPUState *cpu, GByteArray *buf, int reg)\n return cc->gdb_read_register(cpu, buf, reg);\n }\n \n- if (cpu->gdb_regs) {\n- for (guint i = 0; i < cpu->gdb_regs->len; i++) {\n- r = &g_array_index(cpu->gdb_regs, GDBRegisterState, i);\n- if (r->base_reg <= reg && reg < r->base_reg + r->feature->num_regs) {\n- return r->get_reg(cpu, buf, reg - r->base_reg);\n- }\n+ for (guint i = 0; i < cpu->gdb_regs->len; i++) {\n+ r = &g_array_index(cpu->gdb_regs, GDBRegisterState, i);\n+ if (r->base_reg <= reg && reg < r->base_reg + r->feature->num_regs) {\n+ return r->get_reg(cpu, buf, reg - r->base_reg);\n }\n }\n return 0;\n@@ -528,51 +511,70 @@ static int gdb_write_register(CPUState *cpu, uint8_t *mem_buf, int reg)\n return cc->gdb_write_register(cpu, mem_buf, reg);\n }\n \n- if (cpu->gdb_regs) {\n- for (guint i = 0; i < cpu->gdb_regs->len; i++) {\n- r = &g_array_index(cpu->gdb_regs, GDBRegisterState, i);\n- if (r->base_reg <= reg && reg < r->base_reg + r->feature->num_regs) {\n- return r->set_reg(cpu, mem_buf, reg - r->base_reg);\n- }\n+ for (guint i = 0; i < cpu->gdb_regs->len; i++) {\n+ r = &g_array_index(cpu->gdb_regs, GDBRegisterState, i);\n+ if (r->base_reg <= reg && reg < r->base_reg + r->feature->num_regs) {\n+ return r->set_reg(cpu, mem_buf, reg - r->base_reg);\n }\n }\n return 0;\n }\n \n+static void gdb_register_feature(CPUState *cpu, int base_reg,\n+ gdb_get_reg_cb get_reg, gdb_set_reg_cb set_reg,\n+ const GDBFeature *feature)\n+{\n+ GDBRegisterState s = {\n+ .base_reg = base_reg,\n+ .get_reg = get_reg,\n+ .set_reg = set_reg,\n+ .feature = feature\n+ };\n+\n+ g_array_append_val(cpu->gdb_regs, s);\n+}\n+\n+void gdb_init_cpu(CPUState *cpu)\n+{\n+ CPUClass *cc = CPU_GET_CLASS(cpu);\n+ const GDBFeature *feature;\n+\n+ cpu->gdb_regs = g_array_new(false, false, sizeof(GDBRegisterState));\n+\n+ if (cc->gdb_core_xml_file) {\n+ feature = gdb_find_static_feature(cc->gdb_core_xml_file);\n+ gdb_register_feature(cpu, 0,\n+ cc->gdb_read_register, cc->gdb_write_register,\n+ feature);\n+ }\n+\n+ cpu->gdb_num_regs = cpu->gdb_num_g_regs = cc->gdb_num_core_regs;\n+}\n+\n void gdb_register_coprocessor(CPUState *cpu,\n gdb_get_reg_cb get_reg, gdb_set_reg_cb set_reg,\n const GDBFeature *feature, int g_pos)\n {\n GDBRegisterState *s;\n guint i;\n+ int base_reg = cpu->gdb_num_regs;\n \n- if (cpu->gdb_regs) {\n- for (i = 0; i < cpu->gdb_regs->len; i++) {\n- /* Check for duplicates. */\n- s = &g_array_index(cpu->gdb_regs, GDBRegisterState, i);\n- if (s->feature == feature) {\n- return;\n- }\n+ for (i = 0; i < cpu->gdb_regs->len; i++) {\n+ /* Check for duplicates. */\n+ s = &g_array_index(cpu->gdb_regs, GDBRegisterState, i);\n+ if (s->feature == feature) {\n+ return;\n }\n- } else {\n- cpu->gdb_regs = g_array_new(false, false, sizeof(GDBRegisterState));\n- i = 0;\n }\n \n- g_array_set_size(cpu->gdb_regs, i + 1);\n- s = &g_array_index(cpu->gdb_regs, GDBRegisterState, i);\n- s->base_reg = cpu->gdb_num_regs;\n- s->get_reg = get_reg;\n- s->set_reg = set_reg;\n- s->feature = feature;\n+ gdb_register_feature(cpu, base_reg, get_reg, set_reg, feature);\n \n /* Add to end of list. */\n cpu->gdb_num_regs += feature->num_regs;\n if (g_pos) {\n- if (g_pos != s->base_reg) {\n+ if (g_pos != base_reg) {\n error_report(\"Error: Bad gdb register numbering for '%s', \"\n- \"expected %d got %d\", feature->xml,\n- g_pos, s->base_reg);\n+ \"expected %d got %d\", feature->xml, g_pos, base_reg);\n } else {\n cpu->gdb_num_g_regs = cpu->gdb_num_regs;\n }\ndiff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c\nindex 82dae51a550..cd7903ba6e7 100644\n--- a/hw/core/cpu-common.c\n+++ b/hw/core/cpu-common.c\n@@ -27,6 +27,7 @@\n #include \"qemu/main-loop.h\"\n #include \"exec/log.h\"\n #include \"exec/cpu-common.h\"\n+#include \"exec/gdbstub.h\"\n #include \"qemu/error-report.h\"\n #include \"qemu/qemu-print.h\"\n #include \"sysemu/tcg.h\"\n@@ -238,11 +239,10 @@ static void cpu_common_unrealizefn(DeviceState *dev)\n static void cpu_common_initfn(Object *obj)\n {\n CPUState *cpu = CPU(obj);\n- CPUClass *cc = CPU_GET_CLASS(obj);\n \n+ gdb_init_cpu(cpu);\n cpu->cpu_index = UNASSIGNED_CPU_INDEX;\n cpu->cluster_index = UNASSIGNED_CLUSTER_INDEX;\n- cpu->gdb_num_regs = cpu->gdb_num_g_regs = cc->gdb_num_core_regs;\n /* user-mode doesn't have configurable SMP topology */\n /* the default value is changed by qemu_init_vcpu() for system-mode */\n cpu->nr_cores = 1;\n@@ -262,6 +262,7 @@ static void cpu_common_finalize(Object *obj)\n {\n CPUState *cpu = CPU(obj);\n \n+ g_array_free(cpu->gdb_regs, TRUE);\n qemu_lockcnt_destroy(&cpu->in_ioctl_lock);\n qemu_mutex_destroy(&cpu->work_mutex);\n }\n", "prefixes": [ "v2", "32/43" ] }