00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __WVCRASH_H
00009 #define __WVCRASH_H
00010
00011 #include <sys/types.h>
00012
00013 void wvcrash_setup(const char *_argv0, const char *_desc = 0);
00014 void wvcrash(int sig);
00015 void wvcrash_add_signal(int sig);
00016
00017
00018 void wvcrash_leave_will(const char *will);
00019
00020 const char *wvcrash_read_will();
00021
00022 const char *wvcrash_read_assert();
00023
00024
00025 class IWvStream;
00026
00027 struct WvCrashInfo
00028 {
00029
00030
00031
00032 static IWvStream *in_stream;
00033 static const char *in_stream_id;
00034 static enum InStreamState {
00035 UNUSED,
00036 PRE_SELECT,
00037 POST_SELECT,
00038 EXECUTE,
00039 } in_stream_state;
00040 };
00041
00042 const int wvcrash_ring_buffer_order = 12;
00043 const int wvcrash_ring_buffer_size = 1 << wvcrash_ring_buffer_order;
00044 void wvcrash_ring_buffer_put(const char *str);
00045 void wvcrash_ring_buffer_put(const char *str, size_t len);
00046 const char *wvcrash_ring_buffer_get();
00047
00048 #if defined(_WIN32)
00049 extern void setup_console_crash();
00050 #endif
00051
00052 #endif // __WVCRASH_H