Displaying 20 results from an estimated 297 matches for "dbgs".
Did you mean:
dbg
2009 Dec 18
2
[LLVMdev] [PATCH] dbgs() Use
Here's an example patch of how dbgs() will be used. Essentially I will
replace uses of errs() with dbgs(). I believe this is the correct thing
to do because:
- With #define NDEBUG, dbgs() == errs()
- With debugging and -debug-buffer-size=0 (the default), dbgs() just
passes output to errs().
- When -debug-buffer-size>0, you...
2009 Dec 21
2
[LLVMdev] [PATCH] Implement dbgs()
...vm {
+class raw_ostream;
+
/// DEBUG_TYPE macro - Files can specify a DEBUG_TYPE as a string, which
causes
/// all of their DEBUG statements to be activatable with
-debug-only=thatstring.
#ifndef DEBUG_TYPE
@@ -72,15 +74,20 @@
#define DEBUG_WITH_TYPE(TYPE, X) do { } while (0)
#endif
+/// dbgs() - This returns a reference to a raw_ostream for debugging
+/// messages. If debugging is disabled it returns errs(). Use it
+/// like: dbgs() << "foo" << "bar";
+raw_ostream &dbgs();
+
// DEBUG macro - This macro should be used by passes to emit debug
infor...
2009 Dec 21
2
[LLVMdev] [PATCH] Implement dbgs()
...debug build, then the code specified as the option to the macro
/// will be executed. Otherwise it will not be. Example:
///
-/// DEBUG_WITH_TYPE("bitset", errs() << "Bitset contains: " << Bitset <<
"\n");
+/// DEBUG_WITH_TYPE("bitset", dbgs() << "Bitset contains: " << Bitset <<
"\n");
///
/// This will emit the debug information if -debug is present, and
-debug-only
/// is not specified, or is specified as "bitset".
@@ -72,15 +74,28 @@
#define DEBUG_WITH_TYPE(TYPE, X) do { } while...
2009 Dec 19
3
[LLVMdev] [PATCH] Implement dbgs()
...probably also be cl::Hidden.
Ok.
> > +// Signal handlers - dump debug output on termination.
> > +static void debug_user_sig_handler(void *Cookie)
> > +{
> > + llvm::circular_raw_ostream *logout =
> > + dynamic_cast<llvm::circular_raw_ostream *>(&llvm::dbgs());
>
> Please do not use dynamic_cast, we're trying to eliminate the last
> RTTI use in the compiler.
Do you want me to use dyn_cast? That means I'll have to add some more
stuff to raw_ostream and circular_raw_ostream.
Or I think I can just assume (Yikes!) that if the signal ha...
2009 Dec 19
0
[LLVMdev] [PATCH] Implement dbgs()
...David Greene wrote:
>>> +// Signal handlers - dump debug output on termination.
>>> +static void debug_user_sig_handler(void *Cookie)
>>> +{
>>> + llvm::circular_raw_ostream *logout =
>>> + dynamic_cast<llvm::circular_raw_ostream *>(&llvm::dbgs());
>>
>> Please do not use dynamic_cast, we're trying to eliminate the last
>> RTTI use in the compiler.
>
> Do you want me to use dyn_cast? That means I'll have to add some more
> stuff to raw_ostream and circular_raw_ostream.
No, dyn_cast is only really sui...
2009 Dec 18
2
[LLVMdev] [PATCH] Implement dbgs()
Here's the patch to provide dbgs(). By default it works just like errs().
When -debug-buffer-size=N (N > 0) is set, it buffers output sent to it and
dumps it at program termination via a signal handler.
Please review. Thanks!
-Dave
Index: include/llvm/Support/Debug.h
======================...
2009 Dec 21
0
[LLVMdev] [PATCH] Implement dbgs()
On 2009-12-21 18:06, David Greene wrote:
> On Saturday 19 December 2009 00:16, Chris Lattner wrote:
>
>
>>> Or I think I can just assume (Yikes!) that if the signal handler is
>>> invoked it will really be a circular_raw_ostream since the handler
>>> should (!) only be set up in debug mode.
>>>
>>> That scares me a bit, though.
>>>
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 what you mean here. It's n...
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
the last N bytes (N == unlimited by default) and displays the
output at program terminatio...
2017 Aug 22
5
[RFC] mir-canon: A new tool for canonicalizing MIR for cleaner diffing.
Patch for review.
On Mon, Aug 21, 2017 at 11:45 PM Puyan Lotfi <puyan.lotfi.llvm at gmail.com>
wrote:
> Ping.
>
> Still working on preparing code for review. Will have a patch for review
> ready in the coming days.
>
> PL
>
> On Tue, Aug 15, 2017 at 12:06 PM Puyan Lotfi <puyan.lotfi.llvm at gmail.com>
> wrote:
>
>> Hi,
>>
>>
>>
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 wha...
2009 Dec 19
0
[LLVMdev] [PATCH] Implement dbgs()
On Dec 17, 2009, at 4:02 PM, David Greene wrote:
> Here's the patch to provide dbgs(). By default it works just like
> errs().
> When -debug-buffer-size=N (N > 0) is set, it buffers output sent to
> it and
> dumps it at program termination via a signal handler.
>
> Please review. Thanks!
>
> -Dave
>
> Index: i...
2012 Nov 27
2
[LLVMdev] strange dbgs() behavior: unable to print floats in machine backend
...bug.h"
> #include "llvm/Support/raw_ostream.h"
>
> I'm working on release 3.1 though.
>
> hth, Daniel
>
> On 11/26/2012 03:00 PM, Bjorn De Sutter wrote:
>> Hi,
>>
>> I am trying to debug my backend, and observe very strange behavior with dbgs():
>>
>> In the IfConverter, I have added two debugging lines that print floating-point numbers for the sake of demonstration that such printing works fine.
>>
>> bool MeetIfcvtSizeLimit(MachineBasicBlock &BB,
>> unsigned Cycle, unsign...
2012 Nov 26
0
[LLVMdev] strange dbgs() behavior: unable to print floats in machine backend
Hi,
I am trying to debug my backend, and observe very strange behavior with dbgs():
In the IfConverter, I have added two debugging lines that print floating-point numbers for the sake of demonstration that such printing works fine.
bool MeetIfcvtSizeLimit(MachineBasicBlock &BB,
unsigned Cycle, unsigned Extra,
const...
2012 Nov 27
0
[LLVMdev] strange dbgs() behavior: unable to print floats in machine backend
...aw_ostream.h"
> >
> > I'm working on release 3.1 though.
> >
> > hth, Daniel
> >
> > On 11/26/2012 03:00 PM, Bjorn De Sutter wrote:
> >> Hi,
> >>
> >> I am trying to debug my backend, and observe very strange behavior with
> dbgs():
> >>
> >> In the IfConverter, I have added two debugging lines that print
> floating-point numbers for the sake of demonstration that such printing
> works fine.
> >>
> >> bool MeetIfcvtSizeLimit(MachineBasicBlock &BB,
> >>...
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 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...
2009 Dec 19
0
[LLVMdev] [PATCH] dbgs() Use
On Dec 17, 2009, at 4:08 PM, David Greene wrote:
> Here's an example patch of how dbgs() will be used. Essentially I
> will
> replace uses of errs() with dbgs(). I believe this is the correct
> thing
> to do because:
>
> - With #define NDEBUG, dbgs() == errs()
>
> - With debugging and -debug-buffer-size=0 (the default), dbgs() just
> passes output to...
2010 Jan 19
1
[LLVMdev] Question about llvm::dbg()
Maybe I miss something but I think there is a problem with this code in Support/Debug.cpp when compiling in Release build (NDEBUG defined):
namespace llvm {
/// dbgs - Return dbgs().
raw_ostream &dbgs() {
return dbgs();
}
}
I though it would crash with a stack overflow due to infinite recursion, but llvm-gcc is smart enough to compile it as a jmp and create an infinite loop instead
otool -tv Debug.o
llvm::dbgs():
0000000000000000 pushq %rbp
0000...
2010 Sep 04
1
[LLVMdev] [LLVMDev] Using dbgs()
When using "DEBUG( dbgs() << "whatever" );" Do I need to insert a line
terminator. Like "DEBUG( dbgs() << "whatever" << std::endl );"
Thanks
Jeff Kunkel
2009 Dec 10
2
[LLVMdev] Old DOUT
...ite 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 something else that buffers until program termination.
So I would write the above as:
DEBUG(dbgs() << foo);
Does that sound reasonable?
There are some tricky cases where dump routines are used either to
print error messages or to print debug information. In those cases
I may have to parameterize the dump routine with the stream.
-Dave