From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id B922A385800A for ; Thu, 20 Jan 2022 00:50:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B922A385800A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from localhost.localdomain (unknown [111.18.94.40]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9AxuuDIsehhEaoBAA--.6238S7; Thu, 20 Jan 2022 08:50:26 +0800 (CST) From: Tiezhu Yang To: gdb-patches@sourceware.org, Tom Tromey , Andrew Burgess Subject: [PATCH v2 5/5] gdb: LoongArch: Add Makefile, configure and NEWS Date: Thu, 20 Jan 2022 08:50:11 +0800 Message-Id: <20220120005011.4531-6-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220120005011.4531-1-yangtiezhu@loongson.cn> References: <20220120005011.4531-1-yangtiezhu@loongson.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf9AxuuDIsehhEaoBAA--.6238S7 X-Coremail-Antispam: 1UD129KBjvJXoWxAFW8tw43ArWktw17uF48WFg_yoWruryxpr n7Zrn8AF18XFsrJ3WDX395Xr1jqr1DGr4YgFWa9345Zr98Ar18Zw4kCF9rXFn7u3Z0vFWr Zr1fK34DuF4DA37anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU9qb7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26rWj6s0DM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI 8067AKxVWUAVCq3wA2048vs2IY020Ec7CjxVAFwI0_Gr0_Xr1l8cAvFVAK0II2c7xJM28C jxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW8JVW5JwA2z4x0Y4vE2Ix0cI 8IcVCY1x0267AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2 jsIEc7CjxVAFwI0_Cr1j6rxdM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64 kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm 72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64vIr41l4I8I3I 0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWU GVWUWwC2zVAF1VAY17CE14v26r1Y6r17MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI 0_JFI_Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0 rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r 4UJbIYCTnIWIevJa73UjIFyTuYvjxUyPrcDUUUU X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jan 2022 00:50:29 -0000 This commit adds Makefile, configure and NEWS for LoongArch. Signed-off-by: Zhensong Liu Signed-off-by: Qing zhang Signed-off-by: Youling Tang Signed-off-by: Tiezhu Yang --- gdb/Makefile.in | 8 ++++++++ gdb/NEWS | 4 ++++ gdb/configure.host | 3 +++ gdb/configure.nat | 4 ++++ gdb/configure.tgt | 11 +++++++++++ gdb/features/Makefile | 3 +++ 6 files changed, 33 insertions(+) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 3efd2227698..51b9c3fb815 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -745,6 +745,7 @@ ALL_TARGET_OBS = \ arch/arm-get-next-pcs.o \ arch/arm-linux.o \ arch/i386.o \ + arch/loongarch.o \ arch/ppc-linux-common.o \ arm-bsd-tdep.o \ arm-fbsd-tdep.o \ @@ -794,6 +795,8 @@ ALL_TARGET_OBS = \ linux-record.o \ linux-tdep.o \ lm32-tdep.o \ + loongarch-linux-tdep.o \ + loongarch-tdep.o \ m32c-tdep.o \ m32r-linux-tdep.o \ m32r-tdep.o \ @@ -1357,6 +1360,7 @@ HFILES_NO_SRCDIR = \ linux-record.h \ linux-tdep.h \ location.h \ + loongarch-tdep.h \ m2-lang.h \ m32r-tdep.h \ m68k-tdep.h \ @@ -1491,6 +1495,7 @@ HFILES_NO_SRCDIR = \ arch/arc.h \ arch/arm.h \ arch/i386.h \ + arch/loongarch.h \ arch/ppc-linux-common.h \ arch/ppc-linux-tdesc.h \ arch/riscv.h \ @@ -2232,6 +2237,9 @@ ALLDEPFILES = \ linux-record.c \ linux-tdep.c \ lm32-tdep.c \ + loongarch-linux-nat.c \ + loongarch-linux-tdep.c \ + loongarch-tdep.c \ m32r-linux-nat.c \ m32r-linux-tdep.c \ m32r-tdep.c \ diff --git a/gdb/NEWS b/gdb/NEWS index 8c13cefb22f..69f7b47bf49 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -102,6 +102,10 @@ show debug lin-lwp debug linux-nat' and 'show debug linux-nat' should be used instead. +* New targets + +GNU/Linux/LoongArch loongarch*-*-linux* + * Python API ** New function gdb.add_history(), which takes a gdb.Value object diff --git a/gdb/configure.host b/gdb/configure.host index be40cc814fc..da71675b201 100644 --- a/gdb/configure.host +++ b/gdb/configure.host @@ -58,6 +58,7 @@ arc*) gdb_host_cpu=arc ;; arm*) gdb_host_cpu=arm ;; hppa*) gdb_host_cpu=pa ;; i[34567]86*) gdb_host_cpu=i386 ;; +loongarch*) gdb_host_cpu=loongarch ;; m68*) gdb_host_cpu=m68k ;; mips*) gdb_host_cpu=mips ;; powerpc* | rs6000) gdb_host_cpu=powerpc ;; @@ -117,6 +118,8 @@ i[34567]86-*-cygwin*) gdb_host=cygwin ;; ia64-*-linux*) gdb_host=linux ;; +loongarch*-linux*) gdb_host=linux ;; + m68*-*-linux*) gdb_host=linux ;; m68*-*-netbsd* | m68*-*-knetbsd*-gnu) gdb_host=nbsdelf ;; diff --git a/gdb/configure.nat b/gdb/configure.nat index 6fc3978a77e..bebf8b94138 100644 --- a/gdb/configure.nat +++ b/gdb/configure.nat @@ -258,6 +258,10 @@ case ${gdb_host} in # Host: Intel IA-64 running GNU/Linux NATDEPFILES="${NATDEPFILES} ia64-linux-nat.o" ;; + loongarch) + # Host: LoongArch, running GNU/Linux. + NATDEPFILES="${NATDEPFILES} loongarch-linux-nat.o linux-nat-trad.o" + ;; m32r) # Host: M32R based machine running GNU/Linux NATDEPFILES="${NATDEPFILES} m32r-linux-nat.o" diff --git a/gdb/configure.tgt b/gdb/configure.tgt index 56cdfef937b..65f3bf6387d 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -91,6 +91,11 @@ ia64*-*-*) cpu_obs="ia64-tdep.o" ;; +loongarch*-*-*) + # Target: LoongArch baremetal + cpu_obs="loongarch-tdep.o arch/loongarch.o" + ;; + riscv*-*-*) cpu_obs="riscv-tdep.o riscv-none-tdep.o arch/riscv.o \ ravenscar-thread.o riscv-ravenscar-thread.o";; @@ -341,6 +346,12 @@ lm32-*-*) gdb_target_obs="lm32-tdep.o" ;; +loongarch*-*-linux*) + # Target: LoongArch running Linux + gdb_target_obs="loongarch-linux-tdep.o glibc-tdep.o \ + linux-tdep.o solib-svr4.o" + ;; + m32c-*-*) # Target: Renesas M32C family gdb_target_obs="m32c-tdep.o" diff --git a/gdb/features/Makefile b/gdb/features/Makefile index bd39abda108..68e17d0085d 100644 --- a/gdb/features/Makefile +++ b/gdb/features/Makefile @@ -173,6 +173,7 @@ GDB = false aarch64-feature = 1 arm-feature = 1 i386-feature = 1 +loongarch-feature = 1 riscv-feature = 1 tic6x-feature = 1 @@ -226,6 +227,8 @@ FEATURE_XMLFILES = aarch64-core.xml \ i386/64bit-pkeys.xml \ i386/64bit-sse.xml \ i386/x32-core.xml \ + loongarch/base32.xml \ + loongarch/base64.xml \ riscv/rv32e-xregs.xml \ riscv/32bit-cpu.xml \ riscv/32bit-fpu.xml \ -- 2.27.0