1 #ifndef _PROBE_FINDER_H
2 #define _PROBE_FINDER_H
7 #define MAX_PATH_LEN 256
8 #define MAX_PROBE_BUFFER 1024
11 static inline int is_c_varname(const char *name)
14 return isalpha(name[0]) || name[0] == '_';
18 char *event; /* Event name */
19 char *group; /* Event group */
22 char *file; /* File name */
23 int line; /* Line number */
25 char *function; /* Function name */
26 int offset; /* Offset bytes */
28 int nr_args; /* Number of arguments */
29 char **args; /* Arguments */
31 int retprobe; /* Return probe */
34 int found; /* Number of found probe points */
35 char *probes[MAX_PROBES]; /* Output buffers (will be allocated)*/
38 /* Line number container */
40 struct list_head list;
46 char *file; /* File name */
47 char *function; /* Function name */
48 unsigned int start; /* Start line number */
49 unsigned int end; /* End line number */
50 int offset; /* Start line offset */
51 char *path; /* Real path name */
52 struct list_head line_list; /* Visible lines */
55 #ifndef NO_DWARF_SUPPORT
56 extern int find_probe_point(int fd, struct probe_point *pp);
57 extern int find_line_range(int fd, struct line_range *lr);
63 struct probe_point *pp; /* Target probe point */
65 /* For function searching */
66 Dwarf_Addr addr; /* Address */
67 const char *fname; /* File name */
68 int lno; /* Line number */
69 Dwarf_Die cu_die; /* Current CU */
71 /* For variable searching */
72 Dwarf_Op *fb_ops; /* Frame base attribute */
73 Dwarf_Addr cu_base; /* Current CU base address */
74 const char *var; /* Current variable name */
75 char *buf; /* Current output buffer */
76 int len; /* Length of output buffer */
80 struct line_range *lr; /* Target line range */
82 const char *fname; /* File name */
83 int lno_s; /* Start line number */
84 int lno_e; /* End line number */
85 Dwarf_Addr addr_s; /* Start address */
86 Dwarf_Addr addr_e; /* End address */
87 Dwarf_Die cu_die; /* Current CU */
91 #endif /* NO_DWARF_SUPPORT */
93 #endif /*_PROBE_FINDER_H */