GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
gmTrace.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4** All rights reserved.
5**
6** This file is part of the "GeMA" software. It's use should respect
7** the terms in the license agreement that can be found together
8** with this source code.
9** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11** A PARTICULAR PURPOSE.
12**
13************************************************************************/
14
25#ifndef _GEMA_TRACE_H_
26#define _GEMA_TRACE_H_
27
28
29#ifdef GEMA_ENABLE_STRACE
30
31// Enables support for S_TRACE. This macros are used only in release builds
32// to generate a log file with stack traces if the application crashes.
33// To do this, it uses the tracer_mt external package.
34// Just enabling the macros is not enough though. Actions must be taken also
35// to protect the main call and the entry point of each thread to be monitored.
36// See the documentation of the tracer_mt module for more details.
37
38#include <tracer_mt.h>
39
40#else
41
42// Disables support for S_TRACE
43
44#define S_TRACE() (void(0))
45#define S_TRACEX(m) (void(0))
46
47#endif
48
49
50#endif
51
52