This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 3/3] gdbserver: Add RISC-V/Linux support
- From: "Maciej W. Rozycki" <macro at wdc dot com>
- To: Jim Wilson <jimw at sifive dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Andrew Burgess <andrew dot burgess at embecosm dot com>, Palmer Dabbelt <palmer at dabbelt dot com>, Tom Tromey <tom at tromey dot com>, "guoren at kernel dot org" <guoren at kernel dot org>, "lifang_xia at c-sky dot com" <lifang_xia at c-sky dot com>, "yunhai_shang at c-sky dot com" <yunhai_shang at c-sky dot com>, "jiangshuai_li at c-sky dot com" <jiangshuai_li at c-sky dot com>
- Date: Thu, 30 Jan 2020 00:13:42 +0000 (GMT)
- Subject: Re: [PATCH v2 3/3] gdbserver: Add RISC-V/Linux support
- Ironport-sdr: 3TYVXjJvEeHO1pQAkQsAjpGeVnhcMCObTOKbzwO0ih/jktiRRM7XwBHjv+kgAeqpkLewEZ5JkW KXAAH5D5UqPwKuyJJMXOnOHGVjRzUK8CkBuB3tXxXj1IGije5YqaUPKFMk+N6KQRqYmWeL81mH UJashBzY4TiyqHnJTUt1T6zvR0LOoUenGkhGZQCAiZ0lpt14RYx+6wce4PxhD9onoZUzSKKHhI 0CbwqTSNYlQjkP6Yj7KI1/qrEXvvxSzjSSApKRn+qG1alL6JAL75EMoAlClsYMS6/5D30j9VxX 0bI=
- Ironport-sdr: PGsX7hxa47Bx+Xw0ivUF85NomPLhNPNJQigbXxDkKDDRLAfItKQV0VO+oUCJE2W/X/HYbMQzlP NHi0EKoAFKVTidPLx3ePZBF7LZrKBHMmirtKEgTK1hXy0uA7d5KtgOsEfQ1kahWMjs0BXgiApP vhfeE2xudiYs6QNJjtqaMRn9IkSzKpXKVdn9333VM91uYRdD8X4+nXl8qmAzMvmiBQxr6r7T8/ jVSBNz7186OugsUHNK69FvGSeFkP/k71xU2i2nX3UvKJQIAMlXu1fRqGJIaSQo0L/v+wUMQz0t UQDfbEuQzDvSw/Y3oSkQ/hL0
- Ironport-sdr: TkzrLTdfNy0VxljMrp4TlQLNq9ubgAeeF2qGispTPkU3hI+EAveZMvix/NHee0829a7asUyJZu KKUeuvIcrnzM/LpJGSaopO6jbbkMtbQBXYN7qv/EGrZNoN+96Soh0CJ6aZda9ponaVUNT0RTvj PYJopv+U01uJphfesNJgKoatYeXGFq7Nj6IDRTYOrZC9jNJSKLfTAXKeavYPgUwASRIFOvSNwv MW+yKPiMjV5onvu8U46p3uzO29dKEUEj2zDPgzjhe6vLMOxJAsmWrDUQmX79WoVgDBZIrU5r5G Emw=
- References: <alpine.LFD.2.21.2001291207310.14118@redsun52.ssa.fujisawa.hgst.com> <alpine.LFD.2.21.2001291412560.14118@redsun52.ssa.fujisawa.hgst.com> <CAFyWVaapE78div4jp65HrHLyRogbkWyg-XYeLxXUa-3f8MZE-Q@mail.gmail.com>
- Wdcironportexception: Internal
On Wed, 29 Jan 2020, Jim Wilson wrote:
> 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.
Hmm, good point. I think OPTIONAL_REGS might become a flag, however as
you have observed there seems to be no special meaning indeed to FP_REGS
and actually only a couple of `gdbserver' hosts use this type, so using
OPTIONAL_REGS should be fine. I'll send an update.
> There are some new functions and structures that don't have
> explanatory comments before them, but this is a minor issue.
Right, though I think they are self-explanatory.
Maciej