From: Wu Zhou <woodzltc@cn.ibm.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] gdb.server testcases (resend)
Date: Tue, 24 May 2005 04:17:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.63.0505240222180.29499@plinuxt18.cn.ibm.com> (raw)
In-Reply-To: <20050523123820.GB23940@nevyn.them.org>
On Mon, 23 May 2005, Daniel Jacobowitz wrote:
> Don't do that. Please go read my proposal on gdb@, paying particular
> attention to the description of the MIPS execution environment. The
> reason to always provide 64-bit registers if they are available is that
> they are physically present; the upper 32 bits can affect the behavior
> of the program in some cases. So not displaying them can be very bad!
ok, I got it. I will read your proposal more carefully. Thanks.
> > That SIGFPE error disappeared after applying your patch to latest
> > GDB cvs tree. But I met with another strange problem when debugging
> > gdb.base/break, which defines the following function:
> >
> > int factorial (value)
> > int value;
> > #endif
> > {
> > if (value > 1) { /* set breakpoint 7 here */
> > value *= factorial (value - 1);
> > }
> > return (value); /* set breakpoint 19 here */
> > }
> >
> > normally factorial(6) will recursively call itself 5 times and return
> > 720. However while using 64-bit gdbserver on 64-bit binary, it doesn't
> > call factorial(5) at all, return directly 6 as the result.
> >
> > I am suspecting that "value > 1" doesn't get executed, so I change the
> > conditional statement to "if (value - 1)", it worked! So it turn out
> > that "value > 1" always return 0 in this running context. That is really
> > odd. Any clues you could thought of? Thanks in advance.
>
> Um... your compiler must be broken, then.
Um...can't understand this. If it is like this, how to interpret the fact
that it returns 720 correctly to run gdb.base/break standalone. Anyway I
will try to find another box or another compiler to verify this. Thanks.
Cheers
- Wu Zhou
next prev parent reply other threads:[~2005-05-24 1:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-19 14:46 Wu Zhou
2005-05-19 17:52 ` Manoj Iyer
2005-05-28 22:51 ` [commit] gdbserver for powerpc64-linux Daniel Jacobowitz
2005-05-22 20:40 ` [RFC] gdb.server testcases (resend) Daniel Jacobowitz
2005-05-22 21:01 ` Daniel Jacobowitz
2005-05-23 11:21 ` Wu Zhou
2005-05-23 18:26 ` Daniel Jacobowitz
2005-05-24 4:17 ` Wu Zhou [this message]
2005-05-24 8:29 ` Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2005-05-17 2:38 Manoj Iyer
2005-05-17 19:02 ` Manoj Iyer
2005-05-18 1:45 ` Daniel Jacobowitz
2005-05-18 9:52 ` Manoj Iyer
2005-05-18 16:01 ` Daniel Jacobowitz
2005-05-18 16:29 ` Manoj Iyer
2005-05-18 18:08 ` Daniel Jacobowitz
2005-05-18 22:08 ` Manoj Iyer
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=Pine.LNX.4.63.0505240222180.29499@plinuxt18.cn.ibm.com \
--to=woodzltc@cn.ibm.com \
--cc=drow@false.org \
--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