This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix regcache_restore() handling of unavailable regs.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]