On 29 April 2011 16:08, David Simcha <[email protected]> wrote:
>
>
> On Fri, Apr 29, 2011 at 9:41 AM, Steve Schveighoffer <[email protected]>
> wrote:
>>
>> I'll mention that I just was debugging some stuff in Linux for
>> dcollections, and the line numbers for the unit tests given by gdb were off
>> by a couple of lines (I had the same feelings you are having, how is this
>> possible). That was just inside the unit tests. In the actual code, the
>> line numbers were correct. What's more, when I would step over lines in
>> gdb, the program would jump *back* some lines when there was no loop in the
>> code.
>> I wouldn't trust that GDB is giving you accurate info.
>>
>> My recommendation -- try using writeln debugging if possible.
>
> Thanks for the info. The problem with writeln is that, when dealing with
> nondeterministic bugs-from-Hell, you don't want to change timings or have
> screens and screens of stuff printed.
On Windows, use OutputDebugString("str").
(signature extern(Windows) void OutputDebugStringA(char *s); )
Download dbgview from Sysinternals (now owned by microsoft) to see the results.
This is the only way I've ever been able to debug threading problems.
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos