discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDate oddity


From: Richard Frith-Macdonald
Subject: Re: NSDate oddity
Date: Thu, 3 May 2001 21:04:21 +0100

On Thursday, May 3, 2001, at 02:43 PM, David Relson wrote:

Greetings!

I'm using gnustep-base-1.0.0 with linux-2.4.4 on top of a Mandrake 8.0 distribution and have noticed an odd interaction between NSCalendarDate and gdb. The test case is trival - a program that creates 2 or more NSCalendarDate objects (and formats them as does NSLog()). Run from the command line, the program output is fine. Run inside gdb, the first date is garbled.

Anybody familiar with this anomaly or know what causes it?

The problem was initially noticed when using NSLog() calls in a large, multithreaded program. However, for once, the problem reduced nicely to a nearly trivial program.

FWIW, I've attached the program (date.m) and two output files - prog.out and gdb.out

I tried your test ... and couldn't reproduce the problem.

This sort of thing (code behaving differently under gdb) is usually related to problems with uninitialised variables, where the use of gdb chanbges the memory layout so that a variable that normally happens to contain one value now contains another.

If this is the problem, any change at all to libraries etc could make the problem
disappear, and it would be unsurprising that I couldn't reproduce it.

I'd be really interested if you could step through the creation and display of the
first date under debug, and perhaps find out where things go wrong.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]