Re: mips gdbserver reports R0 != 0

Atsushi Nemoto
2004-01-27T15:01:57Z

>>>>> On Tue, 27 Jan 2004 09:17:18 -0500, Daniel Jacobowitz <drow@mvista.com> said:

>> I could not see the reason (maybe regcache?), but this patch fixed
>> my problem.

drow> Did it fix the stepping problem, or did it fix the value
drow> displayed for $zero?

Both. My stepping problem is triggered by wrong $zero value. I tried
with 'set debug remote 1' and found gdb inserted breakpoint at wrong
place when stepping 'beqz' instruction.

drow> The register at that address is actually a saved flag used for
drow> syscall restarting. I have some local patches to support it
drow> properly, but I haven't had time to do anything with them :(
drow> Partly because of the number of gross hacks involved.

The 'that address' means &pt_regs->regs[0] in kernel, right?

I had not noticed that. Thank you. So my patch is not correct.

Maybe the correct fix is clearing register cache in
new_register_cache(). I will try later.