From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: gdb-patches@sourceware.org, Tom Tromey <tom@tromey.com>,
Andrew Burgess <aburgess@redhat.com>
Subject: [PATCH v2 0/5] gdb: Add basic support for LoongArch
Date: Thu, 20 Jan 2022 08:50:06 +0800 [thread overview]
Message-ID: <20220120005011.4531-1-yangtiezhu@loongson.cn> (raw)
In November 2021, my workmate Zhensong Liu submitted a single gdb
patch [1] to support LoongArch which is a new RISC architecture,
thanks Zhensong for his great work.
It seems that the patch is too big to review, a patch series would be
easier to review after internal discussion.
This patchset only adds the minimal changes as simple as possible, the
basic command "run", "break", "continue", "next", "step" and "quit" can
be used to debug.
This is the first step, we will submit other more patches step by step
in the future, these small patches make an easily understood change that
can be verified by reviewers, any comments will be much appreciated.
Here are some test results:
$ make check-gdb TESTS="gdb.base/a2-run.exp"
$ cat gdb/testsuite/gdb.sum
[...]
PASS: gdb.base/a2-run.exp: run "a2-run" with no args
PASS: gdb.base/a2-run.exp: no spurious messages at program exit
PASS: gdb.base/a2-run.exp: run "a2-run" with arg
PASS: gdb.base/a2-run.exp: run "a2-run" again with same args
PASS: gdb.base/a2-run.exp: set args
PASS: gdb.base/a2-run.exp: run after setting args to nil
PASS: gdb.base/a2-run.exp: set args 6
PASS: gdb.base/a2-run.exp: run "a2-run" again after setting args
PASS: gdb.base/a2-run.exp: run "a2-run" with shell
=== gdb Summary ===
# of expected passes 9
[...]
$ make check-gdb TESTS="gdb.base/access-mem-running.exp"
$ cat gdb/testsuite/gdb.sum
[...]
PASS: gdb.base/access-mem-running.exp: all-stop: continuing
PASS: gdb.base/access-mem-running.exp: all-stop: get global_counter once
PASS: gdb.base/access-mem-running.exp: all-stop: get global_counter twice
PASS: gdb.base/access-mem-running.exp: all-stop: value changed
PASS: gdb.base/access-mem-running.exp: all-stop: print global_var before writing
PASS: gdb.base/access-mem-running.exp: all-stop: write to global_var
PASS: gdb.base/access-mem-running.exp: all-stop: print global_var after writing
PASS: gdb.base/access-mem-running.exp: all-stop: write to global_var again
PASS: gdb.base/access-mem-running.exp: all-stop: b maybe_stop_here
PASS: gdb.base/access-mem-running.exp: all-stop: breakpoint hits
PASS: gdb.base/access-mem-running.exp: non-stop: continuing
PASS: gdb.base/access-mem-running.exp: non-stop: get global_counter once
PASS: gdb.base/access-mem-running.exp: non-stop: get global_counter twice
PASS: gdb.base/access-mem-running.exp: non-stop: value changed
PASS: gdb.base/access-mem-running.exp: non-stop: print global_var before writing
PASS: gdb.base/access-mem-running.exp: non-stop: write to global_var
PASS: gdb.base/access-mem-running.exp: non-stop: print global_var after writing
PASS: gdb.base/access-mem-running.exp: non-stop: write to global_var again
PASS: gdb.base/access-mem-running.exp: non-stop: b maybe_stop_here
PASS: gdb.base/access-mem-running.exp: non-stop: breakpoint hits
=== gdb Summary ===
# of expected passes 20
[...]
The v1 of this patchset:
https://sourceware.org/pipermail/gdb-patches/2021-December/184354.html
The LoongArch documents:
https://loongson.github.io/LoongArch-Documentation/README-EN.html
The LoongArch ELF ABI Documents:
https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html
The LoongArch binutils has been merged into trunk:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=e9a0721f8274
[1] https://sourceware.org/pipermail/gdb-patches/2021-November/183353.html
Tiezhu Yang (5):
gdb: LoongArch: Add initial target description support
gdb: LoongArch: Add initial baremetal support
gdb: LoongArch: Add initial Linux target support
gdb: LoongArch: Add initial native Linux support
gdb: LoongArch: Add Makefile, configure and NEWS
gdb/Makefile.in | 8 +
gdb/NEWS | 4 +
gdb/arch/loongarch.c | 88 +++++++++
gdb/arch/loongarch.h | 73 +++++++
gdb/configure.host | 3 +
gdb/configure.nat | 4 +
gdb/configure.tgt | 11 ++
gdb/doc/gdb.texinfo | 10 +
gdb/features/Makefile | 3 +
gdb/features/loongarch/base32.c | 47 +++++
gdb/features/loongarch/base32.xml | 44 +++++
gdb/features/loongarch/base64.c | 47 +++++
gdb/features/loongarch/base64.xml | 44 +++++
gdb/loongarch-linux-nat.c | 184 +++++++++++++++++
gdb/loongarch-linux-tdep.c | 151 ++++++++++++++
gdb/loongarch-tdep.c | 316 ++++++++++++++++++++++++++++++
gdb/loongarch-tdep.h | 49 +++++
17 files changed, 1086 insertions(+)
create mode 100644 gdb/arch/loongarch.c
create mode 100644 gdb/arch/loongarch.h
create mode 100644 gdb/features/loongarch/base32.c
create mode 100644 gdb/features/loongarch/base32.xml
create mode 100644 gdb/features/loongarch/base64.c
create mode 100644 gdb/features/loongarch/base64.xml
create mode 100644 gdb/loongarch-linux-nat.c
create mode 100644 gdb/loongarch-linux-tdep.c
create mode 100644 gdb/loongarch-tdep.c
create mode 100644 gdb/loongarch-tdep.h
--
2.27.0
next 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 Tiezhu Yang [this message]
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 ` [PATCH v2 5/5] gdb: LoongArch: Add Makefile, configure and NEWS Tiezhu Yang
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-1-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).