From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Xi Ruoyao <xry111@xry111.site>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: LoongArch: add orig_a0 into register set
Date: Mon, 4 Jul 2022 10:50:28 +0800 [thread overview]
Message-ID: <a7068939-c775-d5ea-e391-49a7cff208d2@loongson.cn> (raw)
In-Reply-To: <c90bf3a2866565030c2c5a988cbe56d8f96783de.camel@xry111.site>
On 07/03/2022 11:58 AM, Xi Ruoyao wrote:
> Upstreamed Linux kernel has added orig_a0 into struct user_pt_regs.
> Adapt GDB register definition so it will work with upstream kernel.
>
> Url: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/include/uapi/asm/ptrace.h#n24
> Signed-off-by: Xi Ruoyao <xry111@xry111.site>
> ---
> gdb/features/loongarch/base32.c | 1 +
> gdb/features/loongarch/base32.xml | 1 +
> gdb/features/loongarch/base64.c | 1 +
> gdb/features/loongarch/base64.xml | 1 +
> gdb/loongarch-linux-tdep.c | 4 ++++
> gdb/loongarch-tdep.c | 1 +
> gdb/loongarch-tdep.h | 7 ++++---
> 7 files changed, 13 insertions(+), 3 deletions(-)
Hi Ruoyao,
Thank you for your patch.
The related code in gdb/loongarch-linux-nat.c also need to be modified.
Additionally, we know that the LoongArch upstream Linux kernel can not
actually be used before efistub, irqchip and pci are merged [0].
[0]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c6f2f3e2c80e
So I think we can modify the patch subject and the commit message like this:
gdb: LoongArch: Add orig_a0 to match upstream Linux kernel
The basic support for LoongArch has been merged into the upstream Linux
kernel since 5.19-rc1 on June 5, 2022, this commit adds orig_a0 which
is added into struct user_pt_regs [1] to match the upstream kernel, and
then the upstream GDB will work with the upstream kernel.
Note that there is no orig_a0 in struct user_pt_regs in the product kernel
which version is 4.19, if somebody wants to use the upstream GDB with the
product kernel, please revert this commit manually.
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/include/uapi/asm/ptrace.h#n24
Thanks,
Tiezhu
next prev parent reply other threads:[~2022-07-04 2:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-03 3:58 Xi Ruoyao
2022-07-04 2:50 ` Tiezhu Yang [this message]
2022-07-04 6:20 ` [PATCH v2] " Xi Ruoyao
2022-07-05 14:38 ` 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=a7068939-c775-d5ea-e391-49a7cff208d2@loongson.cn \
--to=yangtiezhu@loongson.cn \
--cc=gdb-patches@sourceware.org \
--cc=xry111@xry111.site \
/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).