search for: dbgout

Displaying 18 results from an estimated 18 matches for "dbgout".

2010 Jun 14
1
[LLVMdev] Win32 COFF Support
...k that PE belongs there since this code doesn't generate executables. I used the Win prefix to differentiate it from non Microsoft Windows versions of COFF. Ok. > For the debug macros, I personally like them because they reduce the impact debug code has on the "real" code. I find dbgout("message") simpler and more concise than DEBUG(dbgs() << "message") for the consumer of the debug API. The other macros are there to not have to reproduce the same pattern a repeatedly. Are these intended to stay permanently or are they just for bring-up? Your argument i...
2010 Jun 14
2
[LLVMdev] Win32 COFF Support
...r k = (*i)- > >Relocations.begin(); > + k != (*i)- > >Relocations.end(); > + k++) { > > No need to reevaluate ".end()" every iteration of the loop. > > > +#define dbgout(x) DEBUG(dbgs() << x) > +#define dbgerr(x) do { dbgout (__FILE__ << "(" << __LINE__ <<\ > + ") : " << x << '\n'); llvm_unreachable("unexpected error > occured");\ > + } while (false) > + > +#define dbg...
2010 Jun 14
0
[LLVMdev] Win32 COFF Support
...#39;t think that PE belongs there since this code doesn't generate executables. I used the Win prefix to differentiate it from non Microsoft Windows versions of COFF. For the debug macros, I personally like them because they reduce the impact debug code has on the "real" code. I find dbgout("message") simpler and more concise than DEBUG(dbgs() << "message") for the consumer of the debug API. The other macros are there to not have to reproduce the same pattern a repeatedly. -Nathan On Mon, Jun 14, 2010 at 12:25 PM, Michael Spencer <bigcheesegs at gmail.co...
2010 Jun 14
0
[LLVMdev] Win32 COFF Support
...+ for (coff::relocations::const_iterator k = (*i)->Relocations.begin(); + k != (*i)->Relocations.end(); + k++) { No need to reevaluate ".end()" every iteration of the loop. +#define dbgout(x) DEBUG(dbgs() << x) +#define dbgerr(x) do { dbgout (__FILE__ << "(" << __LINE__ <<\ + ") : " << x << '\n'); llvm_unreachable("unexpected error occured");\ + } while (false) + +#define dbgout_call(x) DEBUG_WITH_TYPE(DEB...
2010 Jun 12
3
[LLVMdev] Win32 COFF Support
Here is a full patch including Nathan's COFF support, tests that pass on Windows, and some changes to lit. Obviously the COFF support and changes to lit should be separate patches in the end. http://codereview.appspot.com/1624043/show - Michael Spencer -------------- next part -------------- A non-text attachment was scrubbed... Name: COFF-support.patch Type: application/octet-stream Size:
2009 Dec 21
2
[LLVMdev] [PATCH] Implement dbgs()
...sig_handler(void *Cookie) +{ + // This is a bit sneaky. Since this is under #ifndef NDEBUG, we + // know that debug mode is enabled and dbgs() really is a + // circular_raw_ostream. If NDEBUG is defined, then dbgs() == + // errs() but this will never be invoked. + llvm::circular_raw_ostream *dbgout = + static_cast<llvm::circular_raw_ostream *>(&llvm::dbgs()); + dbgout->flushBufferWithBanner(); +} + // isCurrentDebugType - Return true if the specified string is the debug type // specified on the command line, or if none was specified on the command line // with the -debug-...
2010 May 02
0
[LLVMdev] Win32 COFF Support
...ion alignment"); Use llvm_unreachable() > for (SmallVector<char, Len>::const_iterator i = Data.begin (); i != Data.end (); i++) > { > if (i != Data.begin ()) > dbgout (' '); See llvm/Support/Debug.h for standard way of doing debug output in LLVM code. There are bunch of examples in many places. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
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
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 21
2
[LLVMdev] [PATCH] Implement dbgs()
...sig_handler(void *Cookie) +{ + // This is a bit sneaky. Since this is under #ifndef NDEBUG, we + // know that debug mode is enabled and dbgs() really is a + // circular_raw_ostream. If NDEBUG is defined, then dbgs() == + // errs() but this will never be invoked. + llvm::circular_raw_ostream *dbgout = + static_cast<llvm::circular_raw_ostream *>(&llvm::dbgs()); + dbgout->flushBufferWithBanner(); +} + // isCurrentDebugType - Return true if the specified string is the debug type // specified on the command line, or if none was specified on the command line // with the -debug-...
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", > > +
2010 Jul 16
0
[LLVMdev] Win32 COFF Support - Patch 3
...rt/ErrorHandling.h" > #include "llvm/Support/raw_ostream.h" > using namespace llvm; > > -#define dbg_notimpl(x) \ > - do { dbgs() << "not implemented, " << __FUNCTION__ << " (" << x << ")"; \ > +#define dbgout(a, x) \ > + do { dbgs() << a << ", " << __FUNCTION__ << " (" << x << ")"; \ > abort(); } while (false); > > +#define dbg_unexpected(x) dbgout("unexpected", x) > + > +#define dbg_notimpl(x) dbgout(&qu...
2010 Jul 14
2
[LLVMdev] Win32 COFF Support - Patch 3
On Sun, Jul 11, 2010 at 6:10 PM, Chris Lattner <clattner at apple.com> wrote: > This probably needs to be slightly tweaked to work with mainline.  I don't see anything objectionable, but I think Daniel needs to review this one. Updated patch to work with mainline. http://github.com/Bigcheese/llvm-mirror/commit/d19a4c82c18afc4830c09b70f02d162292231c94 - Michael Spencer
2010 May 01
4
[LLVMdev] Win32 COFF Support
Hi All, I have created a minimally functional Win32 COFF Exporter using the new MC framework. I made some minor changes to other libraries to allow me to plug it in without building it as part of the LLVM project. I wanted to share it but wasn't sure how to go about doing so, so I have attached the code to this message. Any feedback on would be appreciated. -------------- next part
2010 May 12
0
[LLVMdev] debug macros
...rio I use the _dbg macro: #ifndef NDEBUG #define _dbg(x) x #else #define _dbg(x) #endif The other macro is just a slight variation on the existing DEBUG macro, but for the common case of printing something out to the debug console, its simpler to write, and in my opinion easier to read. #define dbgout(x) DEBUG(dbgs()<<x) #define dbgoutc(y,x) DEBUG_WITH_TYPE(x,dbgs()<<y) -Nathan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100512/5003077e/attachment.html>
2013 Jan 17
0
[PATCH] qemu-xen-traditional: fix up security patches
...hw/e1000.c @@ -638,7 +638,8 @@ e1000_receive(void *opaque, const uint8_t *buf, int size) (size > MAXIMUM_ETHERNET_VLAN_SIZE && !(s->mac_reg[RCTL] & E1000_RCTL_LPE))) && !(s->mac_reg[RCTL] & E1000_RCTL_SBP)) { - return size; + DBGOUT(RX, "packet too large for applicable LPE/VLAN size\n"); + return; } if (!receive_filter(s, buf, size))
2010 May 02
2
[LLVMdev] Win32 COFF Support
...different TargetTriples. > for (SmallVector<char, Len>::const_iterator i = > Data.begin (); i != Data.end (); i++) > > { > > if (i != Data.begin ()) > > dbgout (' '); > See llvm/Support/Debug.h for standard way of doing debug output in > LLVM code. There are bunch of examples in many places. See :- http://llvm.org/docs/ProgrammersManual.html#DEBUG Also trailing commas on enums cause errors on GCC. There are more errors on GCC as wel...
2012 Feb 25
9
[xen-unstable bisection] complete test-amd64-i386-rhel6hvm-amd
branch xen-unstable xen branch xen-unstable job test-amd64-i386-rhel6hvm-amd test redhat-install Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git Tree: qemu git://xenbits.xen.org/staging/qemu-xen-unstable.git Tree: qemuu git://xenbits.xen.org/staging/qemu-upstream-unstable.git Tree: xen http://xenbits.xen.org/staging/xen-unstable.hg *** Found and reproduced problem