Debian Codegraph @

src/libsysprof/sysprof-symbolizer-private.h

raw
1 /* sysprof-symbolizer-private.h
2 *
3 * Copyright 2023 Christian Hergert <[email protected]>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program 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
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * SPDX-License-Identifier: GPL-3.0-or-later
19 */
20
21 #pragma once
22
23 #include "sysprof-address-layout-private.h"
24 #include "sysprof-document.h"
25 #include "sysprof-document-loader.h"
26 #include "sysprof-mount-namespace-private.h"
27 #include "sysprof-process-info-private.h"
28 #include "sysprof-strings-private.h"
29 #include "sysprof-symbol.h"
30 #include "sysprof-symbolizer.h"
31
32 G_BEGIN_DECLS
33
34 #define SYSPROF_SYMBOLIZER_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS(obj, SYSPROF_TYPE_SYMBOLIZER, SysprofSymbolizerClass)
35
36 struct _SysprofSymbolizer
37 {
38 GObject parent;
39 };
40
41 struct _SysprofSymbolizerClass
42 {
43 GObjectClass parent_class;
44
45 void (*setup) (SysprofSymbolizer *self,
46 SysprofDocumentLoader *loader);
47 void (*prepare_async) (SysprofSymbolizer *self,
48 SysprofDocument *document,
49 GCancellable *cancellable,
50 GAsyncReadyCallback callback,
51 gpointer user_data);
52 gboolean (*prepare_finish) (SysprofSymbolizer *self,
53 GAsyncResult *result,
54 GError **error);
55 SysprofSymbol *(*symbolize) (SysprofSymbolizer *self,
56 SysprofStrings *strings,
57 const SysprofProcessInfo *process_info,
58 SysprofAddressContext context,
59 SysprofAddress address);
60 };
61
62 void _sysprof_symbolizer_setup (SysprofSymbolizer *self,
63 SysprofDocumentLoader *loader);
64 void _sysprof_symbolizer_prepare_async (SysprofSymbolizer *self,
65 SysprofDocument *document,
66 GCancellable *cancellable,
67 GAsyncReadyCallback callback,
68 gpointer user_data);
69 gboolean _sysprof_symbolizer_prepare_finish (SysprofSymbolizer *self,
70 GAsyncResult *result,
71 GError **error);
72 SysprofSymbol *_sysprof_symbolizer_symbolize (SysprofSymbolizer *self,
73 SysprofStrings *strings,
74 const SysprofProcessInfo *process_info,
75 SysprofAddressContext context,
76 SysprofAddress address);
77
78 G_END_DECLS