syslog-ng source
tracer.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Balabit
3  * Copyright (c) 2015 Balázs Scheidler
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * As an additional exemption you are allowed to compile & link against the
20  * OpenSSL libraries as published by the OpenSSL project. See the file
21  * COPYING for details.
22  *
23  */
24 #ifndef DEBUGGER_TRACER_H_INCLUDED
25 #define DEBUGGER_TRACER_H_INCLUDED 1
26 
27 #include "syslog-ng.h"
28 
29 typedef struct _Tracer Tracer;
30 
31 /* struct to track the invocation of a breakpoint, we have an instance for each thread */
32 typedef struct _BreakpointSite
33 {
34  gboolean resume_requested;
35  LogMessage *msg;
36  LogPipe *pipe;
37  gboolean drop;
39 
40 
41 void tracer_stop_on_interrupt(Tracer *self);
42 void tracer_stop_on_breakpoint(Tracer *self, BreakpointSite *breakpoint_site);
43 gboolean tracer_wait_for_event(Tracer *self, BreakpointSite **breakpoint_site);
44 void tracer_resume_after_event(Tracer *self, BreakpointSite *breakpoint_site);
45 void tracer_cancel(Tracer *self);
46 
47 Tracer *tracer_new(GlobalConfig *cfg);
48 void tracer_free(Tracer *self);
49 
50 #endif
Definition: tracer.h:33
gboolean drop
Definition: tracer.h:37
LogPipe * pipe
Definition: tracer.h:36
LogMessage * msg
Definition: tracer.h:35
gboolean resume_requested
Definition: tracer.h:34
Definition: tracer.c:27
GlobalConfig * cfg
Definition: test_batched_ack_tracker.c:34
void tracer_resume_after_event(Tracer *self, BreakpointSite *breakpoint_site)
Definition: tracer.c:105
gboolean tracer_wait_for_event(Tracer *self, BreakpointSite **breakpoint_site)
Definition: tracer.c:78
void tracer_stop_on_interrupt(Tracer *self)
Definition: tracer.c:66
void tracer_free(Tracer *self)
Definition: tracer.c:145
Tracer * tracer_new(GlobalConfig *cfg)
Definition: tracer.c:133
void tracer_stop_on_breakpoint(Tracer *self, BreakpointSite *breakpoint_site)
Definition: tracer.c:46
void tracer_cancel(Tracer *self)
Definition: tracer.c:124