Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* mips gdbserver reports R0 != 0
@ 2004-01-27 10:35 Atsushi Nemoto
  2004-01-27 14:17 ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Atsushi Nemoto @ 2004-01-27 10:35 UTC (permalink / raw)
  To: gdb-patches

When I run gdbserver with multi-thread programs on Linux/MIPS, I
noticed sometimes 'step' or 'next' do not work correctly.  I found
that a value of R0 register in 'info reg' output was not 0
(0x30303030) when this problem happen.

> (gdb) c
> Continuing.
> [New Thread 1026]
> [Switching to Thread 1026]
> 
> Breakpoint 2, function1 (arg=0x0) at next.c:30
> 30                      if (func1() == 0) {
> (gdb) info reg
>           zero       at       v0       v1       a0       a1       a2       a3
>  R0   30303030 30048401 004009c8 00000001 00000000 00000000 7f7ffd28 00000000 

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

--- gdb-6.0/gdb/gdbserver/linux-mips-low.c.org	Wed Jun 12 02:32:39 2002
+++ gdb-6.0/gdb/gdbserver/linux-mips-low.c	Tue Jan 27 19:31:58 2004
@@ -69,9 +69,6 @@
   if (mips_regmap[regno] == -1)
     return 1;
 
-  if (find_regno ("zero") == regno)
-    return 1;
-
   return 0;
 }
 
---
Atsushi Nemoto


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-01-30 15:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-27 10:35 mips gdbserver reports R0 != 0 Atsushi Nemoto
2004-01-27 14:17 ` Daniel Jacobowitz
2004-01-27 15:01   ` Atsushi Nemoto
2004-01-27 17:12     ` Daniel Jacobowitz
2004-01-28  1:33       ` Atsushi Nemoto
2004-01-29  1:51         ` Atsushi Nemoto
2004-01-30 15:09           ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox