1 #ifndef _PROBE_FINDER_H
2 #define _PROBE_FINDER_H
4 #define MAX_PATH_LEN 256
5 #define MAX_PROBE_BUFFER 1024
8 static inline int is_c_varname(const char *name)
11 return isalpha(name[0]) || name[0] == '_';
16 char *file; /* File name */
17 int line; /* Line number */
19 char *function; /* Function name */
20 int offset; /* Offset bytes */
22 int nr_args; /* Number of arguments */
23 char **args; /* Arguments */
25 int retprobe; /* Return probe */
28 int found; /* Number of found probe points */
29 char *probes[MAX_PROBES]; /* Output buffers (will be allocated)*/
33 extern int find_probepoint(int fd, struct probe_point *pp);
35 #include <libdwarf/dwarf.h>
36 #include <libdwarf/libdwarf.h>
39 struct probe_point *pp; /* Target probe point */
41 /* For function searching */
42 Dwarf_Addr addr; /* Address */
43 Dwarf_Unsigned fno; /* File number */
44 Dwarf_Unsigned lno; /* Line number */
45 Dwarf_Off inl_offs; /* Inline offset */
46 Dwarf_Die cu_die; /* Current CU */
48 /* For variable searching */
49 Dwarf_Addr cu_base; /* Current CU base address */
50 Dwarf_Locdesc fbloc; /* Location of Current Frame Base */
51 const char *var; /* Current variable name */
52 char *buf; /* Current output buffer */
53 int len; /* Length of output buffer */
55 #endif /* NO_LIBDWARF */
57 #endif /*_PROBE_FINDER_H */