Home
last modified time | relevance | path

Searched refs:dwfl (Results 1 – 25 of 80) sorted by relevance

1234

/third_party/elfutils/libdwfl/
Dsegment.c37 __libdwfl_segment_start (Dwfl *dwfl, GElf_Addr start) in __libdwfl_segment_start() argument
39 if (dwfl->segment_align > 1) in __libdwfl_segment_start()
40 start &= -dwfl->segment_align; in __libdwfl_segment_start()
46 __libdwfl_segment_end (Dwfl *dwfl, GElf_Addr end) in __libdwfl_segment_end() argument
48 if (dwfl->segment_align > 1) in __libdwfl_segment_end()
49 end = (end + dwfl->segment_align - 1) & -dwfl->segment_align; in __libdwfl_segment_end()
54 insert (Dwfl *dwfl, size_t i, GElf_Addr start, GElf_Addr end, int segndx) in insert() argument
56 bool need_start = (i == 0 || dwfl->lookup_addr[i - 1] != start); in insert()
57 bool need_end = (i + 1 >= dwfl->lookup_elts in insert()
58 || dwfl->lookup_addr[i + 1] != end); in insert()
[all …]
Dargp-std.c95 Dwfl *dwfl; member
103 failure (Dwfl *dwfl, int errnum, const char *msg, struct argp_state *state) in failure() argument
105 if (dwfl != NULL) in failure()
106 dwfl_end (dwfl); in failure()
115 fail (Dwfl *dwfl, int errnum, const char *msg, struct argp_state *state) in fail() argument
117 failure (dwfl, errnum, msg, state); in fail()
143 Dwfl *dwfl = opt->dwfl; in parse_opt() local
144 if (dwfl == NULL) in parse_opt()
146 dwfl = INTUSE(dwfl_begin) (&offline_callbacks); in parse_opt()
147 if (dwfl == NULL) in parse_opt()
[all …]
Ddwfl_frame.c111 Dwfl *dwfl = process->dwfl; in __libdwfl_process_free() local
113 process->callbacks->detach (dwfl, process->callbacks_arg); in __libdwfl_process_free()
114 assert (dwfl->process == process); in __libdwfl_process_free()
115 dwfl->process = NULL; in __libdwfl_process_free()
119 dwfl->attacherr = DWFL_E_NOERROR; in __libdwfl_process_free()
124 process_alloc (Dwfl *dwfl) in process_alloc() argument
129 process->dwfl = dwfl; in process_alloc()
130 dwfl->process = process; in process_alloc()
134 dwfl_attach_state (Dwfl *dwfl, Elf *elf, pid_t pid, in dwfl_attach_state() argument
137 if (dwfl->process != NULL) in dwfl_attach_state()
[all …]
Ddwfl_end.c36 dwfl_end (Dwfl *dwfl) in dwfl_end() argument
38 if (dwfl == NULL) in dwfl_end()
42 __libdwfl_debuginfod_end (dwfl->debuginfod); in dwfl_end()
45 if (dwfl->process) in dwfl_end()
46 __libdwfl_process_free (dwfl->process); in dwfl_end()
48 free (dwfl->lookup_addr); in dwfl_end()
49 free (dwfl->lookup_module); in dwfl_end()
50 free (dwfl->lookup_segndx); in dwfl_end()
52 Dwfl_Module *next = dwfl->modulelist; in dwfl_end()
60 if (dwfl->user_core != NULL) in dwfl_end()
[all …]
Dlibdwfl.h113 extern void dwfl_report_begin (Dwfl *dwfl);
129 extern int dwfl_report_segment (Dwfl *dwfl, int ndx,
136 extern Dwfl_Module *dwfl_report_module (Dwfl *dwfl, const char *name,
151 extern Dwfl_Module *dwfl_report_elf (Dwfl *dwfl, const char *name,
159 extern Dwfl_Module *dwfl_report_offline (Dwfl *dwfl, const char *name,
163 extern Dwfl_Module *dwfl_report_offline_memory (Dwfl *dwfl, const char *name,
174 extern int dwfl_report_end (Dwfl *dwfl,
185 extern void dwfl_report_begin_add (Dwfl *dwfl);
207 extern ptrdiff_t dwfl_getmodules (Dwfl *dwfl,
215 extern Dwfl_Module *dwfl_addrmodule (Dwfl *dwfl, Dwarf_Addr address);
[all …]
Doffline.c101 static Dwfl_Module *process_elf (Dwfl *dwfl, const char *name,
103 static Dwfl_Module *process_archive (Dwfl *dwfl, const char *name,
111 process_file (Dwfl *dwfl, const char *name, const char *file_name, int fd, in process_file() argument
123 return process_elf (dwfl, name, file_name, fd, elf); in process_file()
126 return process_archive (dwfl, name, file_name, fd, elf, predicate); in process_file()
132 process_elf (Dwfl *dwfl, const char *name, const char *file_name, int fd, in process_elf() argument
135 Dwfl_Module *mod = __libdwfl_report_elf (dwfl, name, file_name, fd, elf, in process_elf()
136 dwfl->offline_next_address, true, in process_elf()
146 if ((dwfl->offline_next_address >= mod->low_addr in process_elf()
147 || mod->low_addr - dwfl->offline_next_address < OFFLINE_REDZONE) in process_elf()
[all …]
Ddwfl_module.c127 dwfl_report_begin_add (Dwfl *dwfl __attribute__ ((unused))) in dwfl_report_begin_add() argument
135 dwfl_report_begin (Dwfl *dwfl) in INTDEF()
138 dwfl->lookup_elts = 0; in INTDEF()
140 for (Dwfl_Module *m = dwfl->modulelist; m != NULL; m = m->next) in INTDEF()
143 dwfl->offline_next_address = OFFLINE_REDZONE; in INTDEF()
148 use (Dwfl_Module *mod, Dwfl_Module **tailp, Dwfl *dwfl) in INTDEF()
153 if (unlikely (dwfl->lookup_module != NULL)) in INTDEF()
155 free (dwfl->lookup_module); in INTDEF()
156 dwfl->lookup_module = NULL; in INTDEF()
166 dwfl_report_module (Dwfl *dwfl, const char *name, in dwfl_report_module() argument
[all …]
Dlink_map.c135 integrated_memory_callback (Dwfl *dwfl, int ndx, in integrated_memory_callback() argument
153 return (*info->memory_callback) (dwfl, ndx, buffer, buffer_available, in integrated_memory_callback()
164 return (*info->memory_callback) (dwfl, ndx, buffer, buffer_available, in integrated_memory_callback()
168 if ((*info->memory_callback) (dwfl, ndx, &info->buffer, buffer_available, in integrated_memory_callback()
178 (void) INTUSE(dwfl_addrsegment) (dwfl, vaddr, &mod); in integrated_memory_callback()
191 (dwfl, 0, buffer, buffer_available, in integrated_memory_callback()
229 Dwfl *dwfl; member
239 (*closure->callback) (closure->dwfl, -1, buffer, buffer_available, 0, 0, in release_buffer()
253 Dwfl *dwfl = closure->dwfl; in read_addrs() local
264 int segndx = INTUSE(dwfl_addrsegment) (dwfl, vaddr, NULL); in read_addrs()
[all …]
Dcore-file.c126 dwfl_report_core_segments (Dwfl *dwfl, Elf *elf, size_t phnum, GElf_Phdr *notes) in dwfl_report_core_segments() argument
128 if (unlikely (dwfl == NULL)) in dwfl_report_core_segments()
148 result = dwfl_report_segment (dwfl, ndx, phdr, 0, NULL); in dwfl_report_core_segments()
283 dwfl_elf_phdr_memory_callback (Dwfl *dwfl, int ndx, in dwfl_elf_phdr_memory_callback() argument
301 const GElf_Off align = dwfl->segment_align ?: 1; in dwfl_elf_phdr_memory_callback()
449 dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable) in dwfl_core_file_report() argument
459 if (dwfl->user_core != NULL) in dwfl_core_file_report()
460 free (dwfl->user_core->executable_for_core); in dwfl_core_file_report()
463 if (dwfl->user_core != NULL) in dwfl_core_file_report()
464 dwfl->user_core->executable_for_core = NULL; in dwfl_core_file_report()
[all …]
Ddwfl_getmodules.c36 dwfl_getmodules (Dwfl *dwfl, in dwfl_getmodules() argument
42 if (dwfl == NULL) in dwfl_getmodules()
53 Dwfl_Module *m = dwfl->modulelist; in dwfl_getmodules()
64 else if (((offset & 3) == 2) && likely (dwfl->lookup_module != NULL)) in dwfl_getmodules()
68 if ((size_t) offset - 1 == dwfl->lookup_elts) in dwfl_getmodules()
71 if (unlikely ((size_t) offset - 1 > dwfl->lookup_elts)) in dwfl_getmodules()
74 m = dwfl->lookup_module[offset - 1]; in dwfl_getmodules()
90 return ((dwfl->lookup_module == NULL) ? ((offset << 2) | 1) in dwfl_getmodules()
91 : (((m == NULL ? (ptrdiff_t) dwfl->lookup_elts + 1 in dwfl_getmodules()
Dlinux-proc-maps.c96 grovel_auxv (pid_t pid, Dwfl *dwfl, GElf_Addr *sysinfo_ehdr) in grovel_auxv() argument
109 GElf_Addr segment_align64 = dwfl->segment_align; in grovel_auxv()
110 GElf_Addr segment_align32 = dwfl->segment_align; in grovel_auxv()
160 bool valid64 = sysinfo_ehdr64 != 0 || segment_align64 != dwfl->segment_align; in grovel_auxv()
161 bool valid32 = sysinfo_ehdr32 != 0 || segment_align32 != dwfl->segment_align; in grovel_auxv()
170 dwfl->segment_align = segment_align64; in grovel_auxv()
176 dwfl->segment_align = segment_align32; in grovel_auxv()
183 do_report (Dwfl *dwfl, char **plast_file, Dwarf_Addr low, Dwarf_Addr high) in do_report() argument
187 Dwfl_Module *mod = INTUSE(dwfl_report_module) (dwfl, *plast_file, in do_report()
197 #define report() do_report(dwfl, &last_file, low, high)
[all …]
Ddebuginfod-client.c53 dwfl_get_debuginfod_client (Dwfl *dwfl) in dwfl_get_debuginfod_client() argument
55 if (dwfl->debuginfod != NULL) in dwfl_get_debuginfod_client()
56 return dwfl->debuginfod; in dwfl_get_debuginfod_client()
62 dwfl->debuginfod = (*fp_debuginfod_begin) (); in dwfl_get_debuginfod_client()
63 return dwfl->debuginfod; in dwfl_get_debuginfod_client()
71 __libdwfl_debuginfod_find_executable (Dwfl *dwfl, in INTDEF()
78 debuginfod_client *c = INTUSE (dwfl_get_debuginfod_client) (dwfl); in INTDEF()
88 __libdwfl_debuginfod_find_debuginfo (Dwfl *dwfl, in __libdwfl_debuginfod_find_debuginfo() argument
95 debuginfod_client *c = INTUSE (dwfl_get_debuginfod_client) (dwfl); in __libdwfl_debuginfod_find_debuginfo()
Dlinux-kernel-modules.c92 try_kernel_name (Dwfl *dwfl, char **fname, bool try_debug) in try_kernel_name() argument
99 int fd = ((((dwfl->callbacks->debuginfo_path in try_kernel_name()
100 ? *dwfl->callbacks->debuginfo_path : NULL) in try_kernel_name()
106 Dwfl_Module fakemod = { .dwfl = dwfl }; in try_kernel_name()
175 find_kernel_elf (Dwfl *dwfl, const char *release, char **fname) in find_kernel_elf() argument
185 int fd = try_kernel_name (dwfl, fname, true); in find_kernel_elf()
191 fd = try_kernel_name (dwfl, fname, true); in find_kernel_elf()
205 fd = try_kernel_name (dwfl, fname, true); in find_kernel_elf()
211 fd = try_kernel_name (dwfl, fname, true); in find_kernel_elf()
219 get_release (Dwfl *dwfl, const char **release) in get_release() argument
[all …]
/third_party/elfutils/include/elfutils/
Dlibdwfl.h113 extern void dwfl_report_begin (Dwfl *dwfl);
129 extern int dwfl_report_segment (Dwfl *dwfl, int ndx,
136 extern Dwfl_Module *dwfl_report_module (Dwfl *dwfl, const char *name,
151 extern Dwfl_Module *dwfl_report_elf (Dwfl *dwfl, const char *name,
159 extern Dwfl_Module *dwfl_report_offline (Dwfl *dwfl, const char *name,
163 extern Dwfl_Module *dwfl_report_offline_memory (Dwfl *dwfl, const char *name,
174 extern int dwfl_report_end (Dwfl *dwfl,
185 extern void dwfl_report_begin_add (Dwfl *dwfl);
207 extern ptrdiff_t dwfl_getmodules (Dwfl *dwfl,
215 extern Dwfl_Module *dwfl_addrmodule (Dwfl *dwfl, Dwarf_Addr address);
[all …]
/third_party/elfutils/tests/
Dbacktrace.c39 #include ELFUTILS_HEADER(dwfl)
72 const char *symname, Dwfl *dwfl) in callback_verify() argument
147 mod = dwfl_addrmodule (dwfl, pc - 1); in callback_verify()
184 mod = dwfl_addrmodule (dwfl, pc); in callback_verify()
228 Dwfl *dwfl = dwfl_thread_dwfl (thread); in frame_callback() local
229 Dwfl_Module *mod = dwfl_addrmodule (dwfl, pc_adjusted); in frame_callback()
237 callback_verify (tid, *framenop, pc, symname, dwfl); in frame_callback()
265 dump (Dwfl *dwfl) in dump() argument
267 ptrdiff_t ptrdiff = dwfl_getmodules (dwfl, dump_modules, NULL, 0); in dump()
270 switch (dwfl_getthreads (dwfl, thread_callback, NULL)) in dump()
[all …]
Ddwfl-bug-fd-leak.c40 #include ELFUTILS_HEADER(dwfl)
54 Dwfl *dwfl = dwfl_begin (&proc_callbacks); in elfutils_open() local
55 if (dwfl == NULL) in elfutils_open()
58 int result = dwfl_linux_proc_report (dwfl, pid); in elfutils_open()
64 if (dwfl_report_end (dwfl, NULL, NULL) != 0) in elfutils_open()
68 Dwarf *dbg = dwfl_addrdwarf (dwfl, address, &bias); in elfutils_open()
77 Dwfl_Module *module = dwfl_addrmodule (dwfl, address); in elfutils_open()
86 return dwfl; in elfutils_open()
90 elfutils_close (Dwfl *dwfl) in elfutils_close() argument
92 dwfl_end (dwfl); in elfutils_close()
[all …]
Ddwfl-bug-addr-overflow.c24 #include ELFUTILS_HEADER(dwfl)
43 Dwfl *dwfl = dwfl_begin (&offline_callbacks); in main() local
44 assert (dwfl != NULL); in main()
46 Dwfl_Module *high = dwfl_report_module (dwfl, "high", in main()
50 Dwfl_Module *low = dwfl_report_module (dwfl, "low", in main()
54 Dwfl_Module *middle = dwfl_report_module (dwfl, "middle", in main()
59 int ret = dwfl_report_end (dwfl, NULL, NULL); in main()
62 Dwfl_Module *mod = dwfl_addrmodule (dwfl, UINT64_C (0xffffffff00010123)); in main()
64 mod = dwfl_addrmodule (dwfl, UINT64_C (0x00010123)); in main()
66 mod = dwfl_addrmodule (dwfl, UINT64_C (0xffff00010123)); in main()
[all …]
Dbacktrace-dwarf.c25 #include ELFUTILS_HEADER(dwfl)
48 report_pid (Dwfl *dwfl, pid_t pid) in report_pid() argument
50 int result = dwfl_linux_proc_report (dwfl, pid); in report_pid()
56 if (dwfl_report_end (dwfl, NULL, NULL) != 0) in report_pid()
59 result = dwfl_linux_proc_attach (dwfl, pid, true); in report_pid()
77 Dwfl *dwfl = dwfl_begin (&proc_callbacks); in pid_to_dwfl() local
78 if (dwfl == NULL) in pid_to_dwfl()
80 report_pid (dwfl, pid); in pid_to_dwfl()
81 return dwfl; in pid_to_dwfl()
98 Dwfl *dwfl = dwfl_thread_dwfl (thread); in frame_callback() local
[all …]
Ddwfl-bug-getmodules.c19 #include ELFUTILS_HEADER(dwfl)
47 Dwfl *dwfl = dwfl_begin (&callbacks); in main() local
49 dwfl_report_module (dwfl, "m1", 0, 0x1000); in main()
50 dwfl_report_module (dwfl, "m2", 0x2000, 0x3000); in main()
51 dwfl_report_module (dwfl, "m3", 0x4000, 0x5000); in main()
53 dwfl_report_end (dwfl, NULL, NULL); in main()
55 ptrdiff_t offset = dwfl_getmodules (dwfl, &iterate, dwfl, 0); in main()
59 offset = dwfl_getmodules (dwfl, &iterate, NULL, offset); in main()
63 dwfl_end (dwfl); in main()
Ddwfl-report-segment-contiguous.c24 #include ELFUTILS_HEADER(dwfl)
43 Dwfl *dwfl = dwfl_begin (&offline_callbacks); in main() local
44 assert (dwfl != NULL); in main()
57 int ndx = dwfl_report_segment (dwfl, 1, &phdr1, 0, dwfl); in main()
60 ndx = dwfl_addrsegment (dwfl, 0xf00, NULL); in main()
73 ndx = dwfl_report_segment (dwfl, 2, &phdr2, 0, dwfl); in main()
76 ndx = dwfl_addrsegment (dwfl, 0x1000, NULL); in main()
79 dwfl_end (dwfl); in main()
Dbacktrace-data.c41 #include ELFUTILS_HEADER(dwfl)
72 memory_read (Dwfl *dwfl, Dwarf_Addr addr, Dwarf_Word *result, in memory_read() argument
75 pid_t child = dwfl_pid (dwfl); in memory_read()
148 report_module (Dwfl *dwfl, pid_t child, Dwarf_Addr addr) in report_module() argument
154 Dwfl_Module *mod = dwfl_report_elf (dwfl, long_name, long_name, -1, in report_module()
158 assert (dwfl_addrmodule (dwfl, addr) == mod); in report_module()
163 next_thread (Dwfl *dwfl, void *dwfl_arg __attribute__ ((unused)), in next_thread() argument
171 return dwfl_pid (dwfl); in next_thread()
236 Dwfl *dwfl = dwfl_thread_dwfl (dwfl_frame_thread (state)); in frame_callback() local
237 Dwfl_Module *mod = dwfl_addrmodule (dwfl, pc_adjusted); in frame_callback()
[all …]
Daddrcfi.c21 #include ELFUTILS_HEADER(dwfl)
105 handle_cfi (Dwfl *dwfl, const char *which, Dwarf_CFI *cfi, in handle_cfi() argument
151 (void) dwfl_module_register_names (dwfl_addrmodule (dwfl, pc), in handle_cfi()
158 handle_address (GElf_Addr pc, Dwfl *dwfl) in handle_address() argument
160 Dwfl_Module *mod = dwfl_addrmodule (dwfl, pc); in handle_address()
165 int res = handle_cfi (dwfl, ".eh_frame", in handle_address()
171 res &= handle_cfi (dwfl, ".debug_frame", in handle_address()
186 Dwfl *dwfl = NULL; in main() local
187 (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, &dwfl); in main()
188 assert (dwfl != NULL); in main()
[all …]
Ddwfl-addr-sect.c28 #include ELFUTILS_HEADER(dwfl)
33 handle_address (Dwfl *dwfl, Dwarf_Addr address) in handle_address() argument
35 Dwfl_Module *mod = dwfl_addrmodule (dwfl, address); in handle_address()
62 Dwfl *dwfl = NULL; in main() local
63 (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, &dwfl); in main()
64 assert (dwfl != NULL); in main()
72 result |= handle_address (dwfl, addr); in main()
77 dwfl_end (dwfl); in main()
Daddrscopes.c21 #include ELFUTILS_HEADER(dwfl)
95 handle_address (GElf_Addr pc, Dwfl *dwfl) in handle_address() argument
98 Dwarf_Die *cudie = dwfl_addrdie (dwfl, pc, &cubias); in handle_address()
127 Dwfl_Line *loline = dwfl_getsrc (dwfl, lowpc); in handle_address()
128 Dwfl_Line *hiline = dwfl_getsrc (dwfl, highpc - 1); in handle_address()
149 Dwfl *dwfl = NULL; in main() local
150 (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, &dwfl); in main()
151 assert (dwfl != NULL); in main()
172 handle_address (addr, dwfl); in main()
186 handle_address (addr, dwfl); in main()
[all …]
Dvdsosyms.c26 #include ELFUTILS_HEADER(dwfl)
79 Dwfl *dwfl = dwfl_begin (&proc_callbacks); in main() local
80 if (dwfl == NULL) in main()
87 int result = dwfl_linux_proc_report (dwfl, pid); in main()
94 result = dwfl_linux_proc_attach (dwfl, pid, false); in main()
100 if (dwfl_report_end (dwfl, NULL, NULL) != 0) in main()
103 if (dwfl_getmodules (dwfl, module_callback, NULL, 0) != 0) in main()
106 dwfl_end (dwfl); in main()

1234