search for: dumplog

Displaying 13 results from an estimated 13 matches for "dumplog".

2009 Dec 18
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...ream(Stream, Delete); + } + explicit circular_raw_ostream() + : raw_ostream(/*unbuffered*/true), + TheStream(0), + DeleteStream(PRESERVE_STREAM), + BufferArray(0) { + Cur = BufferArray; + } + + ~circular_raw_ostream() { + flush(); + dumpLog(); + releaseStream(); + delete[] BufferArray; + } + + void setStream(raw_ostream &Stream, bool Delete = false) { + releaseStream(); + + TheStream = &Stream; + DeleteStream = Delete; + + if (BufferSize > 0) { + // This circular_raw_ostream will d...
2009 Dec 18
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...ream(Stream, Delete); + } + explicit circular_raw_ostream() + : raw_ostream(/*unbuffered*/true), + TheStream(0), + DeleteStream(PRESERVE_STREAM), + BufferArray(0) { + Cur = BufferArray; + } + + ~circular_raw_ostream() { + flush(); + dumpLog(); + releaseStream(); + delete[] BufferArray; + } + + void setStream(raw_ostream &Stream, bool Delete = false) { + releaseStream(); + + TheStream = &Stream; + DeleteStream = Delete; + + if (BufferSize > 0) { + // This circular_raw_ostream will d...
2009 Dec 18
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
On Friday 18 December 2009 13:53, David Greene wrote: > > > + void releaseStream() { > > > + // Delete the stream if needed. Otherwise, transfer the buffer > > > + // settings from this raw_ostream back to the underlying stream. > > > + if (!TheStream) > > > + return; > > > + if (DeleteStream) > > > +
2009 Dec 17
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...ream(Stream, Delete); + } + explicit circular_raw_ostream() + : raw_ostream(/*unbuffered*/true), + TheStream(0), + DeleteStream(PRESERVE_STREAM), + BufferArray(0) { + Cur = BufferArray; + } + + ~circular_raw_ostream() { + flush(); + dumpLog(); + releaseStream(); + delete[] BufferArray; + } + + void setStream(raw_ostream &Stream, bool Delete = false) { + releaseStream(); + + TheStream = &Stream; + DeleteStream = Delete; + + if (BufferSize > 0) { + // This circular_raw_ostream will d...
2009 Dec 16
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
On Wednesday 16 December 2009 13:19, Chris Lattner wrote: > + int BufferSize; > + std::vector<char> BufferArray; > + bool DelayOutput; > + std::vector<char>::iterator Cur; > > Please doxygenify these. Ok. > Instead of using a std::vector for BufferArray, please just new[] an array > since it is fixed size. Ok. > Why is BufferSize needed with
2009 Dec 18
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...ream(Stream, Delete); + } + explicit circular_raw_ostream() + : raw_ostream(/*unbuffered*/true), + TheStream(0), + DeleteStream(PRESERVE_STREAM), + BufferArray(0) { + Cur = BufferArray; + } + + ~circular_raw_ostream() { + flush(); + dumpLog(); + releaseStream(); + delete[] BufferArray; + } + + void setStream(raw_ostream &Stream, bool Delete = false) { + releaseStream(); + + TheStream = &Stream; + DeleteStream = Delete; + + if (BufferSize > 0) { + // This circular_raw_ostream will d...
2009 Dec 16
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
On Dec 16, 2009, at 8:12 AM, David Greene wrote: >>> >>> What, specifically, do you want reviewed before I start checking in? >>> I'll be happy to prepare a patch that shows just that. >> >> I want a patch that does one thing (e.g. implements dbgs(), > > Ok, let's start with that. Here's the patch to add the circular raw_ostream. This
2009 Dec 18
4
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...apping if necessary. > > + while (Size > 0) { > > + while (Size > 0 && Cur != BufferArray + BufferSize) { > > + --Size; > > + *Cur++ = *Ptr++; > > + } > > This should use memcpy. Ok. > > +void circular_raw_ostream::dumpLog(void) { > > + if (BufferSize > 0) { > > + // Write out the buffer > > + const char *msg = "*** Log Output ***\n"; > > + int num = std::strlen(msg); > > + > > + TheStream->write(msg, num); > > + printLog(); > > + } >...
2009 Dec 18
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...ay. > + // Write into the buffer, wrapping if necessary. > + while (Size > 0) { > + while (Size > 0 && Cur != BufferArray + BufferSize) { > + --Size; > + *Cur++ = *Ptr++; > + } This should use memcpy. > +void circular_raw_ostream::dumpLog(void) { > + if (BufferSize > 0) { > + // Write out the buffer > + const char *msg = "*** Log Output ***\n"; > + int num = std::strlen(msg); > + > + TheStream->write(msg, num); > + printLog(); > + } > +} Is this to debug the implementatio...
2009 Dec 19
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...; +#include <algorithm> > + > +using namespace llvm; > + > +void circular_raw_ostream::write_impl(const char *Ptr, size_t Size) { > + if (BufferSize > 0) { Please use: if (BufferSize == 0) { .. write .. return; } to reduce nesting. > +void circular_raw_ostream::dumpLog(void) { > + if (BufferSize > 0) { > + // Write out the buffer > + const char *msg = "*** Log Output ***\n"; > + int num = std::strlen(msg); > + > + TheStream->write(msg, num); > + printLog(); > + } > +} I'm still unclear about this an...
2008 Mar 04
3
Gecko installs but page faults on execute
Using Kubuntu 7.10 with a fresh apt-get on Wine, running winecfg, then doing wine iexplore http://winehq.org to install Gecko seems to work just fine, but when it finishes it goes into a page fault and then never works. Here's a dumplog of bash. > static-fiend at static-fiend-desktop:~$ wine iexplore http://winehq.org > err:advapi:service_control_dispatcher pipe connect failed > fixme:ole:CoResumeClassObjects stub > fixme:win:WIN_CreateWindowEx Parent is HWND_MESSAGE > fixme:urlmon:ObtainUserAgentString (0, 0x7ce3...
2009 Dec 18
2
[LLVMdev] [PATCH] Implement dbgs()
...ion(DebugOnlyOptLoc), cl::ValueRequired); +// 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()); + if (logout) { + logout->dumpLog(); + } +} + // 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-only=X option. @@ -66,9 +88,29 @@ CurrentDebugType = Type; } +/// dbgs - Return a circular-buffered...
2009 Dec 19
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...t; > + > > +void circular_raw_ostream::write_impl(const char *Ptr, size_t Size) { > > + if (BufferSize > 0) { > > Please use: > > if (BufferSize == 0) { > .. write .. > return; > } > > to reduce nesting. Ok. > > +void circular_raw_ostream::dumpLog(void) { > > + if (BufferSize > 0) { > > + // Write out the buffer > > + const char *msg = "*** Log Output ***\n"; > > + int num = std::strlen(msg); > > + > > + TheStream->write(msg, num); > > + printLog(); > > + } >...