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 Fri, 14 Apr 2017, John Baldwin wrote:
> > What is the output you're getting in this case?
>
> On FreeBSD (which doesn't support fir) I now get this:
If the register is not ever supplied, then you need a target description
that does not include it. The rest of code will then handle it correctly.
> It was more dire on a target that doesn't supply all registers. For example,
> I have an out of tree target for FreeBSD kernels and stopped threads in
> FreeBSD's kernel only supply a subset of GPRs. Without the patch examining
> registers for a stopped thread looks like this:
Why can't the remaining general registers be read or written -- is that a
bug in the kernel?
That sort of defeats the point of debugging, where you'd expect to be
able to poke at any register that is at debuggee's disposal (so not
supplying FIR can be considered a bug too). A program's variable could
live in such an inaccessible register for example.
I'll see if there's anything else I want to comment on in this series
next week.
Maciej