Displaying 20 results from an estimated 6000 matches similar to: "[LLVMdev] Question about llvm::dbg()"
2009 Dec 21
2
[LLVMdev] [PATCH] Implement dbgs()
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.
>
> Why don't you just check #ifndef NDEBUG like the code that sets it up?
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 want to buffer ALL output so that you
don't get some
2011 Jan 07
1
[LLVMdev] about NDEBUG
Hi Mr/Mz,
I have built and installed llvm-2.8 in debug mode using:
>SRC_DIR/configure --prefix=INS_DIR --enable-debug-runtime
--disable-optimized --enable-debug-symbols
>make install
It seems the NDEBUG controls a lot of print-out of debug information, by
using DEBUG() or dbgs().
And it is said that NDEBUG is in enabled in debug mode, but I find it does
not work and the -debug option
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
2011 Jan 10
1
[LLVMdev] About NDEBUG (Cont)
Hi Li Qingan,
> Thanks for your last reply.
> I have made a critical mistake when I stated my question in last email.
> I built llvm in debug mode, but the NDEBUG seemed to be still defined, such that
> the -debug option is not enabled.
> I have restated my configuration below.
you need to configure with --enable-assertions
In spite of the name, NDEBUG is not related to
2009 Dec 19
0
[LLVMdev] [PATCH] Implement dbgs()
On Dec 18, 2009, at 6:36 PM, 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
2009 Dec 21
2
[LLVMdev] [PATCH] Implement dbgs()
On Monday 21 December 2009 10:14, Török Edwin wrote:
> 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.
>
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 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 19
3
[LLVMdev] [PATCH] Implement dbgs()
On Friday 18 December 2009 19:56, Chris Lattner wrote:
> > +// -debug-buffer-size - This is a command line op0tion to set the
> > size
> > +// of the debug stream circular buffer. The value is the number of
> > +// characters to save.
> > +static cl::opt<unsigned>
> > +DebugBufferSize("debug-buffer-size",
> > +
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
===================================================================
---
2017 Sep 25
2
Errors linking with LLVM 5.0 - dump() missing
Hi Don,
On 25 September 2017 at 22:29, Don Hinton <hintonda at gmail.com> wrote:
> Thanks for reporting this.
>
> Looks like this one was missed -- the declaration should have been #ifdef'd
> away along with the definition. A quick grep indicates there are a number
> of them that need to be fixed.
>
> Here's the original commit:
>
> commit
2017 Sep 26
3
Errors linking with LLVM 5.0 - dump() missing
> On Sep 26, 2017, at 7:04 AM, David Keaton via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> On 09/25/2017 06:47 PM, David Keaton via llvm-dev wrote:
>> On 09/25/2017 06:19 PM, Matthias Braun wrote:
>>>
>>>> On Sep 25, 2017, at 6:03 PM, David Keaton via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>>>
>>>> On
2017 Sep 25
0
Errors linking with LLVM 5.0 - dump() missing
It'll work in release builds -- just rebuild llvm with LLVM_ENABLE_DUMP
enabled.
On Mon, Sep 25, 2017 at 2:35 PM, Dibyendu Majumdar <mobile at majumdar.org.uk>
wrote:
> Hi Don,
>
> On 25 September 2017 at 22:29, Don Hinton <hintonda at gmail.com> wrote:
> > Thanks for reporting this.
> >
> > Looks like this one was missed -- the declaration should have
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.
>>>
2017 Sep 25
2
Errors linking with LLVM 5.0 - dump() missing
Hi Don,
On 25 September 2017 at 22:37, Don Hinton <hintonda at gmail.com> wrote:
> It'll work in release builds -- just rebuild llvm with LLVM_ENABLE_DUMP
> enabled.
>
That assumes one has control over the LLVM build options.
> On Mon, Sep 25, 2017 at 2:35 PM, Dibyendu Majumdar <mobile at majumdar.org.uk>
> wrote:
>>
>> On 25 September 2017 at 22:29,
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
2017 Sep 25
0
Errors linking with LLVM 5.0 - dump() missing
Thanks for reporting this.
Looks like this one was missed -- the declaration should have been #ifdef'd
away along with the definition. A quick grep indicates there are a number
of them that need to be fixed.
Here's the original commit:
commit 88d207542b618ca6054b24491ddd67f8ca397540
Author: Matthias Braun <matze at braunis.de>
Date: Sat Jan 28 02:02:38 2017 +0000
Cleanup
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 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: