Debian Codegraph @

src/libsysprof/sysprof-elf-private.h

raw
1 /* sysprof-elf-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 <glib-object.h>
24
25 G_BEGIN_DECLS
26
27 #define SYSPROF_TYPE_ELF (sysprof_elf_get_type())
28
29 G_DECLARE_FINAL_TYPE (SysprofElf, sysprof_elf, SYSPROF, ELF, GObject)
30
31 SysprofElf *sysprof_elf_new (const char *filename,
32 GMappedFile *mapped_file,
33 guint64 file_inode,
34 GError **error);
35 gboolean sysprof_elf_matches (SysprofElf *self,
36 guint64 file_inode,
37 const char *build_id);
38 const char *sysprof_elf_get_nick (SysprofElf *self);
39 const char *sysprof_elf_get_file (SysprofElf *self);
40 const char *sysprof_elf_get_build_id (SysprofElf *self);
41 const char *sysprof_elf_get_debug_link (SysprofElf *self);
42 char *sysprof_elf_get_symbol_at_address (SysprofElf *self,
43 guint64 address,
44 guint64 *begin_address,
45 guint64 *end_address);
46 SysprofElf *sysprof_elf_get_debug_link_elf (SysprofElf *self);
47 void sysprof_elf_set_debug_link_elf (SysprofElf *self,
48 SysprofElf *debug_link_elf);
49
50 G_END_DECLS