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 2D6F13858C83 for ; Tue, 8 Feb 2022 04:45:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2D6F13858C83 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 [10.130.0.135] (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxz+JZ9QFiYicIAA--.26115S3; Tue, 08 Feb 2022 12:45:13 +0800 (CST) Subject: Re: [PING] [PATCH v2 0/5] gdb: Add basic support for LoongArch To: gdb-patches@sourceware.org, Tom Tromey , Andrew Burgess References: <20220120005011.4531-1-yangtiezhu@loongson.cn> From: Tiezhu Yang Message-ID: Date: Tue, 8 Feb 2022 12:45:13 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20220120005011.4531-1-yangtiezhu@loongson.cn> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf9Dxz+JZ9QFiYicIAA--.26115S3 X-Coremail-Antispam: 1UD129KBjvJXoW3Xw4DGry7uF1xWw17XF4Utwb_yoWxJr18pr 4xuF13GrsFvr9rJwn2q3WagF90gws3GryjgaySkr1Ykrn0vryUtr4kXr45AF4DJ34Fyw12 grn3C3yUuFy3AFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvIb7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwV C2z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC 0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr 1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMxk0xIA0c2IEe2xFo4CEbIxvr21l c2xSY4AK67AK6r45MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I 0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWU XVWUAwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcV CY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_WFyUJVCq3wCI42IY6I8E87Iv 67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf 9x07bw2NNUUUUU= X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, SCC_5_SHORT_WORD_LINES, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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: Tue, 08 Feb 2022 04:45:21 -0000 On 01/20/2022 08:50 AM, Tiezhu Yang wrote: > 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 > Hi, Any comments for this version? [PATCH v2 1/5] gdb: LoongArch: Add initial target description support https://sourceware.org/pipermail/gdb-patches/2022-January/185314.html [PATCH v2 2/5] gdb: LoongArch: Add initial baremetal support https://sourceware.org/pipermail/gdb-patches/2022-January/185316.html [PATCH v2 3/5] gdb: LoongArch: Add initial Linux target support https://sourceware.org/pipermail/gdb-patches/2022-January/185315.html [PATCH v2 4/5] gdb: LoongArch: Add initial native Linux support https://sourceware.org/pipermail/gdb-patches/2022-January/185317.html [PATCH v2 5/5] gdb: LoongArch: Add Makefile, configure and NEWS https://sourceware.org/pipermail/gdb-patches/2022-January/185319.html Thanks, Tiezhu