This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] riscv: add gdbserver support
- From: "Maciej W. Rozycki" <macro at wdc dot com>
- To: Simon Marchi <simark at simark dot ca>
- Cc: Jim Wilson <jimw at sifive dot com>, jiangshuai_li at c-sky dot com, Andrew Burgess <andrew dot burgess at embecosm dot com>, guoren at kernel dot org, gdb-patches at sourceware dot org, 夏立方 <lifang_xia at c-sky dot com>, yunhai_shang <yunhai_shang at c-sky dot com>
- Date: Tue, 21 Jan 2020 02:14:01 +0000 (GMT)
- Subject: Re: [PATCH] riscv: add gdbserver support
- Ironport-sdr: 4N2XiGrk4o7UZz2KixjU3dFzpawuMvX7OAPbhCslUVi8ewJmLngCSG/Hubl5PhD/X4VraRKO2F lOEqnNv6v+8jPNO0eZyFxostQt/plFUYk2UMHo2M6XwS+pNSrREdZJWX2pUBKu9imQsFzy4sVm RSWqait1Jh5sbsIHLrDw8AZW8wYIo18V8I2tf617BCldN6zKWQSU1rtdy2/RYwBcBZZdTx4L7D wuRoSImk3Kecq8t0nOnAGUBfm40LX9Re/ID51KJaf8Z4EQKRYg8yis4ox6PDey3dQsKQjigPs7 L8w=
- Ironport-sdr: Ua/YQ2IWhZMJ94hHyQiJOPhm11hkzgslLcQL8cjlGfhKfkbO5hRg/aNYuhwfCOP3fAWY24bcMq rs9ShfVD0v80A0tYD7Q60wuYoI1la5ENS5fcZ2Tb9TYi77q6dO+7faJbHzAZOEoEiUnPZIA2et 3D/3eySbGbKAMwXuVDHhZC49EbQ2vll8eGYzg1YUufgg8/ytlq2CfAYzXPD+DjHgfnaNiEc2gi k87wIrsfjve7c1z0xh7xe7o+sqUnIPlNtU21GJIXVIj69Gs1MZeF+bAqjMx9qMinsBz0GcPIGE wh+04wa7YWfVT1cmDzfgnKex
- Ironport-sdr: H/RqhRh7166l15m2rN3w6GplcpjF5fV1Iu1ThUh4A98Vd+2qoNlufQlEXbj9wvUhjnKma3eGcl E5VIxzWm3zIoBKOKnMiDiLPkC6/0WwliNVYYS5h+xTisco4kJWET90UTyU4+MB+8HN7BkxXGmj 6tusWprZeW7gba4HjVTjqPK1pKw63/tUC3nQQs3Kk1+U50S6+Ir9QTfA5dZIt5WmTRU2RFSMuG JqvCTl7XbwT6qjKKUzKza1DkZRfqRoGVVDXGshNw+ALV8Ey68NIa+zyWyK8V+qGj0ek0I6zIS7 PSc=
- References: <00e401d5cb52$63a4d000$2aee7000$@c-sky.com> <CAFyWVaa7ADP_SmBVoan9AOkWK9parEz5EENZZL5vY+_GcD9SrA@mail.gmail.com> <alpine.LFD.2.21.2001202307240.15714@redsun52.ssa.fujisawa.hgst.com> <3a15e9f5-099f-3be0-e3f1-0e17c2959158@simark.ca>
- Wdcironportexception: Internal
On Mon, 20 Jan 2020, Simon Marchi wrote:
> > Offhand I can see the proposal fails to implement XML register
> > descriptions, which I think every modern port is expected to do (we also
> > need to disallow non-XML-enabled RISC-V stubs in GDB proper, as we
> > discussed before; I fail to understand why it wasn't done right away with
> > the initial implementation, as it's quite straightforward and would have
> > set the policy for debug stubs right from the beginning).
>
> I would also expect new ports to use XML target descriptions. And I see
> that there is already code in arch/riscv.c to build target descriptions based
> on detected features... so should gdbserver use it?
Yes, that's what I used with my implementation; a minor change was
required for `riscv_create_target_description' not to return a `const'
result (or `init_target_desc' couldn't be called on it).
Unfortunately the result is not accepted by GDB proper as it does not
know architecture names produced by this code (and native support bypasses
this step as it uses a different code path for XML description setup). I
haven't got to fixing that yet and therefore I have concluded my
`gdbserver' implementation is not ready for upstreaming at this point;
test results, although clearly not catastrophic, are also affected by this
problem I believe.
Maciej