2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
5 * Routines to generate a stack backtrace automatically when a program
11 #include <sys/types.h>
13 void wvcrash_setup(const char *_argv0
, const char *_desc
= 0);
14 void wvcrash(int sig
);
15 void wvcrash_add_signal(int sig
);
17 // Leave a last will and testament in the WvCrash, if your program dies.
18 void wvcrash_leave_will(const char *will
);
19 // Read the will back.
20 const char *wvcrash_read_will();
21 // Read the assertion back.
22 const char *wvcrash_read_assert();
29 // This is kind of ugly and used only for the guts of WvStreams,
30 // but it's a significant rather than a premature optimization,
32 static IWvStream
*in_stream
;
33 static const char *in_stream_id
;
34 static enum InStreamState
{
42 const int wvcrash_ring_buffer_order
= 12;
43 const int wvcrash_ring_buffer_size
= 1 << wvcrash_ring_buffer_order
;
44 void wvcrash_ring_buffer_put(const char *str
);
45 void wvcrash_ring_buffer_put(const char *str
, size_t len
);
46 const char *wvcrash_ring_buffer_get();
49 extern void setup_console_crash();