From: Jim Wilson <jimw@sifive.com>
To: "Maciej W. Rozycki" <macro@wdc.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
Andrew Burgess <andrew.burgess@embecosm.com>,
Palmer Dabbelt <palmer@dabbelt.com>, Tom Tromey <tom@tromey.com>,
"guoren@kernel.org" <guoren@kernel.org>,
"lifang_xia@c-sky.com" <lifang_xia@c-sky.com>,
"yunhai_shang@c-sky.com" <yunhai_shang@c-sky.com>,
"jiangshuai_li@c-sky.com" <jiangshuai_li@c-sky.com>
Subject: Re: [PATCH v2 3/3] gdbserver: Add RISC-V/Linux support
Date: Thu, 30 Jan 2020 00:00:00 -0000 [thread overview]
Message-ID: <CAFyWVaapE78div4jp65HrHLyRogbkWyg-XYeLxXUa-3f8MZE-Q@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.21.2001291412560.14118@redsun52.ssa.fujisawa.hgst.com>
On Wed, Jan 29, 2020 at 10:14 AM Maciej W. Rozycki <macro@wdc.com> wrote:
> gdb/
> * arch/riscv.h (riscv_create_target_description): Remove `const'
> qualifier from the return type.
> * arch/riscv.c (riscv_create_target_description): Likewise.
> * nat/riscv-linux-tdesc.h (riscv_linux_read_description):
> Likewise.
> * nat/riscv-linux-tdesc.c (riscv_linux_read_description):
> Likewise.
> * configure.tgt <riscv*-*-linux*>: Set build_gdbserver=yes.
>
> gdb/gdbserver/
> * linux-riscv-low.c: New file.
> * Makefile.in (SFILES): Add linux-riscv-low.c, arch/riscv.c, and
> nat/riscv-linux-tdesc.c.
> * configure.srv <riscv*-*-linux*> (srv_tgtobj)
> (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
> Define.
Looks good to me, though I'm not an official review.
I noticed on the gdbserver console I'm getting a lot of ptrace warnings.
ptrace(regsets_fetch_inferior_registers) PID=1678103: Invalid argument
Warning: ptrace(regsets_store_inferior_registers): Invalid argument
This looks like a side effect of having two FP regsets defined, it
tries the first one, fails, and then tries the second one which is
correct. If you mark them as OPTIONAL_REGS we would only get the
warning once which would be OK, except that they can't be both FP_REGS
and OPTIONAL_REGS at the same time. I don't know what if anything
would break if they aren't marked as FP_REGS. I only see explicit
checks for GENERAL_REGS and OPTIONAL_REGS; I don't see any checks for
FP_REGS. Anyways, I would suggest as a future improvement that the
linux gdbserver regset support be extended so that a regset can be
marked as both FP_REGS and OPTIONAL_REGS.
There are some new functions and structures that don't have
explanatory comments before them, but this is a minor issue.
Jim
next prev parent reply other threads:[~2020-01-29 23:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.LFD.2.21.2001291207310.14118@redsun52.ssa.fujisawa.hgst.com>
2020-01-29 18:13 ` [PATCH v2 1/3] RISC-V/Linux/native: Determine FLEN dynamically Maciej W. Rozycki
2020-01-29 23:26 ` Jim Wilson
2020-01-30 0:13 ` Maciej W. Rozycki
2020-01-30 23:19 ` Jim Wilson
2020-01-31 0:06 ` Andreas Schwab
2020-01-31 12:11 ` Maciej W. Rozycki
2020-01-29 18:14 ` [PATCH v2 2/3] RISC-V/Linux/native: Factor out target description determination Maciej W. Rozycki
2020-01-29 23:39 ` Jim Wilson
[not found] ` <alpine.LFD.2.21.2001291412560.14118@redsun52.ssa.fujisawa.hgst.com>
2020-01-30 0:00 ` Jim Wilson [this message]
2020-01-30 1:58 ` [PATCH v2 3/3] gdbserver: Add RISC-V/Linux support Maciej W. Rozycki
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=CAFyWVaapE78div4jp65HrHLyRogbkWyg-XYeLxXUa-3f8MZE-Q@mail.gmail.com \
--to=jimw@sifive.com \
--cc=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=guoren@kernel.org \
--cc=jiangshuai_li@c-sky.com \
--cc=lifang_xia@c-sky.com \
--cc=macro@wdc.com \
--cc=palmer@dabbelt.com \
--cc=tom@tromey.com \
--cc=yunhai_shang@c-sky.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