/external/elfutils/libdwfl/ |
segment.c | 53 segment_start (Dwfl *dwfl, GElf_Addr start) 55 if (dwfl->segment_align > 1) 56 start &= -dwfl->segment_align; 61 segment_end (Dwfl *dwfl, GElf_Addr end) 63 if (dwfl->segment_align > 1) 64 end = (end + dwfl->segment_align - 1) & -dwfl->segment_align; 69 insert (Dwfl *dwfl, size_t i, GElf_Addr start, GElf_Addr end, int segndx [all...] |
argp-std.c | 117 inline void failure (Dwfl *dwfl, int errnum, const char *msg) 119 if (dwfl != NULL) 120 dwfl_end (dwfl); 127 inline error_t fail (Dwfl *dwfl, int errnum, const char *msg) 129 failure (dwfl, errnum, msg); 141 Dwfl *dwfl = state->hook; local 142 if (dwfl == NULL 172 Dwfl *dwfl = INTUSE(dwfl_begin) (&proc_callbacks); local 194 Dwfl *dwfl = INTUSE(dwfl_begin) (&proc_callbacks); local 207 Dwfl *dwfl = state->hook; local 252 Dwfl *dwfl = INTUSE(dwfl_begin) (&kernel_callbacks); local 269 Dwfl *dwfl = INTUSE(dwfl_begin) (&offline_callbacks); local 282 Dwfl *dwfl = state->hook; local [all...] |
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, 138 return process_elf (dwfl, name, file_name, fd, elf); 141 return process_archive (dwfl, name, file_name, fd, elf, predicate); 147 process_elf (Dwfl *dwfl, const char *name, const char *file_name, int fd [all...] |
dwfl_module.c | 112 dwfl_report_begin_add (Dwfl *dwfl __attribute__ ((unused))) 120 dwfl_report_begin (Dwfl *dwfl) 123 dwfl->lookup_elts = 0; 125 for (Dwfl_Module *m = dwfl->modulelist; m != NULL; m = m->next) 128 dwfl->offline_next_address = OFFLINE_REDZONE; 136 dwfl_report_module (Dwfl *dwfl, const char *name, 139 Dwfl_Module **tailp = &dwfl->modulelist, **prevp = tailp [all...] |
libdwfl.h | 57 typedef struct Dwfl Dwfl; 98 extern Dwfl *dwfl_begin (const Dwfl_Callbacks *callbacks) 103 extern void dwfl_end (Dwfl *); 106 extern const char *dwfl_version (Dwfl *); 123 extern void dwfl_report_begin (Dwfl *dwfl); 130 effective page size for the address space DWFL describes. 146 The only information that can be extracted from DWFL later is the 151 extern int dwfl_report_segment (Dwfl *dwfl, int ndx [all...] |
dwfl_begin.c | 52 Dwfl * 61 Dwfl *dwfl = calloc (1, sizeof *dwfl); local 62 if (dwfl == NULL) 66 dwfl->callbacks = callbacks; 67 dwfl->offline_next_address = OFFLINE_REDZONE; 70 return dwfl;
|
dwfl_end.c | 53 dwfl_end (Dwfl *dwfl) 55 if (dwfl == NULL) 58 free (dwfl->lookup_addr); 59 free (dwfl->lookup_module); 60 free (dwfl->lookup_segndx); 62 Dwfl_Module *next = dwfl->modulelist; 70 free (dwfl);
|
dwfl_getmodules.c | 53 dwfl_getmodules (Dwfl *dwfl, 59 if (dwfl == NULL) 64 DWFL->lookup_module is populated, we can instead keep our 70 Dwfl_Module *m = dwfl->modulelist; 81 else if (((offset & 3) == 2) && likely (dwfl->lookup_module != NULL)) 85 if ((size_t) offset - 1 == dwfl->lookup_elts) 88 if (unlikely ((size_t) offset - 1 > dwfl->lookup_elts)) 91 m = dwfl->lookup_module[offset - 1]; 107 return ((dwfl->lookup_module == NULL) ? ((offset << 2) | 1 [all...] |
link_map.c | 164 integrated_memory_callback (Dwfl *dwfl, int ndx, 182 return (*info->memory_callback) (dwfl, ndx, buffer, buffer_available, 193 return (*info->memory_callback) (dwfl, ndx, buffer, buffer_available, 197 if ((*info->memory_callback) (dwfl, ndx, &info->buffer, buffer_available, 207 (void) INTUSE(dwfl_addrsegment) (dwfl, vaddr, &mod); 220 (dwfl, 0, buffer, buffer_available, 268 Dwfl *dwfl, GElf_Addr r_debug_vaddr, 280 (void) (*memory_callback) (dwfl, -1, &buffer, &buffer_available, 0, 0 [all...] |
linux-kernel-modules.c | 83 try_kernel_name (Dwfl *dwfl, char **fname, bool try_debug) 90 int fd = ((((dwfl->callbacks->debuginfo_path 91 ? *dwfl->callbacks->debuginfo_path : NULL) 97 Dwfl_Module fakemod = { .dwfl = dwfl }; 127 find_kernel_elf (Dwfl *dwfl, const char *release, char **fname) 134 int fd = try_kernel_name (dwfl, fname, true); 140 fd = try_kernel_name (dwfl, fname, true) [all...] |
libdwflP.h | 105 struct Dwfl 144 Dwfl *dwfl; member in struct:Dwfl_Module 145 struct Dwfl_Module *next; /* Link on Dwfl.modulelist. */ 261 MOD->dwfl->callbacks->section_address is called to determine the actual 305 extern Dwfl_Module *__libdwfl_report_elf (Dwfl *dwfl, const char *name, 311 extern Dwfl_Module *__libdwfl_report_offline (Dwfl *dwfl, const char *name, 324 typedef bool Dwfl_Memory_Callback (Dwfl *dwfl, int segndx [all...] |
dwfl_segment_report_module.c | 78 addr_segndx (Dwfl *dwfl, size_t segment, GElf_Addr addr) 80 int ndx = dwfl->lookup_segndx[segment]; 83 if (dwfl->lookup_segndx[segment] >= 0) 84 ndx = dwfl->lookup_segndx[segment]; 87 while (segment < dwfl->lookup_elts - 1 88 && dwfl->lookup_addr[segment] < addr); 90 while (dwfl->lookup_segndx[segment] < 0 91 && segment < dwfl->lookup_elts - 1) 94 if (dwfl->lookup_segndx[segment] >= 0 [all...] |
dwfl_nextcu.c | 53 dwfl_nextcu (Dwfl *dwfl, Dwarf_Die *lastcu, Dwarf_Addr *bias) 55 if (dwfl == NULL) 63 mod = dwfl->modulelist;
|
/external/elfutils/tests/ |
dwfl-bug-addr-overflow.c | 33 #include ELFUTILS_HEADER(dwfl) 52 Dwfl *dwfl = dwfl_begin (&offline_callbacks); local 53 assert (dwfl != NULL); 55 Dwfl_Module *high = dwfl_report_module (dwfl, "high", 59 Dwfl_Module *low = dwfl_report_module (dwfl, "low", 63 Dwfl_Module *middle = dwfl_report_module (dwfl, "middle", 68 int ret = dwfl_report_end (dwfl, NULL, NULL); 71 Dwfl_Module *mod = dwfl_addrmodule (dwfl, UINT64_C (0xffffffff00010123)); 73 mod = dwfl_addrmodule (dwfl, UINT64_C (0x00010123)) [all...] |
dwfl-bug-fd-leak.c | 39 #include ELFUTILS_HEADER(dwfl) 42 static Dwfl * 53 Dwfl *dwfl = dwfl_begin (&proc_callbacks); local 54 if (dwfl == NULL) 57 int result = dwfl_linux_proc_report (dwfl, pid); 63 if (dwfl_report_end (dwfl, NULL, NULL) != 0) 67 Dwarf *dbg = dwfl_addrdwarf (dwfl, address, &bias); 76 Elf *elf = dwfl_module_getelf (dwfl_addrmodule (dwfl, address), &bias); 81 return dwfl; 105 Dwfl *dwfl = elfutils_open (getpid (), (Dwarf_Addr) (uintptr_t) &main); local [all...] |
dwfl-bug-getmodules.c | 27 #include ELFUTILS_HEADER(dwfl) 55 Dwfl *dwfl = dwfl_begin (&callbacks); local 57 dwfl_report_module (dwfl, "m1", 0, 0x1000); 58 dwfl_report_module (dwfl, "m2", 0x2000, 0x3000); 59 dwfl_report_module (dwfl, "m3", 0x4000, 0x5000); 61 dwfl_report_end (dwfl, NULL, NULL); 63 ptrdiff_t offset = dwfl_getmodules (dwfl, &iterate, dwfl, 0); 67 offset = dwfl_getmodules (dwfl, &iterate, NULL, offset) [all...] |
dwfl-addr-sect.c | 37 #include ELFUTILS_HEADER(dwfl) 41 handle_address (Dwfl *dwfl, Dwarf_Addr address) 43 Dwfl_Module *mod = dwfl_addrmodule (dwfl, address); 70 Dwfl *dwfl = NULL; local 71 (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, &dwfl); local 72 assert (dwfl != NULL); 80 result |= handle_address (dwfl, addr); 85 dwfl_end (dwfl); [all...] |
dwfl-bug-report.c | 27 #include ELFUTILS_HEADER(dwfl) 44 Dwfl *dwfl = dwfl_begin (&callbacks); local 48 dwfl_report_begin (dwfl); 49 dwfl_report_module (dwfl, "module1", 0, 10); 50 dwfl_report_end (dwfl, NULL, NULL); 53 dwfl_end (dwfl);
|
addrscopes.c | 29 #include ELFUTILS_HEADER(dwfl) 103 handle_address (GElf_Addr pc, Dwfl *dwfl) 106 Dwarf_Die *cudie = dwfl_addrdie (dwfl, pc, &cubias); 135 Dwfl_Line *loline = dwfl_getsrc (dwfl, lowpc); 136 Dwfl_Line *hiline = dwfl_getsrc (dwfl, highpc); 156 Dwfl *dwfl = NULL; local 157 (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, &dwfl); local 158 assert (dwfl != NULL) [all...] |
find-prologues.c | 29 #include ELFUTILS_HEADER(dwfl) 43 Dwfl *dwfl; member in struct:args 101 struct args a = { .dwfl = NULL, .cu = NULL }; 104 &a.dwfl); 105 assert (a.dwfl != NULL); 110 while ((a.cu = dwfl_nextcu (a.dwfl, a.cu, &a.dwbias)) != NULL) 113 dwfl_end (a.dwfl);
|
funcretval.c | 29 #include ELFUTILS_HEADER(dwfl) 43 Dwfl *dwfl; member in struct:args 99 struct args a = { .dwfl = NULL, .cu = NULL }; 102 &a.dwfl); 103 assert (a.dwfl != NULL); 108 while ((a.cu = dwfl_nextcu (a.dwfl, a.cu, &a.dwbias)) != NULL) 111 dwfl_end (a.dwfl);
|
funcscopes.c | 29 #include ELFUTILS_HEADER(dwfl) 106 Dwfl *dwfl; member in struct:args 163 Dwfl_Line *loline = dwfl_getsrc (a->dwfl, lowpc); 164 Dwfl_Line *hiline = dwfl_getsrc (a->dwfl, highpc); 187 struct args a = { .dwfl = NULL, .cu = NULL }; 190 &a.dwfl); 191 assert (a.dwfl != NULL); 196 while ((a.cu = dwfl_nextcu (a.dwfl, a.cu, &a.dwbias)) != NULL) 199 dwfl_end (a.dwfl); [all...] |
allregs.c | 36 #include ELFUTILS_HEADER(dwfl) 180 Dwfl *dwfl = NULL; local 181 (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, &dwfl); local 182 assert (dwfl != NULL); 185 if (dwfl_getmodules (dwfl, &first_module, &mod, 0) < 0) 226 dwfl_end (dwfl);
|
line2addr.c | 31 #include ELFUTILS_HEADER(dwfl) 127 Dwfl *dwfl = NULL; local 128 (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &cnt, &dwfl); local 129 assert (dwfl != NULL); 148 (void) dwfl_getdwarf (dwfl, &handle_module, &a, 0); 153 dwfl_end (dwfl);
|
dwflmodtest.c | 37 #include ELFUTILS_HEADER(dwfl) 259 Dwfl *dwfl = NULL; local 269 (void) argp_parse (&argp, argc, argv, 0, NULL, &dwfl); 270 assert (dwfl != NULL); 274 p = dwfl_getmodules (dwfl, &list_module, NULL, p); 280 p = dwfl_getdwarf (dwfl, &print_module, &show_functions, p); 287 p = dwfl_getmodules (dwfl, &list_module, NULL, p); 292 dwfl_end (dwfl);
|