Home
last modified time | relevance | path

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

123

/external/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.c100 Dwfl *dwfl; member
108 failure (Dwfl *dwfl, int errnum, const char *msg, struct argp_state *state) in failure() argument
110 if (dwfl != NULL) in failure()
111 dwfl_end (dwfl); in failure()
120 fail (Dwfl *dwfl, int errnum, const char *msg, struct argp_state *state) in fail() argument
122 failure (dwfl, errnum, msg, state); in fail()
148 Dwfl *dwfl = opt->dwfl; in parse_opt() local
149 if (dwfl == NULL) in parse_opt()
151 dwfl = INTUSE(dwfl_begin) (&offline_callbacks); in parse_opt()
152 if (dwfl == NULL) in parse_opt()
[all …]
Ddwfl_end.c37 dwfl_end (Dwfl *dwfl) in dwfl_end() argument
39 if (dwfl == NULL) in dwfl_end()
42 if (dwfl->process) in dwfl_end()
43 __libdwfl_process_free (dwfl->process); in dwfl_end()
45 free (dwfl->lookup_addr); in dwfl_end()
46 free (dwfl->lookup_module); in dwfl_end()
47 free (dwfl->lookup_segndx); in dwfl_end()
49 Dwfl_Module *next = dwfl->modulelist; in dwfl_end()
57 if (dwfl->user_core != NULL) in dwfl_end()
59 free (dwfl->user_core->executable_for_core); in dwfl_end()
[all …]
Ddwfl_frame.c115 Dwfl *dwfl = process->dwfl; in __libdwfl_process_free() local
117 process->callbacks->detach (dwfl, process->callbacks_arg); in __libdwfl_process_free()
118 assert (dwfl->process == process); in __libdwfl_process_free()
119 dwfl->process = NULL; in __libdwfl_process_free()
123 dwfl->attacherr = DWFL_E_NOERROR; in __libdwfl_process_free()
128 process_alloc (Dwfl *dwfl) in process_alloc() argument
133 process->dwfl = dwfl; in process_alloc()
134 dwfl->process = process; in process_alloc()
138 dwfl_attach_state (Dwfl *dwfl, Elf *elf, pid_t pid, in dwfl_attach_state() argument
141 if (dwfl->process != NULL) in dwfl_attach_state()
[all …]
Dlibdwfl.h110 extern void dwfl_report_begin (Dwfl *dwfl);
138 extern int dwfl_report_segment (Dwfl *dwfl, int ndx,
145 extern Dwfl_Module *dwfl_report_module (Dwfl *dwfl, const char *name,
160 extern Dwfl_Module *dwfl_report_elf (Dwfl *dwfl, const char *name,
168 extern Dwfl_Module *dwfl_report_offline (Dwfl *dwfl, const char *name,
179 extern int dwfl_report_end (Dwfl *dwfl,
190 extern void dwfl_report_begin_add (Dwfl *dwfl);
212 extern ptrdiff_t dwfl_getmodules (Dwfl *dwfl,
220 extern Dwfl_Module *dwfl_addrmodule (Dwfl *dwfl, Dwarf_Addr address);
226 extern int dwfl_addrsegment (Dwfl *dwfl, Dwarf_Addr address, Dwfl_Module **mod);
[all …]
Doffline.c100 static Dwfl_Module *process_elf (Dwfl *dwfl, const char *name,
102 static Dwfl_Module *process_archive (Dwfl *dwfl, const char *name,
110 process_file (Dwfl *dwfl, const char *name, const char *file_name, int fd, in process_file() argument
122 return process_elf (dwfl, name, file_name, fd, elf); in process_file()
125 return process_archive (dwfl, name, file_name, fd, elf, predicate); in process_file()
131 process_elf (Dwfl *dwfl, const char *name, const char *file_name, int fd, in process_elf() argument
134 Dwfl_Module *mod = __libdwfl_report_elf (dwfl, name, file_name, fd, elf, in process_elf()
135 dwfl->offline_next_address, true, in process_elf()
145 if ((dwfl->offline_next_address >= mod->low_addr in process_elf()
146 || mod->low_addr - dwfl->offline_next_address < OFFLINE_REDZONE) in process_elf()
[all …]
Ddwfl_module.c128 dwfl_report_begin_add (Dwfl *dwfl __attribute__ ((unused))) in dwfl_report_begin_add() argument
136 dwfl_report_begin (Dwfl *dwfl) in INTDEF()
139 dwfl->lookup_elts = 0; in INTDEF()
141 for (Dwfl_Module *m = dwfl->modulelist; m != NULL; m = m->next) in INTDEF()
144 dwfl->offline_next_address = OFFLINE_REDZONE; in INTDEF()
149 use (Dwfl_Module *mod, Dwfl_Module **tailp, Dwfl *dwfl) in INTDEF()
154 if (unlikely (dwfl->lookup_module != NULL)) in INTDEF()
156 free (dwfl->lookup_module); in INTDEF()
157 dwfl->lookup_module = NULL; in INTDEF()
167 dwfl_report_module (Dwfl *dwfl, const char *name, in dwfl_report_module() argument
[all …]
Dlink_map.c136 integrated_memory_callback (Dwfl *dwfl, int ndx, in integrated_memory_callback() argument
154 return (*info->memory_callback) (dwfl, ndx, buffer, buffer_available, in integrated_memory_callback()
165 return (*info->memory_callback) (dwfl, ndx, buffer, buffer_available, in integrated_memory_callback()
169 if ((*info->memory_callback) (dwfl, ndx, &info->buffer, buffer_available, in integrated_memory_callback()
179 (void) INTUSE(dwfl_addrsegment) (dwfl, vaddr, &mod); in integrated_memory_callback()
192 (dwfl, 0, buffer, buffer_available, in integrated_memory_callback()
242 Dwfl *dwfl, GElf_Addr r_debug_vaddr, in report_r_debug() argument
255 (void) (*memory_callback) (dwfl, -1, &buffer, &buffer_available, 0, 0, in report_r_debug()
273 int segndx = INTUSE(dwfl_addrsegment) (dwfl, vaddr, NULL); in report_r_debug()
275 || unlikely (! (*memory_callback) (dwfl, segndx, in report_r_debug()
[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 …]
Dcore-file.c125 dwfl_report_core_segments (Dwfl *dwfl, Elf *elf, size_t phnum, GElf_Phdr *notes) in dwfl_report_core_segments() argument
127 if (unlikely (dwfl == NULL)) in dwfl_report_core_segments()
147 result = dwfl_report_segment (dwfl, ndx, phdr, 0, NULL); in dwfl_report_core_segments()
282 dwfl_elf_phdr_memory_callback (Dwfl *dwfl, int ndx, in dwfl_elf_phdr_memory_callback() argument
300 const GElf_Off align = dwfl->segment_align ?: 1; in dwfl_elf_phdr_memory_callback()
444 dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable) in dwfl_core_file_report() argument
453 if (dwfl->user_core != NULL) in dwfl_core_file_report()
454 free (dwfl->user_core->executable_for_core); in dwfl_core_file_report()
457 if (dwfl->user_core != NULL) in dwfl_core_file_report()
458 dwfl->user_core->executable_for_core = NULL; in dwfl_core_file_report()
[all …]
Ddwfl_begin.c44 Dwfl *dwfl = calloc (1, sizeof *dwfl); in dwfl_begin() local
45 if (dwfl == NULL) in dwfl_begin()
49 dwfl->callbacks = callbacks; in dwfl_begin()
50 dwfl->offline_next_address = OFFLINE_REDZONE; in dwfl_begin()
53 return dwfl; in dwfl_begin()
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
182 int fd = try_kernel_name (dwfl, fname, true); in find_kernel_elf()
188 fd = try_kernel_name (dwfl, fname, true); in find_kernel_elf()
195 get_release (Dwfl *dwfl, const char **release) in get_release() argument
197 if (dwfl == NULL) in get_release()
214 report_kernel (Dwfl *dwfl, const char **release, in report_kernel() argument
[all …]
/external/elfutils/include/elfutils/
Dlibdwfl.h110 extern void dwfl_report_begin (Dwfl *dwfl);
138 extern int dwfl_report_segment (Dwfl *dwfl, int ndx,
145 extern Dwfl_Module *dwfl_report_module (Dwfl *dwfl, const char *name,
160 extern Dwfl_Module *dwfl_report_elf (Dwfl *dwfl, const char *name,
168 extern Dwfl_Module *dwfl_report_offline (Dwfl *dwfl, const char *name,
179 extern int dwfl_report_end (Dwfl *dwfl,
190 extern void dwfl_report_begin_add (Dwfl *dwfl);
212 extern ptrdiff_t dwfl_getmodules (Dwfl *dwfl,
220 extern Dwfl_Module *dwfl_addrmodule (Dwfl *dwfl, Dwarf_Addr address);
226 extern int dwfl_addrsegment (Dwfl *dwfl, Dwarf_Addr address, Dwfl_Module **mod);
[all …]
/external/elfutils/tests/
Dbacktrace.c39 #include ELFUTILS_HEADER(dwfl)
72 const char *symname, Dwfl *dwfl) in callback_verify() argument
124 mod = dwfl_addrmodule (dwfl, pc - 1); in callback_verify()
145 mod = dwfl_addrmodule (dwfl, pc); in callback_verify()
181 Dwfl *dwfl = dwfl_thread_dwfl (thread); in frame_callback() local
182 Dwfl_Module *mod = dwfl_addrmodule (dwfl, pc_adjusted); in frame_callback()
190 callback_verify (tid, *framenop, pc, symname, dwfl); in frame_callback()
218 dump (Dwfl *dwfl) in dump() argument
220 ptrdiff_t ptrdiff = dwfl_getmodules (dwfl, dump_modules, NULL, 0); in dump()
223 switch (dwfl_getthreads (dwfl, thread_callback, NULL)) in dump()
[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 …]
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 …]
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()
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 …]
Ddwfl-bug-report.c19 #include ELFUTILS_HEADER(dwfl)
36 Dwfl *dwfl = dwfl_begin (&callbacks); in main() local
40 dwfl_report_begin (dwfl); in main()
41 dwfl_report_module (dwfl, "module1", 0, 10); in main()
42 dwfl_report_end (dwfl, NULL, NULL); in main()
45 dwfl_end (dwfl); in main()
/external/strace/
Dunwind-libdw.c43 Dwfl *dwfl; member
69 Dwfl *dwfl = dwfl_begin(&proc_callbacks); in tcb_init() local
70 if (dwfl == NULL) { in tcb_init()
75 int r = dwfl_linux_proc_attach(dwfl, tcp->pid, true); in tcb_init()
86 dwfl_end(dwfl); in tcb_init()
91 ctx->dwfl = dwfl; in tcb_init()
101 dwfl_end(ctx->dwfl); in tcb_fin()
116 int r = dwfl_linux_proc_report(ctx->dwfl, tcp->pid); in flush_cache_maybe()
124 else if (dwfl_report_end(ctx->dwfl, NULL, NULL) != 0) in flush_cache_maybe()
153 Dwfl *dwfl = dwfl_thread_dwfl(dwfl_frame_thread(state)); in frame_callback() local
[all …]

123