From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Coder_Y <zewyang@foxmail.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] fix: support LoongArch64 in my-syscalls.S to resolve step-over-thread-exit-while-stop-all-threads.exp build failure
Date: Wed, 22 Oct 2025 17:06:04 +0800 [thread overview]
Message-ID: <65c71082-d906-4a11-2f6c-45b15e9151df@loongson.cn> (raw)
In-Reply-To: <d886ca0f-cdee-7240-2946-f9cb571b19c0@loongson.cn>
On 2025/10/22 下午4:48, Tiezhu Yang wrote:
> On 2025/10/22 上午3:30, Coder_Y wrote:
>> This patch adds syscall wrappers for LoongArch64 to
>> gdb/testsuite/lib/my-syscalls.S.
>
> It is better to change the patch title to:
> gdb/testsuite: Add LoongArch case in my-syscalls.S
>
>> - Implements the missing `__loongarch64` section
>> - Uses `lu12i.w` + `ori` to load the syscall number into `$a7`
>
> Why not using the instruction "li.w" directly?
>
>> - Triggers system calls via `syscall 0`
>> - Returns to caller using `jr $ra`
>
> You can use the instruction "ret" to make it more readable.
> please see opcodes/loongarch-opc.c file to get more info.
>
>> This change fixes build failures in LoongArch64 when running:
>> gdb.threads/step-over-thread-exit-while-stop-all-threads.exp
>>
>> Tested on: loongarch64-unknown-linux-gnu
>> Result: expected testcases passed
>
> Did you meet any real problems when debugging?
> If yes, please describe it in the commit message.
>
>> Signed-off-by: Nick Young <zewyang@foxmail.com>
>
> Please use your real name here and make it consistent with 'From'
> instead of abbreviation.
Forgot to say, it should use your company email if you are an
employee of Loongson company (we have signed the FSF copyright
assignment), then I can push the updated patch for you.
Thanks,
Tiezhu
next prev parent reply other threads:[~2025-10-22 9:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 19:30 Coder_Y
2025-10-22 8:48 ` Tiezhu Yang
2025-10-22 9:06 ` Tiezhu Yang [this message]
2025-10-23 1:29 ` yangzewei
2025-10-23 1:45 ` [PATCH V2] gdb/testsuite: Add LoongArch case in my-syscalls.S Zewei Yang
2025-10-24 2:44 ` Tiezhu Yang
2025-10-30 14:11 ` 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=65c71082-d906-4a11-2f6c-45b15e9151df@loongson.cn \
--to=yangtiezhu@loongson.cn \
--cc=gdb-patches@sourceware.org \
--cc=zewyang@foxmail.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