[LLVMdev] Old DOUT

Bob Wilson bob.wilson at apple.com
Fri Dec 11 10:14:43 PST 2009

On Dec 11, 2009, at 9:44 AM, David Greene wrote:

> On Friday 11 December 2009 11:35, Chris Lattner wrote:
> =
>>> I'm not sure what you mean here.  It's not ok to convert code under
>>> DEBUG() or #ifndef NDEBUG to use dbgs()?
>> Right.
>>> Then what's the point of providing it?
>> I don't know what dbgs does, so I don't know!
> dbgs() will be a circular-buffering raw_ostream, meaning it saves
> the last N bytes (N == unlimited by default) and displays the
> output at program termination if requested.  By default output
> gets generated immediately, just like errs().
> I will add a flag -debug-buffer-size=N to set the buffer and turn
> on delayed output.  This is super useful when trying to debug
> very large codes.  I have had debug output consume GBs of disk space.
> This avoids that problem but it only works if all current debug
> output goes to the new stream.

Can't you just write a separate tool to handle this?  "less -B" might even be good enough for some purposes....

More information about the llvm-dev mailing list