From: Daniel Jacobowitz <drow@mvista.com>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: gdb-patches@sources.redhat.com
Subject: Re: mips gdbserver reports R0 != 0
Date: Tue, 27 Jan 2004 14:17:00 -0000 [thread overview]
Message-ID: <20040127141718.GA22917@nevyn.them.org> (raw)
In-Reply-To: <20040127.193715.116346446.nemoto@toshiba-tops.co.jp>
On Tue, Jan 27, 2004 at 07:37:15PM +0900, Atsushi Nemoto wrote:
> 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.
Did it fix the stepping problem, or did it fix the value displayed for
$zero?
The register at that address is actually a saved flag used for syscall
restarting. I have some local patches to support it properly, but I
haven't had time to do anything with them :( Partly because of the
number of gross hacks involved.
> --- 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
>
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2004-01-27 14:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-27 10:35 Atsushi Nemoto
2004-01-27 14:17 ` Daniel Jacobowitz [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040127141718.GA22917@nevyn.them.org \
--to=drow@mvista.com \
--cc=anemo@mba.ocn.ne.jp \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox