public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] gdb: Add basic support for LoongArch
@ 2022-01-20  0:50 Tiezhu Yang
  2022-01-20  0:50 ` [PATCH v2 1/5] gdb: LoongArch: Add initial target description support Tiezhu Yang
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Tiezhu Yang @ 2022-01-20  0:50 UTC (permalink / raw)
  To: gdb-patches, Tom Tromey, Andrew Burgess

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-02-12  7:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [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

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).