This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/4] Don't throw an error in 'info registers' for unavailable MIPS GP registers.
On Tue, 18 Apr 2017, John Baldwin wrote:
> > Minimising changes is not our goal though, unlike making them correct.
> > And I think we need to tell apart a situation where a register (FIR) is
> > invalid according to the OS ABI and where a subset of registers may not
> > always be accessible.
>
> For FreeBSD/mips in particular I will probably fix the FIR issue by fixing
> FreeBSD to export FIR.
We'll still have to handle old kernel versions that do not have the fix.
> That said, 'info registers' on other architectures
> is consistent in that they do not throw an error for an unavailable register
> but annotate it as such. The goal of this patch was to align MIPS with
> other architectures in terms of that behavior. Other architectures also
> permit registers to be unavailable without requiring a custom target
> description FWIW (e.g. the segment registers on x86 are effectively
> "optional" and not always supplied by a target).
Agreed, however you need to be clear in your patch description which of
the two bugs present here it is intended to fix.
> > Thanks for checking that. NB I find output above quite messy, especially
> > the lack of column alignment, e.g. `r14' vs `r15'. It makes it hard to
> > read for me.
>
> I don't disagree with the note on alignment. That is probably worth fixing
> in a separate change.
Sure, I haven't asked you or indeed anybody to rush fixing it (although
obviously I won't mind either).
I'll look through v2 of your changes and see if I have any further
concerns.
Maciej