From nobody Wed Nov 12 10:10:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=ispras.ru ARC-Seal: i=1; a=rsa-sha256; t=1570434140; cv=none; d=zoho.com; s=zohoarc; b=ZmElfLha4EihazU919/AqGNyfpzKTrXLWg+XCHvFy2/v512GjyDb2h0PcZxJtzeZxlyK9LQvpyU4y5ErFxGmjMEZ9KqVd7H4c1RLQL6K2zebfnC9nULaTPKaR6OWqU+PPaMsPwMWGthM0untT3aMG7ew/5fwd19LX1esmPt3OH0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570434140; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=+BzwVRxGZRj6aT1yttG5GwPsKMAYuAivYLoQeNz73j0=; b=eRKD+8oucuqKhr2dF4j1GD8st8ZNTUxFZktbjFe3ADsS13euXF1L7BMwIYJ7LfXiuixs3Ilz7+lx0yS879ng+CRWMh1KpSLD2VO2F/OKkAhoaYwP7crn91+KVIXvIVFCK4Cp8mYUJcVkDL+X0PLgiOYaETztJ0VCmNI1CalTwGA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 157043413962919.64939427403442; Mon, 7 Oct 2019 00:42:19 -0700 (PDT) Received: from localhost ([::1]:41290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHNes-0000vj-Gd for importer@patchew.org; Mon, 07 Oct 2019 03:42:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42676) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHNdu-0008U4-Q7 for qemu-devel@nongnu.org; Mon, 07 Oct 2019 03:41:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHNdt-00089H-5Q for qemu-devel@nongnu.org; Mon, 07 Oct 2019 03:41:18 -0400 Received: from mail.ispras.ru ([83.149.199.45]:49226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iHNds-00084y-PP for qemu-devel@nongnu.org; Mon, 07 Oct 2019 03:41:17 -0400 Received: from mail.ispras.ru (localhost [127.0.0.1]) by mail.ispras.ru (Postfix) with ESMTPSA id 1C71F540082; Mon, 7 Oct 2019 10:41:13 +0300 (MSK) MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Date: Mon, 07 Oct 2019 10:41:13 +0300 From: Mikhail Abakumov To: Qemu Devel Subject: [PATCH] target/mips: add gdb xml files Message-ID: X-Sender: mikhail.abakumov@ispras.ru User-Agent: Roundcube Webmail/1.1.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 83.149.199.45 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arikalo@wavecomp.com, philmd@redhat.com, alex.bennee@linaro.org, amarkovic@wavecomp.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8"; format="flowed" From: Mikhail Abakumov This patch add xml files with gdb registers for mips. Signed-off-by: Mikhail Abakumov Acked-by: Alex Benn=C3=A9e --- configure | 3 ++ gdb-xml/mips-core.xml | 84 +++++++++++++++++++++++++++++++++++++++++ gdb-xml/mips64-core.xml | 84 +++++++++++++++++++++++++++++++++++++++++ target/mips/cpu.c | 11 ++++++ 4 files changed, 182 insertions(+) create mode 100644 gdb-xml/mips-core.xml create mode 100644 gdb-xml/mips64-core.xml diff --git a/configure b/configure index 8f8446f52b..5bb2c62194 100755 --- a/configure +++ b/configure @@ -7466,12 +7466,14 @@ case "$target_name" in mips|mipsel) mttcg=3D"yes" TARGET_ARCH=3Dmips + gdb_xml_files=3D"mips-core.xml" echo "TARGET_ABI_MIPSO32=3Dy" >> $config_target_mak ;; mipsn32|mipsn32el) mttcg=3D"yes" TARGET_ARCH=3Dmips64 TARGET_BASE_ARCH=3Dmips + gdb_xml_files=3D"mips64-core.xml" echo "TARGET_ABI_MIPSN32=3Dy" >> $config_target_mak echo "TARGET_ABI32=3Dy" >> $config_target_mak ;; @@ -7479,6 +7481,7 @@ case "$target_name" in mttcg=3D"yes" TARGET_ARCH=3Dmips64 TARGET_BASE_ARCH=3Dmips + gdb_xml_files=3D"mips64-core.xml" echo "TARGET_ABI_MIPSN64=3Dy" >> $config_target_mak ;; moxie) diff --git a/gdb-xml/mips-core.xml b/gdb-xml/mips-core.xml new file mode 100644 index 0000000000..a46b2993eb --- /dev/null +++ b/gdb-xml/mips-core.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gdb-xml/mips64-core.xml b/gdb-xml/mips64-core.xml new file mode 100644 index 0000000000..cc1a15ad56 --- /dev/null +++ b/gdb-xml/mips64-core.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/target/mips/cpu.c b/target/mips/cpu.c index bbcf7ca463..014f1db59e 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -181,6 +181,11 @@ static ObjectClass *mips_cpu_class_by_name(const=20 char *cpu_model) return oc; } +static gchar *mips_gdb_arch_name(CPUState *cs) +{ + return g_strdup("mips"); +} + static void mips_cpu_class_init(ObjectClass *c, void *data) { MIPSCPUClass *mcc =3D MIPS_CPU_CLASS(c); @@ -213,6 +218,12 @@ static void mips_cpu_class_init(ObjectClass *c,=20 void *data) cc->tlb_fill =3D mips_cpu_tlb_fill; #endif + cc->gdb_arch_name =3D mips_gdb_arch_name; +#ifdef TARGET_MIPS64 + cc->gdb_core_xml_file =3D "mips64-core.xml"; +#else + cc->gdb_core_xml_file =3D "mips-core.xml"; +#endif cc->gdb_num_core_regs =3D 73; cc->gdb_stop_before_watchpoint =3D true; } --=20 2.17.1