Displaying 12 results from an estimated 12 matches for "addsignalhandler".
2009 Mar 08
3
[LLVMdev] Compiling LLVM on MinGW
Like this:
llvm[1]: Compiling Signals.cpp for Debug build
In file included from Signals.cpp:33:
Win32/Signals.inc:262: error: `sys' has not been declared
Win32/Signals.inc: In function `void AddSignalHandler(void (*)(void*), void*)':
Win32/Signals.inc:266: error: `KillSigs' was not declared in this scope
Win32/Signals.inc:266: error: `KillSigsEnd' was not declared in this scope
Win32/Signals.inc:266: error: `RegisterHandler' was not declared in this scope
Win32/Signals.inc:266: warning:...
2009 Mar 08
0
[LLVMdev] Compiling LLVM on MinGW
On Mar 8, 2009, at 4:21 AM, Lennart Augustsson wrote:
> Like this:
>
> llvm[1]: Compiling Signals.cpp for Debug build
> In file included from Signals.cpp:33:
> Win32/Signals.inc:262: error: `sys' has not been declared
> Win32/Signals.inc: In function `void AddSignalHandler(void (*)
> (void*), void*)':
> Win32/Signals.inc:266: error: `KillSigs' was not declared in this
> scope
> Win32/Signals.inc:266: error: `KillSigsEnd' was not declared in this
> scope
> Win32/Signals.inc:266: error: `RegisterHandler' was not declared in
>...
2009 Mar 08
2
[LLVMdev] Compiling LLVM on MinGW
I'm trying to compile the top version of LLVM with MinGW, but I'm
getting compilation errors.
They seem to be caused by the changes in rev 66072. Has anyone
compiled on MinGW?
Since I just installed MinGW on this computer it could be my problem.
(I noticed that LLVM 2.5 still doesn't come with binaries for the
libraries on MinGW.)
-- Lennarft
2009 Mar 08
0
[LLVMdev] Compiling LLVM on MinGW
On Sunday 08 March 2009 01:42:42 Lennart Augustsson wrote:
> I'm trying to compile the top version of LLVM with MinGW, but I'm
> getting compilation errors.
What kind of errors?
Ciao,
Duncan.
2009 Mar 08
2
[LLVMdev] Compiling LLVM on MinGW
..., 2009, at 4:21 AM, Lennart Augustsson wrote:
>
>> Like this:
>>
>> llvm[1]: Compiling Signals.cpp for Debug build
>> In file included from Signals.cpp:33:
>> Win32/Signals.inc:262: error: `sys' has not been declared
>> Win32/Signals.inc: In function `void AddSignalHandler(void (*)
>> (void*), void*)':
>> Win32/Signals.inc:266: error: `KillSigs' was not declared in this
>> scope
>> Win32/Signals.inc:266: error: `KillSigsEnd' was not declared in this
>> scope
>> Win32/Signals.inc:266: error: `RegisterHandler' was not...
2009 Dec 21
2
[LLVMdev] [PATCH] Implement dbgs()
...CurrentDebugType = Type;
}
+/// dbgs - Return a circular-buffered debug stream.
+raw_ostream &llvm::dbgs() {
+ // Do one-time initialization in a thread-safe way.
+ static struct dbgstream {
+ circular_raw_ostream strm;
+
+ dbgstream() : strm(errs(), DebugBufferSize) {
+ sys::AddSignalHandler(&debug_user_sig_handler, 0);
+ // TODO: Add a handler for SIGUSER1-type signals so the user can
+ // force a debug dump.
+ }
+ } thestrm;
+
+ return thestrm.strm;
+}
+
#else
// Avoid "has no symbols" warning.
namespace llvm {
-int Debug_dummy = 0;
+ /// dbgs - Retur...
2013 Apr 14
0
[LLVMdev] [RFC/PATCH][4/4] Support System Z as host architecture
...to System Z as target
platform, but to running LLVM on (Linux on) System Z as a *host*
architecture. Most of the LLVM and Clang code base builds and works fine
on System Z, however, there is one problem relating to use of signal
handlers to react to crashes (SIGSEGV, SIGILL etc.).
The llvm::sys::AddSignalHandler (and related) function in
lib/Support/Unix/Signals.inc currently registers a signal handler routine
via "sigaction". When this handler is called due to a SIGSEGV, SIGILL or
similar signal, it will show a stack backtrace, deactivate the handler, and
then simply return to the operating sys...
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()
...strm(errs(),
+ (DisableDebugBuffering || !DebugFlag) ? 0 : DebugBufferSize) {
+ if (!DisableDebugBuffering && DebugFlag && DebugBufferSize != 0)
+ // TODO: Add a handler for SIGUSER1-type signals so the user can
+ // force a debug dump.
+ sys::AddSignalHandler(&debug_user_sig_handler, 0);
+ // Otherwise we've already set the debug stream buffer size to
+ // zero, disabling buffering.
+ }
+ } thestrm;
+
+ return thestrm.strm;
+}
+
#else
// Avoid "has no symbols" warning.
namespace llvm {
-int Debug_dummy = 0;
+ /// dbg...
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()
....
@@ -66,9 +88,29 @@
CurrentDebugType = Type;
}
+/// dbgs - Return a circular-buffered debug stream.
+raw_ostream &llvm::dbgs() {
+ static circular_raw_ostream strm(errs(), DebugBufferSize);
+
+ static bool initialized = false;
+ if (!initialized) {
+ initialized = true;
+
+ sys::AddSignalHandler(&debug_user_sig_handler, 0);
+ // TODO: Add a handler for SIGUSER1-type signals so the user can
+ // force a debug dump.
+ }
+
+ return strm;
+}
+
#else
// Avoid "has no symbols" warning.
namespace llvm {
-int Debug_dummy = 0;
+ /// dbgs - Return errs().
+ raw_ostream &...