/external/elfutils/libdwfl/ |
D | segment.c | 53 segment_start (Dwfl *dwfl, GElf_Addr start) in segment_start() argument 55 if (dwfl->segment_align > 1) in segment_start() 56 start &= -dwfl->segment_align; in segment_start() 61 segment_end (Dwfl *dwfl, GElf_Addr end) in segment_end() argument 63 if (dwfl->segment_align > 1) in segment_end() 64 end = (end + dwfl->segment_align - 1) & -dwfl->segment_align; in segment_end() 69 insert (Dwfl *dwfl, size_t i, GElf_Addr start, GElf_Addr end, int segndx) in insert() argument 71 bool need_start = (i == 0 || dwfl->lookup_addr[i - 1] != start); in insert() 72 bool need_end = (i >= dwfl->lookup_elts || dwfl->lookup_addr[i + 1] != end); in insert() 77 if (dwfl->lookup_alloc - dwfl->lookup_elts < need) in insert() [all …]
|
D | argp-std.c | 117 inline void failure (Dwfl *dwfl, int errnum, const char *msg) in parse_opt() 119 if (dwfl != NULL) in parse_opt() 120 dwfl_end (dwfl); in parse_opt() 127 inline error_t fail (Dwfl *dwfl, int errnum, const char *msg) in parse_opt() 129 failure (dwfl, errnum, msg); in parse_opt() 141 Dwfl *dwfl = state->hook; 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() 146 return fail (dwfl, -1, arg); in parse_opt() [all …]
|
D | libdwfl.h | 123 extern void dwfl_report_begin (Dwfl *dwfl); 151 extern int dwfl_report_segment (Dwfl *dwfl, int ndx, 158 extern Dwfl_Module *dwfl_report_module (Dwfl *dwfl, const char *name, 166 extern Dwfl_Module *dwfl_report_elf (Dwfl *dwfl, const char *name, 174 extern Dwfl_Module *dwfl_report_offline (Dwfl *dwfl, const char *name, 185 extern int dwfl_report_end (Dwfl *dwfl, 196 extern void dwfl_report_begin_add (Dwfl *dwfl); 218 extern ptrdiff_t dwfl_getmodules (Dwfl *dwfl, 226 extern Dwfl_Module *dwfl_addrmodule (Dwfl *dwfl, Dwarf_Addr address); 232 extern int dwfl_addrsegment (Dwfl *dwfl, Dwarf_Addr address, Dwfl_Module **mod); [all …]
|
D | offline.c | 116 static Dwfl_Module *process_elf (Dwfl *dwfl, const char *name, 118 static Dwfl_Module *process_archive (Dwfl *dwfl, const char *name, 126 process_file (Dwfl *dwfl, const char *name, const char *file_name, int fd, in process_file() argument 138 return process_elf (dwfl, name, file_name, fd, elf); in process_file() 141 return process_archive (dwfl, name, file_name, fd, elf, predicate); in process_file() 147 process_elf (Dwfl *dwfl, const char *name, const char *file_name, int fd, in process_elf() argument 150 Dwfl_Module *mod = __libdwfl_report_elf (dwfl, name, file_name, fd, elf, in process_elf() 151 dwfl->offline_next_address); in process_elf() 160 if ((dwfl->offline_next_address >= mod->low_addr in process_elf() 161 || mod->low_addr - dwfl->offline_next_address < OFFLINE_REDZONE) in process_elf() [all …]
|
D | dwfl_getmodules.c | 53 dwfl_getmodules (Dwfl *dwfl, in dwfl_getmodules() argument 59 if (dwfl == NULL) in dwfl_getmodules() 70 Dwfl_Module *m = dwfl->modulelist; in dwfl_getmodules() 81 else if (((offset & 3) == 2) && likely (dwfl->lookup_module != NULL)) in dwfl_getmodules() 85 if ((size_t) offset - 1 == dwfl->lookup_elts) in dwfl_getmodules() 88 if (unlikely ((size_t) offset - 1 > dwfl->lookup_elts)) in dwfl_getmodules() 91 m = dwfl->lookup_module[offset - 1]; in dwfl_getmodules() 107 return ((dwfl->lookup_module == NULL) ? ((offset << 2) | 1) in dwfl_getmodules() 108 : (((m == NULL ? (ptrdiff_t) dwfl->lookup_elts + 1 in dwfl_getmodules()
|
D | dwfl_module.c | 112 dwfl_report_begin_add (Dwfl *dwfl __attribute__ ((unused))) in dwfl_report_begin_add() argument 120 dwfl_report_begin (Dwfl *dwfl) in INTDEF() 123 dwfl->lookup_elts = 0; in INTDEF() 125 for (Dwfl_Module *m = dwfl->modulelist; m != NULL; m = m->next) in INTDEF() 128 dwfl->offline_next_address = OFFLINE_REDZONE; in INTDEF() 136 dwfl_report_module (Dwfl *dwfl, const char *name, in INTDEF() 139 Dwfl_Module **tailp = &dwfl->modulelist, **prevp = tailp; in INTDEF() 146 if (unlikely (dwfl->lookup_module != NULL)) in INTDEF() 148 free (dwfl->lookup_module); in INTDEF() 149 dwfl->lookup_module = NULL; in INTDEF() [all …]
|
D | dwfl_end.c | 53 dwfl_end (Dwfl *dwfl) in dwfl_end() argument 55 if (dwfl == NULL) in dwfl_end() 58 free (dwfl->lookup_addr); in dwfl_end() 59 free (dwfl->lookup_module); in dwfl_end() 60 free (dwfl->lookup_segndx); in dwfl_end() 62 Dwfl_Module *next = dwfl->modulelist; in dwfl_end() 70 free (dwfl); in dwfl_end()
|
D | dwfl_begin.c | 61 Dwfl *dwfl = calloc (1, sizeof *dwfl); in dwfl_begin() local 62 if (dwfl == NULL) in dwfl_begin() 66 dwfl->callbacks = callbacks; in dwfl_begin() 67 dwfl->offline_next_address = OFFLINE_REDZONE; in dwfl_begin() 70 return dwfl; in dwfl_begin()
|
D | link_map.c | 163 integrated_memory_callback (Dwfl *dwfl, int ndx, in integrated_memory_callback() argument 181 return (*info->memory_callback) (dwfl, ndx, buffer, buffer_available, in integrated_memory_callback() 192 return (*info->memory_callback) (dwfl, ndx, buffer, buffer_available, in integrated_memory_callback() 196 if ((*info->memory_callback) (dwfl, ndx, &info->buffer, buffer_available, in integrated_memory_callback() 206 (void) INTUSE(dwfl_addrsegment) (dwfl, vaddr, &mod); in integrated_memory_callback() 219 (dwfl, 0, buffer, buffer_available, in integrated_memory_callback() 266 Dwfl *dwfl, GElf_Addr r_debug_vaddr, in report_r_debug() argument 278 (void) (*memory_callback) (dwfl, -1, &buffer, &buffer_available, 0, 0, in report_r_debug() 296 int segndx = INTUSE(dwfl_addrsegment) (dwfl, vaddr, NULL); in report_r_debug() 298 || unlikely (! (*memory_callback) (dwfl, segndx, in report_r_debug() [all …]
|
D | linux-kernel-modules.c | 83 try_kernel_name (Dwfl *dwfl, char **fname, bool try_debug) in try_kernel_name() argument 90 int fd = ((((dwfl->callbacks->debuginfo_path in try_kernel_name() 91 ? *dwfl->callbacks->debuginfo_path : NULL) in try_kernel_name() 97 Dwfl_Module fakemod = { .dwfl = dwfl }; in try_kernel_name() 127 find_kernel_elf (Dwfl *dwfl, const char *release, char **fname) in find_kernel_elf() argument 134 int fd = try_kernel_name (dwfl, fname, true); in find_kernel_elf() 140 fd = try_kernel_name (dwfl, fname, true); in find_kernel_elf() 147 get_release (Dwfl *dwfl, const char **release) in get_release() argument 149 if (dwfl == NULL) in get_release() 166 report_kernel (Dwfl *dwfl, const char **release, in report_kernel() argument [all …]
|
D | dwfl_segment_report_module.c | 78 addr_segndx (Dwfl *dwfl, size_t segment, GElf_Addr addr) in addr_segndx() argument 80 int ndx = dwfl->lookup_segndx[segment]; in addr_segndx() 83 if (dwfl->lookup_segndx[segment] >= 0) in addr_segndx() 84 ndx = dwfl->lookup_segndx[segment]; in addr_segndx() 87 while (segment < dwfl->lookup_elts - 1 in addr_segndx() 88 && dwfl->lookup_addr[segment] < addr); in addr_segndx() 90 while (dwfl->lookup_segndx[segment] < 0 in addr_segndx() 91 && segment < dwfl->lookup_elts - 1) in addr_segndx() 94 if (dwfl->lookup_segndx[segment] >= 0) in addr_segndx() 95 ndx = dwfl->lookup_segndx[segment]; in addr_segndx() [all …]
|
D | linux-proc-maps.c | 130 proc_maps_report (Dwfl *dwfl, FILE *f, GElf_Addr sysinfo_ehdr, pid_t pid) in proc_maps_report() argument 141 Dwfl_Module *mod = INTUSE(dwfl_report_module) (dwfl, last_file, in proc_maps_report() 227 dwfl_linux_proc_maps_report (Dwfl *dwfl, FILE *f) in dwfl_linux_proc_maps_report() argument 229 return proc_maps_report (dwfl, f, 0, 0); in dwfl_linux_proc_maps_report() 234 dwfl_linux_proc_report (Dwfl *dwfl, pid_t pid) in INTDEF() 236 if (dwfl == NULL) in INTDEF() 256 result = proc_maps_report (dwfl, f, sysinfo_ehdr, pid); in INTDEF()
|
/external/elfutils/tests/ |
D | dwfl-bug-fd-leak.c | 39 #include ELFUTILS_HEADER(dwfl) 53 Dwfl *dwfl = dwfl_begin (&proc_callbacks); in elfutils_open() local 54 if (dwfl == NULL) in elfutils_open() 57 int result = dwfl_linux_proc_report (dwfl, pid); in elfutils_open() 63 if (dwfl_report_end (dwfl, NULL, NULL) != 0) in elfutils_open() 67 Dwarf *dbg = dwfl_addrdwarf (dwfl, address, &bias); in elfutils_open() 76 Elf *elf = dwfl_module_getelf (dwfl_addrmodule (dwfl, address), &bias); in elfutils_open() 81 return dwfl; in elfutils_open() 85 elfutils_close (Dwfl *dwfl) in elfutils_close() argument 87 dwfl_end (dwfl); in elfutils_close() [all …]
|
D | dwfl-bug-addr-overflow.c | 33 #include ELFUTILS_HEADER(dwfl) 52 Dwfl *dwfl = dwfl_begin (&offline_callbacks); in main() local 53 assert (dwfl != NULL); in main() 55 Dwfl_Module *high = dwfl_report_module (dwfl, "high", in main() 59 Dwfl_Module *low = dwfl_report_module (dwfl, "low", in main() 63 Dwfl_Module *middle = dwfl_report_module (dwfl, "middle", in main() 68 int ret = dwfl_report_end (dwfl, NULL, NULL); in main() 71 Dwfl_Module *mod = dwfl_addrmodule (dwfl, UINT64_C (0xffffffff00010123)); in main() 73 mod = dwfl_addrmodule (dwfl, UINT64_C (0x00010123)); in main() 75 mod = dwfl_addrmodule (dwfl, UINT64_C (0xffff00010123)); in main() [all …]
|
D | dwfl-bug-getmodules.c | 27 #include ELFUTILS_HEADER(dwfl) 55 Dwfl *dwfl = dwfl_begin (&callbacks); in main() local 57 dwfl_report_module (dwfl, "m1", 0, 0x1000); in main() 58 dwfl_report_module (dwfl, "m2", 0x2000, 0x3000); in main() 59 dwfl_report_module (dwfl, "m3", 0x4000, 0x5000); in main() 61 dwfl_report_end (dwfl, NULL, NULL); in main() 63 ptrdiff_t offset = dwfl_getmodules (dwfl, &iterate, dwfl, 0); in main() 67 offset = dwfl_getmodules (dwfl, &iterate, NULL, offset); in main() 71 dwfl_end (dwfl); in main()
|
D | dwfl-addr-sect.c | 37 #include ELFUTILS_HEADER(dwfl) 41 handle_address (Dwfl *dwfl, Dwarf_Addr address) in handle_address() argument 43 Dwfl_Module *mod = dwfl_addrmodule (dwfl, address); in handle_address() 70 Dwfl *dwfl = NULL; in main() local 71 (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, &dwfl); in main() 72 assert (dwfl != NULL); in main() 80 result |= handle_address (dwfl, addr); in main() 85 dwfl_end (dwfl); in main()
|
D | dwfl-bug-report.c | 27 #include ELFUTILS_HEADER(dwfl) 44 Dwfl *dwfl = dwfl_begin (&callbacks); in main() local 48 dwfl_report_begin (dwfl); in main() 49 dwfl_report_module (dwfl, "module1", 0, 10); in main() 50 dwfl_report_end (dwfl, NULL, NULL); in main() 53 dwfl_end (dwfl); in main()
|
D | addrscopes.c | 29 #include ELFUTILS_HEADER(dwfl) 103 handle_address (GElf_Addr pc, Dwfl *dwfl) in handle_address() argument 106 Dwarf_Die *cudie = dwfl_addrdie (dwfl, pc, &cubias); in handle_address() 135 Dwfl_Line *loline = dwfl_getsrc (dwfl, lowpc); in handle_address() 136 Dwfl_Line *hiline = dwfl_getsrc (dwfl, highpc); in handle_address() 156 Dwfl *dwfl = NULL; in main() local 157 (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, &dwfl); in main() 158 assert (dwfl != NULL); in main() 179 handle_address (addr, dwfl); in main() 193 handle_address (addr, dwfl); in main() [all …]
|
D | funcretval.c | 29 #include ELFUTILS_HEADER(dwfl) 43 Dwfl *dwfl; member 99 struct args a = { .dwfl = NULL, .cu = NULL }; in main() 102 &a.dwfl); in main() 103 assert (a.dwfl != NULL); in main() 108 while ((a.cu = dwfl_nextcu (a.dwfl, a.cu, &a.dwbias)) != NULL) in main() 111 dwfl_end (a.dwfl); in main()
|
D | find-prologues.c | 29 #include ELFUTILS_HEADER(dwfl) 43 Dwfl *dwfl; member 101 struct args a = { .dwfl = NULL, .cu = NULL }; in main() 104 &a.dwfl); in main() 105 assert (a.dwfl != NULL); in main() 110 while ((a.cu = dwfl_nextcu (a.dwfl, a.cu, &a.dwbias)) != NULL) in main() 113 dwfl_end (a.dwfl); in main()
|
D | funcscopes.c | 29 #include ELFUTILS_HEADER(dwfl) 106 Dwfl *dwfl; member 163 Dwfl_Line *loline = dwfl_getsrc (a->dwfl, lowpc); in handle_function() 164 Dwfl_Line *hiline = dwfl_getsrc (a->dwfl, highpc); in handle_function() 187 struct args a = { .dwfl = NULL, .cu = NULL }; in main() 190 &a.dwfl); in main() 191 assert (a.dwfl != NULL); in main() 196 while ((a.cu = dwfl_nextcu (a.dwfl, a.cu, &a.dwbias)) != NULL) in main() 199 dwfl_end (a.dwfl); in main()
|
D | line2addr.c | 31 #include ELFUTILS_HEADER(dwfl) 127 Dwfl *dwfl = NULL; in main() local 128 (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &cnt, &dwfl); in main() 129 assert (dwfl != NULL); in main() 148 (void) dwfl_getdwarf (dwfl, &handle_module, &a, 0); in main() 153 dwfl_end (dwfl); in main()
|
D | dwflmodtest.c | 37 #include ELFUTILS_HEADER(dwfl) 259 Dwfl *dwfl = NULL; in main() local 269 (void) argp_parse (&argp, argc, argv, 0, NULL, &dwfl); in main() 270 assert (dwfl != NULL); in main() 274 p = dwfl_getmodules (dwfl, &list_module, NULL, p); in main() 280 p = dwfl_getdwarf (dwfl, &print_module, &show_functions, p); in main() 287 p = dwfl_getmodules (dwfl, &list_module, NULL, p); in main() 292 dwfl_end (dwfl); in main()
|
D | Makefile.in | 47 rdwrmmap$(EXEEXT) dwfl-bug-addr-overflow$(EXEEXT) \ 48 arls$(EXEEXT) dwfl-bug-fd-leak$(EXEEXT) \ 49 dwfl-addr-sect$(EXEEXT) dwfl-bug-report$(EXEEXT) \ 50 early-offscn$(EXEEXT) dwfl-bug-getmodules$(EXEEXT) \ 68 dwfl-bug-addr-overflow$(EXEEXT) run-addrname-test.sh \ 69 dwfl-bug-fd-leak$(EXEEXT) dwfl-bug-report$(EXEEXT) \ 70 run-dwfl-bug-offline-rel.sh run-dwfl-addr-sect.sh \ 165 dwfl_addr_sect_SOURCES = dwfl-addr-sect.c 166 dwfl_addr_sect_OBJECTS = dwfl-addr-sect.$(OBJEXT) 170 dwfl_bug_addr_overflow_SOURCES = dwfl-bug-addr-overflow.c [all …]
|
/external/elfutils/src/ |
D | addr2line.c | 99 static int handle_address (const char *addr, Dwfl *dwfl); 139 Dwfl *dwfl = NULL; in main() local 140 (void) argp_parse (&argp, argc, argv, 0, &remaining, &dwfl); in main() 141 assert (dwfl != NULL); in main() 157 result = handle_address (buf, dwfl); in main() 165 result = handle_address (argv[remaining], dwfl); in main() 368 handle_address (const char *string, Dwfl *dwfl) in handle_address() argument 383 if (dwfl_getmodules (dwfl, &see_one_module, &mod, 0) != 0 in handle_address() 424 (void) dwfl_getmodules (dwfl, &find_symbol, arg, 0); in handle_address() 444 Dwfl_Module *mod = dwfl_addrmodule (dwfl, addr); in handle_address()
|