Displaying 20 results from an estimated 5000 matches similar to: "[LLVMdev] Outputting hex in DOUT's"
2009 Aug 04
0
[LLVMdev] Outputting hex in DOUT's
On Aug 4, 2009, at 8:29 AM, Aaron Gray wrote:
> How do output hex in DOUT's ?
Please don't use DOUT, please use:
DEBUG(errs() << stuff);
instead.
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090804/cda5fe94/attachment.html>
2009 Aug 04
2
[LLVMdev] Outputting hex in DOUT's
>>How do output hex in DOUT's ?
>Please don't use DOUT, please use:
>
> DEBUG(errs() << stuff);
>
>instead.
Okay, I will modify my code. But how do I do hexadecimal output ?
Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090804/6614cf39/attachment.html>
2009 Aug 04
0
[LLVMdev] Outputting hex in DOUT's
On Aug 4, 2009, at 2:04 PM, Aaron Gray wrote:
> >>How do output hex in DOUT's ?
>
> >Please don't use DOUT, please use:
> >
> > DEBUG(errs() << stuff);
> >
> >instead.
>
> Okay, I will modify my code. But how do I do hexadecimal output ?
>
raw_ostream has a write_hex method.
O << "foo: ";
O.write_hex(42);
...
2009 Aug 04
2
[LLVMdev] Outputting hex in DOUT's
On Tuesday 04 August 2009 10:46, Chris Lattner wrote:
> On Aug 4, 2009, at 8:29 AM, Aaron Gray wrote:
> > How do output hex in DOUT's ?
>
> Please don't use DOUT, please use:
>
> DEBUG(errs() << stuff);
>
> instead.
I've got some more DOUT-involving patches in the queue. Is this
a general design choice that's been made? If so I can change the
2009 Aug 04
3
[LLVMdev] Outputting hex in DOUT's
On Tuesday 04 August 2009 18:24, Chris Lattner wrote:
> The big issue is things like this:
>
> DOUT << foo.getName() << "\n";
>
> When -debug is disable and even when assertions are turned off,
> foo.getName() is still called. When you use:
Yep, that's a problem.
> DEBUG(errs() << foo.getName() << "\n");
>
> When
2009 Aug 04
2
[LLVMdev] Outputting hex in DOUT's
On Tuesday 04 August 2009 17:52, Chris Lattner wrote:
> I'd prefer for it to be eliminated, but it is currently used widely.
> If your patches don't make it substantially worse, I won't have a
> problem with them. Bonus points for removing DOUTs though :)
Ok, this is good to know. With some of these patches I will have
opportunities to remove DOUTS.
What's the
2009 Aug 04
0
[LLVMdev] Outputting hex in DOUT's
On Aug 4, 2009, at 4:03 PM, David Greene wrote:
> On Tuesday 04 August 2009 17:52, Chris Lattner wrote:
>
>> I'd prefer for it to be eliminated, but it is currently used widely.
>> If your patches don't make it substantially worse, I won't have a
>> problem with them. Bonus points for removing DOUTs though :)
>
> Ok, this is good to know. With some of
2009 Aug 04
0
[LLVMdev] Outputting hex in DOUT's
On Aug 4, 2009, at 2:50 PM, David Greene wrote:
> On Tuesday 04 August 2009 10:46, Chris Lattner wrote:
>> On Aug 4, 2009, at 8:29 AM, Aaron Gray wrote:
>>> How do output hex in DOUT's ?
>>
>> Please don't use DOUT, please use:
>>
>> DEBUG(errs() << stuff);
>>
>> instead.
>
> I've got some more DOUT-involving patches in
2009 Aug 05
0
[LLVMdev] Outputting hex in DOUT's
2009/8/5 David Greene <dag at cray.com>
> On Tuesday 04 August 2009 18:24, Chris Lattner wrote:
>
> > The big issue is things like this:
> >
> > DOUT << foo.getName() << "\n";
> >
> > When -debug is disable and even when assertions are turned off,
> > foo.getName() is still called. When you use:
>
> Yep, that's a
2009 Aug 05
1
[LLVMdev] Outputting hex in DOUT's
On Tue, Aug 4, 2009 at 5:05 PM, Aaron
Gray<aaronngray.lists at googlemail.com> wrote:
> So I can say
>
> DEBUG( err().write_hex(address); err() << "\n"; );
>
> And can I say :-
>
> DEBUG( err().write_hex(address) << "\n"; );
>
> does it associate like that ?
Yes. You can also use format objects from llvm/Support/Format.h, as
2009 Dec 11
0
[LLVMdev] Old DOUT
On Dec 11, 2009, at 9:03 AM, David Greene wrote:
>>
>> If you're asking if a new dbgs() might be useful, "yes if specified well".
>> If you're asking if you can convert everything to using it, "no".
>
> 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
2009 Dec 10
3
[LLVMdev] Old DOUT
What replaced the old DOUT?
I'm working on sending debug code upstream and one of the things I
want to add is circular buffering for debug output. This is a real
help when processing large files.
So I need a stream that can act differently than errs(). Should I just
create one?
-Dave
2009 Dec 11
4
[LLVMdev] Old DOUT
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
2009 Dec 10
2
[LLVMdev] Old DOUT
On Thursday 10 December 2009 16:30, Anton Korobeynikov wrote:
> Hello, David
>
> > What replaced the old DOUT?
>
> DEBUG(errs() << foo);
>
> The reason is quite simple - DOUT in release mode was just /dev/null,
> but the functions sending data to it were still called.
errs() is no good. I would want to keep errs() printing things out
immediately. I need
2009 Dec 10
0
[LLVMdev] Old DOUT
Hello, David
> What replaced the old DOUT?
DEBUG(errs() << foo);
The reason is quite simple - DOUT in release mode was just /dev/null,
but the functions sending data to it were still called.
--
With best regards, Anton Korobeynikov.
Faculty of Mathematics & Mechanics, Saint Petersburg State University.
2009 Dec 11
2
[LLVMdev] Old DOUT
On Thursday 10 December 2009 17:53, Chris Lattner wrote:
> > So I would write the above as:
> >
> > DEBUG(dbgs() << foo);
> >
> > Does that sound reasonable?
>
> If you're asking if a new dbgs() might be useful, "yes if specified well".
> If you're asking if you can convert everything to using it, "no".
I'm not sure
2012 May 18
2
[LLVMdev] Fixed with hex numbers with raw_ostream
I've been using the nifty:
DEBUG(errs() << "Here is the state of things:\n");
style of optional logging, but ran into an issue where I want to dump a table of information. The problem is getting the columns to line up, since the raw_ostream methods write numbers as variable length.
I've worked up a patch that adds two new methods to raw_ostream:
/// write_hex -
2012 May 18
0
[LLVMdev] Fixed with hex numbers with raw_ostream
On May 18, 2012, at 11:50 AM, Nick Kledzik <kledzik at apple.com> wrote:
> I've been using the nifty:
> DEBUG(errs() << "Here is the state of things:\n");
> style of optional logging, but ran into an issue where I want to dump a table of information. The problem is getting the columns to line up, since the raw_ostream methods write numbers as variable length.
2009 Dec 10
0
[LLVMdev] Old DOUT
On Dec 10, 2009, at 1:46 PM, David Greene wrote:
> On Thursday 10 December 2009 16:30, Anton Korobeynikov wrote:
>> Hello, David
>>
>>> What replaced the old DOUT?
>>
>> DEBUG(errs() << foo);
>>
>> The reason is quite simple - DOUT in release mode was just /dev/null,
>> but the functions sending data to it were still called.
>
2009 Dec 12
0
[LLVMdev] Old DOUT
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