Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5A4CC4740A for ; Mon, 7 Oct 2019 07:42:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BDE462084D for ; Mon, 7 Oct 2019 07:42:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDE462084D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ispras.ru Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHNeo-0000vj-VB for qemu-devel@archiver.kernel.org; Mon, 07 Oct 2019 03:42:14 -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-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Mikhail Abakumov This patch add xml files with gdb registers for mips. Signed-off-by: Mikhail Abakumov --- 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="yes" TARGET_ARCH=mips + gdb_xml_files="mips-core.xml" echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak ;; mipsn32|mipsn32el) mttcg="yes" TARGET_ARCH=mips64 TARGET_BASE_ARCH=mips + gdb_xml_files="mips64-core.xml" echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak echo "TARGET_ABI32=y" >> $config_target_mak ;; @@ -7479,6 +7481,7 @@ case "$target_name" in mttcg="yes" TARGET_ARCH=mips64 TARGET_BASE_ARCH=mips + gdb_xml_files="mips64-core.xml" echo "TARGET_ABI_MIPSN64=y" >> $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 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 = MIPS_CPU_CLASS(c); @@ -213,6 +218,12 @@ static void mips_cpu_class_init(ObjectClass *c, void *data) cc->tlb_fill = mips_cpu_tlb_fill; #endif + cc->gdb_arch_name = mips_gdb_arch_name; +#ifdef TARGET_MIPS64 + cc->gdb_core_xml_file = "mips64-core.xml"; +#else + cc->gdb_core_xml_file = "mips-core.xml"; +#endif cc->gdb_num_core_regs = 73; cc->gdb_stop_before_watchpoint = true; } -- 2.17.1