This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] gdb.server testcases (resend)


On Tue, May 24, 2005 at 02:32:09AM -0700, Wu Zhou wrote:
> > > 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.

I missed that in your message.  The other alternative is that a
breakpoint is somehow corrupting program state (condition codes, for
instance).  This could be a kernel bug or a GDB bug; it wouldn't be the
first time.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]