From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: gdb-patches@sourceware.org, Tom Tromey <tom@tromey.com>,
Andrew Burgess <aburgess@redhat.com>
Subject: [PATCH v2 5/5] gdb: LoongArch: Add Makefile, configure and NEWS
Date: Thu, 20 Jan 2022 08:50:11 +0800 [thread overview]
Message-ID: <20220120005011.4531-6-yangtiezhu@loongson.cn> (raw)
In-Reply-To: <20220120005011.4531-1-yangtiezhu@loongson.cn>
This commit adds Makefile, configure and NEWS for LoongArch.
Signed-off-by: Zhensong Liu <liuzhensong@loongson.cn>
Signed-off-by: Qing zhang <zhangqing@loongson.cn>
Signed-off-by: Youling Tang <tangyouling@loongson.cn>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
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
next prev parent reply other threads:[~2022-01-20 0:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 0:50 [PATCH v2 0/5] gdb: Add basic support for LoongArch Tiezhu Yang
2022-01-20 0:50 ` [PATCH v2 1/5] gdb: LoongArch: Add initial target description support Tiezhu Yang
2022-01-20 0:50 ` [PATCH v2 2/5] gdb: LoongArch: Add initial baremetal support Tiezhu Yang
2022-01-20 0:50 ` [PATCH v2 3/5] gdb: LoongArch: Add initial Linux target support Tiezhu Yang
2022-01-20 0:50 ` [PATCH v2 4/5] gdb: LoongArch: Add initial native Linux support Tiezhu Yang
2022-01-20 0:50 ` Tiezhu Yang [this message]
2022-02-08 4:45 ` [PING] [PATCH v2 0/5] gdb: Add basic support for LoongArch Tiezhu Yang
2022-02-10 19:57 ` Tom Tromey
2022-02-11 12:50 ` Tiezhu Yang
2022-02-11 13:40 ` Simon Marchi
2022-02-12 7:59 ` Tiezhu Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220120005011.4531-6-yangtiezhu@loongson.cn \
--to=yangtiezhu@loongson.cn \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).