From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19154 invoked by alias); 27 Jan 2004 10:35:37 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19143 invoked from network); 27 Jan 2004 10:35:34 -0000 Received: from unknown (HELO topsns.toshiba-tops.co.jp) (202.230.225.5) by sources.redhat.com with SMTP; 27 Jan 2004 10:35:34 -0000 Received: from no.name.available by topsns.toshiba-tops.co.jp via smtpd (for sources.redhat.com [67.72.78.213]) with SMTP; 27 Jan 2004 10:36:27 UT Received: from localhost (fragile [172.17.28.65]) by srd2sd.toshiba-tops.co.jp (8.12.10/8.12.10) with ESMTP id i0RAaO1x082899; Tue, 27 Jan 2004 19:36:25 +0900 (JST) (envelope-from anemo@mba.ocn.ne.jp) Date: Tue, 27 Jan 2004 10:35:00 -0000 Message-Id: <20040127.193715.116346446.nemoto@toshiba-tops.co.jp> To: gdb-patches@sources.redhat.com Subject: mips gdbserver reports R0 != 0 From: Atsushi Nemoto X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A B746 CA77 FE94 2874 D52F X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-01/txt/msg00688.txt.bz2 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