File: libdwfl_stacktraceP.h

package info (click to toggle)
elfutils 0.194-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,680 kB
  • sloc: ansic: 114,970; sh: 35,537; cpp: 4,998; makefile: 1,986; yacc: 1,388; lex: 130; asm: 77; sed: 39; awk: 35
file content (87 lines) | stat: -rw-r--r-- 2,477 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/* Internal definitions for libdwfl_stacktrace.
   Copyright (C) 2025 Red Hat, Inc.
   This file is part of elfutils.

   This file is free software; you can redistribute it and/or modify
   it under the terms of either

     * the GNU Lesser General Public License as published by the Free
       Software Foundation; either version 3 of the License, or (at
       your option) any later version

   or

     * the GNU General Public License as published by the Free
       Software Foundation; either version 2 of the License, or (at
       your option) any later version

   or both in parallel, as here.

   elfutils is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received copies of the GNU General Public License and
   the GNU Lesser General Public License along with this program.  If
   not, see <http://www.gnu.org/licenses/>.  */

#ifndef _LIBDWFL_STACKTRACEP_H
#define _LIBDWFL_STACKTRACEP_H 1

#include <libdwfl_stacktrace.h>

#include "libdwflP.h"

/* Hash table for Elf *. */
typedef struct
{
  char *module_name; /* dwfltracker_elftab_ent is used iff non-NULL.  */
  int fd;
  Elf *elf;
  dev_t dev;
  ino_t ino;
  time_t last_mtime;
} dwflst_tracker_elf_info;
#include "dwflst_tracker_elftab.h"

/* Hash table for Dwfl *. */
typedef struct
{
  Dwfl *dwfl;
  bool invalid; /* Mark when the dwfl has been removed.  */
} dwflst_tracker_dwfl_info;
#include "dwflst_tracker_dwfltab.h"

struct Dwflst_Process_Tracker
{
  const Dwfl_Callbacks *callbacks;

  /* Table of cached Elf * including fd, path, fstat info.  */
  dwflst_tracker_elftab elftab;
  rwlock_define(, elftab_lock);

  /* Table of cached Dwfl * including pid.  */
  dwflst_tracker_dwfltab dwfltab;
  rwlock_define(, dwfltab_lock);
};


/* Called when dwfl->process->pid becomes known to add the dwfl to its
   Dwflst_Process_Tracker's dwfltab:  */
extern void __libdwfl_stacktrace_add_dwfl_to_tracker (Dwfl *dwfl)
  internal_function;

/* Called from dwfl_end() to remove the dwfl from its
   Dwfl_Process_Tracker's dwfltab:  */
extern void __libdwfl_stacktrace_remove_dwfl_from_tracker (Dwfl *dwfl)
  internal_function;


/* Avoid PLT entries.  */
INTDECL (dwflst_module_gettracker)
INTDECL (dwflst_tracker_find_cached_elf)
INTDECL (dwflst_tracker_cache_elf)


#endif  /* libdwfl_stacktraceP.h */