1 #ifndef _BABELTRACE_DEBUGINFO_H
2 #define _BABELTRACE_DEBUGINFO_H
5 * Babeltrace - Debug information state tracker
7 * Copyright (c) 2015 EfficiOS Inc.
8 * Copyright (c) 2015 Philippe Proulx <pproulx@efficios.com>
9 * Copyright (c) 2015 Antoine Busque <abusque@efficios.com>
10 * Copyright (c) 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
12 * Permission is hereby granted, free of charge, to any person obtaining a copy
13 * of this software and associated documentation files (the "Software"), to deal
14 * in the Software without restriction, including without limitation the rights
15 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16 * copies of the Software, and to permit persons to whom the Software is
17 * furnished to do so, subject to the following conditions:
19 * The above copyright notice and this permission notice shall be included in
20 * all copies or substantial portions of the Software.
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32 struct ctf_event_definition
;
34 #ifdef ENABLE_DEBUGINFO
39 #include <babeltrace/babeltrace-internal.h>
41 struct debug_info_source
{
42 /* Strings are owned by debug_info_source. */
46 /* short_src_path points inside src_path, no need to free. */
47 const char *short_src_path
;
49 /* short_bin_path points inside bin_path, no need to free. */
50 const char *short_bin_path
;
52 * Location within the binary. Either absolute (@0x1234) or
59 struct debug_info
*debug_info_create(void);
62 void debug_info_destroy(struct debug_info
*debug_info
);
65 void debug_info_handle_event(struct debug_info
*debug_info
,
66 struct ctf_event_definition
*event
);
68 #else /* ifdef ENABLE_DEBUGINFO */
71 struct debug_info
*debug_info_create(void) { return malloc(1); }
74 void debug_info_destroy(struct debug_info
*debug_info
) { free(debug_info
); }
77 void debug_info_handle_event(struct debug_info
*debug_info
,
78 struct ctf_event_definition
*event
) { }
80 #endif /* ENABLE_DEBUGINFO */
82 #endif /* _BABELTRACE_DEBUGINFO_H */
This page took 0.047219 seconds and 4 git commands to generate.