This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix regcache_restore() handling of unavailable regs.
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: David Miller <davem at davemloft dot net>
- Date: Tue, 11 Oct 2011 11:44:49 +0100
- Subject: Re: [PATCH] Fix regcache_restore() handling of unavailable regs.
- References: <20111011.024027.2269565520682513251.davem@davemloft.net>
On Tuesday 11 October 2011 07:40:27, David Miller wrote:
>
> Across inferior dummy calls, regcache entries which were "unavailable"
> were restored incorrectly after such dummy calls. The problem is
> incorrect interpretation of cooked_read()'s return value in
> regcache_restore().
>
> Ok to commit?
Okay.
I don't think the problem is fully solved though. If it happens
that the same set of registers are unavailable in src/dst,
then things work. If if not, nothing is marking the dst
register as unavailable. And that's tricky, due to pseudo
registers, and partially available registers. I think this will
need a bit more surgery to fix properly. Until then, please
apply your patch. I'll add a TODO to think about this.
OOC, what register are you seeing as unavailable? Is this a
case of ptrace not exposing all the machine's registers?
A context where the kernel hasn't saved all registers (a signal
frame, or something like that). Something else?
Thanks.
--
Pedro Alves