/external/elfutils/libdwfl/ |
D | segment.c | 33 __libdwfl_segment_start (Dwfl *dwfl, GElf_Addr start) in __libdwfl_segment_start() argument 35 if (dwfl->segment_align > 1) in __libdwfl_segment_start() 36 start &= -dwfl->segment_align; in __libdwfl_segment_start() 42 __libdwfl_segment_end (Dwfl *dwfl, GElf_Addr end) in __libdwfl_segment_end() argument 44 if (dwfl->segment_align > 1) in __libdwfl_segment_end() 45 end = (end + dwfl->segment_align - 1) & -dwfl->segment_align; in __libdwfl_segment_end() 50 insert (Dwfl *dwfl, size_t i, GElf_Addr start, GElf_Addr end, int segndx) in insert() argument 52 bool need_start = (i == 0 || dwfl->lookup_addr[i - 1] != start); in insert() 53 bool need_end = (i + 1 >= dwfl->lookup_elts in insert() 54 || dwfl->lookup_addr[i + 1] != end); in insert() [all …]
|
D | argp-std.c | 96 Dwfl *dwfl; member 106 inline void failure (Dwfl *dwfl, int errnum, const char *msg) in parse_opt() 108 if (dwfl != NULL) in parse_opt() 109 dwfl_end (dwfl); in parse_opt() 116 inline error_t fail (Dwfl *dwfl, int errnum, const char *msg) in parse_opt() 118 failure (dwfl, errnum, msg); in parse_opt() 141 Dwfl *dwfl = opt->dwfl; in parse_opt() local 142 if (dwfl == NULL) in parse_opt() 144 dwfl = INTUSE(dwfl_begin) (&offline_callbacks); in parse_opt() 145 if (dwfl == NULL) in parse_opt() [all …]
|
D | dwfl_end.c | 33 dwfl_end (Dwfl *dwfl) in dwfl_end() argument 35 if (dwfl == NULL) in dwfl_end() 38 if (dwfl->process) in dwfl_end() 39 __libdwfl_process_free (dwfl->process); in dwfl_end() 41 free (dwfl->lookup_addr); in dwfl_end() 42 free (dwfl->lookup_module); in dwfl_end() 43 free (dwfl->lookup_segndx); in dwfl_end() 45 Dwfl_Module *next = dwfl->modulelist; in dwfl_end() 53 if (dwfl->user_core != NULL) in dwfl_end() 55 free (dwfl->user_core->executable_for_core); in dwfl_end() [all …]
|
D | dwfl_frame.c | 112 Dwfl *dwfl = process->dwfl; in __libdwfl_process_free() local 114 process->callbacks->detach (dwfl, process->callbacks_arg); in __libdwfl_process_free() 115 assert (dwfl->process == process); in __libdwfl_process_free() 116 dwfl->process = NULL; in __libdwfl_process_free() 120 dwfl->attacherr = DWFL_E_NOERROR; in __libdwfl_process_free() 125 process_alloc (Dwfl *dwfl) in process_alloc() argument 130 process->dwfl = dwfl; in process_alloc() 131 dwfl->process = process; in process_alloc() 135 dwfl_attach_state (Dwfl *dwfl, Elf *elf, pid_t pid, in dwfl_attach_state() argument 138 if (dwfl->process != NULL) in dwfl_attach_state() [all …]
|
D | libdwfl.h | 110 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 …]
|
D | offline.c | 96 static Dwfl_Module *process_elf (Dwfl *dwfl, const char *name, 98 static Dwfl_Module *process_archive (Dwfl *dwfl, const char *name, 106 process_file (Dwfl *dwfl, const char *name, const char *file_name, int fd, in process_file() argument 118 return process_elf (dwfl, name, file_name, fd, elf); in process_file() 121 return process_archive (dwfl, name, file_name, fd, elf, predicate); in process_file() 127 process_elf (Dwfl *dwfl, const char *name, const char *file_name, int fd, in process_elf() argument 130 Dwfl_Module *mod = __libdwfl_report_elf (dwfl, name, file_name, fd, elf, in process_elf() 131 dwfl->offline_next_address, true, in process_elf() 141 if ((dwfl->offline_next_address >= mod->low_addr in process_elf() 142 || mod->low_addr - dwfl->offline_next_address < OFFLINE_REDZONE) in process_elf() [all …]
|
D | dwfl_module.c | 123 dwfl_report_begin_add (Dwfl *dwfl __attribute__ ((unused))) in dwfl_report_begin_add() argument 131 dwfl_report_begin (Dwfl *dwfl) in INTDEF() 134 dwfl->lookup_elts = 0; in INTDEF() 136 for (Dwfl_Module *m = dwfl->modulelist; m != NULL; m = m->next) in INTDEF() 139 dwfl->offline_next_address = OFFLINE_REDZONE; in INTDEF() 144 use (Dwfl_Module *mod, Dwfl_Module **tailp, Dwfl *dwfl) in INTDEF() 149 if (unlikely (dwfl->lookup_module != NULL)) in INTDEF() 151 free (dwfl->lookup_module); in INTDEF() 152 dwfl->lookup_module = NULL; in INTDEF() 162 dwfl_report_module (Dwfl *dwfl, const char *name, in dwfl_report_module() argument [all …]
|
D | link_map.c | 140 integrated_memory_callback (Dwfl *dwfl, int ndx, in integrated_memory_callback() argument 158 return (*info->memory_callback) (dwfl, ndx, buffer, buffer_available, in integrated_memory_callback() 169 return (*info->memory_callback) (dwfl, ndx, buffer, buffer_available, in integrated_memory_callback() 173 if ((*info->memory_callback) (dwfl, ndx, &info->buffer, buffer_available, in integrated_memory_callback() 183 (void) INTUSE(dwfl_addrsegment) (dwfl, vaddr, &mod); in integrated_memory_callback() 196 (dwfl, 0, buffer, buffer_available, in integrated_memory_callback() 246 Dwfl *dwfl, GElf_Addr r_debug_vaddr, in report_r_debug() argument 259 (void) (*memory_callback) (dwfl, -1, &buffer, &buffer_available, 0, 0, in report_r_debug() 277 int segndx = INTUSE(dwfl_addrsegment) (dwfl, vaddr, NULL); in report_r_debug() 279 || unlikely (! (*memory_callback) (dwfl, segndx, in report_r_debug() [all …]
|
D | dwfl_getmodules.c | 32 dwfl_getmodules (Dwfl *dwfl, in dwfl_getmodules() argument 38 if (dwfl == NULL) in dwfl_getmodules() 49 Dwfl_Module *m = dwfl->modulelist; in dwfl_getmodules() 60 else if (((offset & 3) == 2) && likely (dwfl->lookup_module != NULL)) in dwfl_getmodules() 64 if ((size_t) offset - 1 == dwfl->lookup_elts) in dwfl_getmodules() 67 if (unlikely ((size_t) offset - 1 > dwfl->lookup_elts)) in dwfl_getmodules() 70 m = dwfl->lookup_module[offset - 1]; in dwfl_getmodules() 86 return ((dwfl->lookup_module == NULL) ? ((offset << 2) | 1) in dwfl_getmodules() 87 : (((m == NULL ? (ptrdiff_t) dwfl->lookup_elts + 1 in dwfl_getmodules()
|
D | linux-proc-maps.c | 92 grovel_auxv (pid_t pid, Dwfl *dwfl, GElf_Addr *sysinfo_ehdr) in grovel_auxv() argument 105 GElf_Addr segment_align64 = dwfl->segment_align; in grovel_auxv() 106 GElf_Addr segment_align32 = dwfl->segment_align; in grovel_auxv() 156 bool valid64 = sysinfo_ehdr64 != 0 || segment_align64 != dwfl->segment_align; in grovel_auxv() 157 bool valid32 = sysinfo_ehdr32 != 0 || segment_align32 != dwfl->segment_align; in grovel_auxv() 166 dwfl->segment_align = segment_align64; in grovel_auxv() 172 dwfl->segment_align = segment_align32; in grovel_auxv() 179 do_report (Dwfl *dwfl, char **plast_file, Dwarf_Addr low, Dwarf_Addr high) in do_report() argument 183 Dwfl_Module *mod = INTUSE(dwfl_report_module) (dwfl, *plast_file, in do_report() 193 #define report() do_report(dwfl, &last_file, low, high) [all …]
|
D | linux-pid-attach.c | 118 pid_memory_read (Dwfl *dwfl, Dwarf_Addr addr, Dwarf_Word *result, void *arg) in pid_memory_read() argument 123 Dwfl_Process *process = dwfl->process; in pid_memory_read() 160 pid_next_thread (Dwfl *dwfl __attribute__ ((unused)), void *dwfl_arg, in pid_next_thread() argument 204 pid_getthread (Dwfl *dwfl __attribute__ ((unused)), pid_t tid, in pid_getthread() argument 251 pid_detach (Dwfl *dwfl __attribute__ ((unused)), void *dwfl_arg) in pid_detach() argument 295 dwfl_linux_proc_attach (Dwfl *dwfl, pid_t pid, bool assume_ptrace_stopped) in dwfl_linux_proc_attach() argument 309 if (dwfl->process == NULL && dwfl->attacherr == DWFL_E_NOERROR) in dwfl_linux_proc_attach() 312 dwfl->attacherr = __libdwfl_canon_error (DWFL_E_ERRNO); in dwfl_linux_proc_attach() 383 if (! INTUSE(dwfl_attach_state) (dwfl, elf, pid, &pid_thread_callbacks, in dwfl_linux_proc_attach() 398 __libdwfl_get_pid_arg (Dwfl *dwfl) in INTDEF() [all …]
|
D | core-file.c | 126 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() 445 dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable) in dwfl_core_file_report() argument 454 if (dwfl->user_core != NULL) in dwfl_core_file_report() 455 free (dwfl->user_core->executable_for_core); in dwfl_core_file_report() 458 if (dwfl->user_core != NULL) in dwfl_core_file_report() 459 dwfl->user_core->executable_for_core = NULL; in dwfl_core_file_report() [all …]
|
D | linux-kernel-modules.c | 81 try_kernel_name (Dwfl *dwfl, char **fname, bool try_debug) in try_kernel_name() argument 88 int fd = ((((dwfl->callbacks->debuginfo_path in try_kernel_name() 89 ? *dwfl->callbacks->debuginfo_path : NULL) in try_kernel_name() 95 Dwfl_Module fakemod = { .dwfl = dwfl }; in try_kernel_name() 153 find_kernel_elf (Dwfl *dwfl, const char *release, char **fname) in find_kernel_elf() argument 160 int fd = try_kernel_name (dwfl, fname, true); in find_kernel_elf() 166 fd = try_kernel_name (dwfl, fname, true); in find_kernel_elf() 173 get_release (Dwfl *dwfl, const char **release) in get_release() argument 175 if (dwfl == NULL) in get_release() 192 report_kernel (Dwfl *dwfl, const char **release, in report_kernel() argument [all …]
|
D | dwfl_begin.c | 40 Dwfl *dwfl = calloc (1, sizeof *dwfl); in dwfl_begin() local 41 if (dwfl == NULL) in dwfl_begin() 45 dwfl->callbacks = callbacks; in dwfl_begin() 46 dwfl->offline_next_address = OFFLINE_REDZONE; in dwfl_begin() 49 return dwfl; in dwfl_begin()
|
/external/elfutils/include/elfutils/ |
D | libdwfl.h | 110 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/ |
D | backtrace.c | 40 #include ELFUTILS_HEADER(dwfl) 72 const char *symname, Dwfl *dwfl) in callback_verify() argument 120 mod = dwfl_addrmodule (dwfl, pc - 1); in callback_verify() 133 mod = dwfl_addrmodule (dwfl, pc); in callback_verify() 169 Dwfl *dwfl = dwfl_thread_dwfl (thread); in frame_callback() local 170 Dwfl_Module *mod = dwfl_addrmodule (dwfl, pc_adjusted); in frame_callback() 178 callback_verify (tid, *framenop, pc, symname, dwfl); in frame_callback() 206 dump (Dwfl *dwfl) in dump() argument 208 ptrdiff_t ptrdiff = dwfl_getmodules (dwfl, dump_modules, NULL, 0); in dump() 211 switch (dwfl_getthreads (dwfl, thread_callback, NULL)) in dump() [all …]
|
D | dwfl-bug-addr-overflow.c | 25 #include ELFUTILS_HEADER(dwfl) 44 Dwfl *dwfl = dwfl_begin (&offline_callbacks); in main() local 45 assert (dwfl != NULL); in main() 47 Dwfl_Module *high = dwfl_report_module (dwfl, "high", in main() 51 Dwfl_Module *low = dwfl_report_module (dwfl, "low", in main() 55 Dwfl_Module *middle = dwfl_report_module (dwfl, "middle", in main() 60 int ret = dwfl_report_end (dwfl, NULL, NULL); in main() 63 Dwfl_Module *mod = dwfl_addrmodule (dwfl, UINT64_C (0xffffffff00010123)); in main() 65 mod = dwfl_addrmodule (dwfl, UINT64_C (0x00010123)); in main() 67 mod = dwfl_addrmodule (dwfl, UINT64_C (0xffff00010123)); in main() [all …]
|
D | dwfl-bug-fd-leak.c | 40 #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 …]
|
D | backtrace-dwarf.c | 30 #include ELFUTILS_HEADER(dwfl) 49 report_pid (Dwfl *dwfl, pid_t pid) in report_pid() argument 51 int result = dwfl_linux_proc_report (dwfl, pid); in report_pid() 57 if (dwfl_report_end (dwfl, NULL, NULL) != 0) in report_pid() 60 result = dwfl_linux_proc_attach (dwfl, pid, true); in report_pid() 78 Dwfl *dwfl = dwfl_begin (&proc_callbacks); in pid_to_dwfl() local 79 if (dwfl == NULL) in pid_to_dwfl() 81 report_pid (dwfl, pid); in pid_to_dwfl() 82 return dwfl; in pid_to_dwfl() 99 Dwfl *dwfl = dwfl_thread_dwfl (thread); in frame_callback() local [all …]
|
D | dwfl-bug-getmodules.c | 19 #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()
|
D | backtrace-data.c | 42 #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() 144 report_module (Dwfl *dwfl, pid_t child, Dwarf_Addr addr) in report_module() argument 148 Dwfl_Module *mod = dwfl_report_elf (dwfl, long_name, long_name, -1, in report_module() 152 assert (dwfl_addrmodule (dwfl, addr) == mod); in report_module() 157 next_thread (Dwfl *dwfl, void *dwfl_arg __attribute__ ((unused)), in next_thread() argument 165 return dwfl_pid (dwfl); in next_thread() 231 Dwfl *dwfl = dwfl_thread_dwfl (dwfl_frame_thread (state)); in frame_callback() local 232 Dwfl_Module *mod = dwfl_addrmodule (dwfl, pc_adjusted); in frame_callback() [all …]
|
D | addrcfi.c | 21 #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 …]
|
D | dwfl-addr-sect.c | 29 #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()
|
D | addrscopes.c | 21 #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 …]
|
D | dwfl-bug-report.c | 19 #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()
|