This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC][PATCH 4/4] gdbserver: Add RISC-V/Linux support
- From: Tom Tromey <tom at tromey dot com>
- To: "Maciej W. Rozycki" <macro at wdc dot com>
- Cc: gdb-patches at sourceware dot org, Jim Wilson <jimw at sifive dot com>, 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, lifang_xia at c-sky dot com, yunhai_shang at c-sky dot com, jiangshuai_li at c-sky dot com
- Date: Thu, 23 Jan 2020 14:42:19 -0700
- Subject: Re: [RFC][PATCH 4/4] gdbserver: Add RISC-V/Linux support
- References: <alpine.LFD.2.21.2001231412510.14118@redsun52.ssa.fujisawa.hgst.com> <alpine.LFD.2.21.2001231518180.14118@redsun52.ssa.fujisawa.hgst.com>
>>>>> "Maciej" == Maciej W Rozycki <macro@wdc.com> writes:
Maciej> Implement RISC-V/Linux support for both RV64 and RV32 systems, including
Maciej> XML target description handling based on features determined, GPR and
Maciej> FPR regset support including dynamic sizing of the latter, and software
Maciej> breakpoint handling.
I saw a couple of small nits here.
Maciej> Also handle a glibc bug where ELF_NFPREG is defined in terms of NFPREG,
Maciej> however NFPREG is nowhere defined.
In case you haven't already, please report this to glibc.
Maciej> As the architecture names come from BFD it will clearly have to be there
Maciej> that the problem is fixed, with the ISA suffixes driving the choice of
Maciej> instructions handled by the disassembler and possibly other functions.
Seems reasonable enough. I don't really know much about this area
though.
Maciej> Also I think large parts of `riscv_linux_nat_target::read_description' in
Maciej> RISC-V/Linux/native support could be factored out to a piece of code
Maciej> shared with `riscv_arch_setup'. This might be less important a problem,
Maciej> but nevertheless I think it should be done sooner than later so as not to
Maciej> make the two pieces diverge
Agreed.
Maciej> +/* Implementation of linux_target_ops method "regs_info". */
Maciej> +
Maciej> +static const struct regs_info *
Maciej> +riscv_regs_info (void)
We stopped using "(void)" in new code, in favor of just "()".
This showed up in a few spots.
Tom