Brian Silverman | 8649792 | 2018-02-10 19:28:39 -0500 | [diff] [blame] | 1 | 2018-02-09 Joshua Watt <JPEWhacker@gmail.com> |
| 2 | |
| 3 | * dwfl_report_elf.c (__libdwfl_elf_address_range): Use FALLTHROUGH |
| 4 | macro instead of comment. |
| 5 | * frame_unwind.c (expr_eval): Likewise. |
| 6 | |
| 7 | 2017-11-20 Mark Wielaard <mark@klomp.org> |
| 8 | |
| 9 | * link_map.c (do_check64): Take a char * and calculate type and val |
| 10 | offsets before reading, possibly unaligned, values. |
| 11 | (do_check32): Likewise. |
| 12 | (check64): Remove define. |
| 13 | (check32): Likewise. |
| 14 | (auxv_format_probe): Call do_check32 and do_check64 directly with |
| 15 | a, possibly unaligned, auxv entry pointer. |
| 16 | (dwfl_link_map_report): Redefine AUXV_SCAN to not dereference a |
| 17 | possibly unaligned auxv entry pointer. |
| 18 | |
| 19 | 2017-10-16 Mark Wielaard <mark@klomp.org> |
| 20 | |
| 21 | * argp-std.c (parse_opt): For -k call argp_failure not failure to |
| 22 | keep dwfl around. |
| 23 | |
| 24 | 2017-07-26 Yunlian Jiang <yunlian@google.com> |
| 25 | |
| 26 | * argp-std.c (failure): Move to file scope. |
| 27 | (fail): Likewise. |
| 28 | |
| 29 | 2017-04-20 Ulf Hermann <ulf.hermann@qt.io> |
| 30 | Mark Wielaard <mark@klomp.org> |
| 31 | |
| 32 | * derelocate.c (compare_secrefs): Compare by end address and then by |
| 33 | section number if addresses are equal. |
| 34 | |
| 35 | 2017-04-20 Ulf Hermann <ulf.hermann@qt.io> |
| 36 | Mark Wielaard <mark@klomp.org> |
| 37 | |
| 38 | * linux-kernel-modules.c: Always return NULL from kernel_release() on |
| 39 | non-linux systems and set errno to ENOTSUP. |
| 40 | |
| 41 | 2017-04-20 Ulf Hermann <ulf.hermann@qt.io> |
| 42 | |
| 43 | * libdwflP.h: Don't include config.h. |
| 44 | * argp-std.c: Include config.h. |
| 45 | * cu.c: Likewise. |
| 46 | * derelocate.c: Likewise. |
| 47 | * dwfl_addrdie.c: Likewise. |
| 48 | * dwfl_addrdwarf.c: Likewise. |
| 49 | * dwfl_addrmodule.c: Likewise. |
| 50 | * dwfl_begin.c: Likewise. |
| 51 | * dwfl_build_id_find_debuginfo.c: Likewise. |
| 52 | * dwfl_build_id_find_elf.c: Likewise. |
| 53 | * dwfl_cumodule.c: Likewise. |
| 54 | * dwfl_dwarf_line.c: Likewise. |
| 55 | * dwfl_end.c: Likewise. |
| 56 | * dwfl_frame.c: Likewise. |
| 57 | * dwfl_frame_regs.c: Likewise. |
| 58 | * dwfl_getdwarf.c: Likewise. |
| 59 | * dwfl_getmodules.c: Likewise. |
| 60 | * dwfl_getsrc.c: Likewise. |
| 61 | * dwfl_getsrclines.c: Likewise. |
| 62 | * dwfl_line_comp_dir.c: Likewise. |
| 63 | * dwfl_linecu.c: Likewise. |
| 64 | * dwfl_lineinfo.c: Likewise. |
| 65 | * dwfl_linemodule.c: Likewise. |
| 66 | * dwfl_module.c: Likewise. |
| 67 | * dwfl_module_addrdie.c: Likewise. |
| 68 | * dwfl_module_addrname.c: Likewise. |
| 69 | * dwfl_module_addrsym.c: Likewise. |
| 70 | * dwfl_module_build_id.c: Likewise. |
| 71 | * dwfl_module_dwarf_cfi.c: Likewise. |
| 72 | * dwfl_module_eh_cfi.c: Likewise. |
| 73 | * dwfl_module_getdarf.c: Likewise. |
| 74 | * dwfl_module_getelf.c: Likewise. |
| 75 | * dwfl_module_getsrc.c: Likewise. |
| 76 | * dwfl_module_getsrc_file.c: Likewise. |
| 77 | * dwfl_module_getsym.c: Likewise. |
| 78 | * dwfl_module_info.c: Likewise. |
| 79 | * dwfl_module_nextcu.c: Likewise. |
| 80 | * dwfl_module_register_names.c: Likewise. |
| 81 | * dwfl_module_report_build_id.c: Likewise. |
| 82 | * dwfl_module_return_value_location.c: Likewise. |
| 83 | * dwfl_nextcu.c: Likewise. |
| 84 | * dwfl_onesrcline.c: Likewise. |
| 85 | * dwfl_report_elf.c: Likewise. |
| 86 | * dwfl_validate_address.c: Likewise. |
| 87 | * dwfl_version.c: Likewise. |
| 88 | * find-debuginfo.c: Likewise. |
| 89 | * gzip.c: Likewise. |
| 90 | * image-header.c: Likewise. |
| 91 | * lines.c: Likewise. |
| 92 | * linux-core-attach.c: Likewise. |
| 93 | * linux-pid-attach.c: Likewise. |
| 94 | * offline.c: Likewise. |
| 95 | * open.c: Likewise. |
| 96 | * relocate.c: Likewise. |
| 97 | * segment.c: Likewise. |
| 98 | |
| 99 | 2017-04-20 Ulf Hermann <ulf.hermann@qt.io> |
| 100 | |
| 101 | * libdwfl.h: Use __const_attribute__. |
| 102 | |
| 103 | 2017-04-20 Ulf Hermann <ulf.hermann@qt.io> |
| 104 | |
| 105 | * elf-from-memory.c: Explicitly cast phnum to size_t. |
| 106 | |
| 107 | 2017-04-20 Ulf Hermann <ulf.hermann@qt.io> |
| 108 | |
| 109 | * dwfl_module_getdwarf.c: Check shnum for 0 before subtracting from |
| 110 | it. |
| 111 | |
| 112 | 2017-04-20 Ulf Hermann <ulf.hermann@qt.io> |
| 113 | |
| 114 | * dwfl_frame.c: Drop unused sys/ptrace.h include. |
| 115 | * frame_unwind.c: Likewise. |
| 116 | * linux-pid-attach.c: Include sys/ptrace.h and sys/syscall.h only on |
| 117 | linux. |
| 118 | |
| 119 | 2017-04-20 Ulf Hermann <ulf.hermann@qt.io> |
| 120 | |
| 121 | * linux-kernel-modules.c: Include sys/types.h before fts.h |
| 122 | |
| 123 | 2017-03-24 Mark Wielaard <mark@klomp.org> |
| 124 | |
| 125 | * linux-core-attach.c (core_next_thread): If n_namesz == 0 then |
| 126 | the note name data is the empty string. |
| 127 | (dwfl_core_file_attach): Likewise. |
| 128 | |
| 129 | 2017-02-15 Ulf Hermann <ulf.hermann@qt.io> |
| 130 | |
| 131 | * linux-kernel-modules.c: Include system.h. |
| 132 | |
| 133 | 2017-02-15 Ulf Hermann <ulf.hermann@qt.io> |
| 134 | |
| 135 | * linux-kernel-modules.c: Use sysconf(_SC_PAGESIZE) to get page size. |
| 136 | * linux-proc-maps.c: Likewise. |
| 137 | |
| 138 | 2016-12-29 Luiz Angelo Daros de Luca <luizluca@gmail.com> |
| 139 | |
| 140 | * dwfl_build_id_find_elf.c: Include system.h. |
| 141 | * dwfl_module_getdwarf.c: Likewise. |
| 142 | * libdwfl_crc32_file.c: Don't define LIB_SYSTEM_H. |
| 143 | |
| 144 | 2016-11-23 Mark Wielaard <mjw@redhat.com> |
| 145 | |
| 146 | * linux-kernel-modules.c: Only include fts.h early if BAD_FTS is |
| 147 | defined. |
| 148 | |
| 149 | 2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> |
| 150 | |
| 151 | * core-file.c: Remove sys/param.h. |
| 152 | * dwfl_segment_report_module.c: Likewise. Add system.h include. |
| 153 | (MAX): Remove definition. |
| 154 | * frame_unwind.c: Add system.h include. |
| 155 | (MAX): Remove definition. |
| 156 | * linux-core-attach.c (MIN): Remove definition. |
| 157 | * linux-pid-attach.c (MAX): Likewise. |
| 158 | |
| 159 | 2016-08-12 Mark Wielaard <mjw@redhat.com> |
| 160 | |
| 161 | * link_map.c (dwfl_link_map_report): Fix assert, set in.d_size. |
| 162 | |
| 163 | 2016-04-14 Mark Wielaard <mjw@redhat.com> |
| 164 | |
| 165 | * dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Free match |
| 166 | on invalid DWARF if we allocated it. |
| 167 | |
| 168 | 2016-04-14 Mark Wielaard <mjw@redhat.com> |
| 169 | |
| 170 | * linux-proc-maps.c (proc_maps_report): Free last_file on bad file |
| 171 | mapping. |
| 172 | |
| 173 | 2016-03-01 Steven Chamberlain <steven@pyro.eu.org> |
| 174 | |
| 175 | * linux-pid-attach.c: Removed unused pid_thread_callbacks, |
| 176 | pid_thread_detach, pid_detach, pid_set_initial_registers, |
| 177 | pid_memory_read, pid_getthread, pid_next_thread in #ifndef |
| 178 | __linux__ code. |
| 179 | |
| 180 | 2016-02-22 Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> |
| 181 | Mark Wielaard <mjw@redhat.com> |
| 182 | |
| 183 | * find-debuginfo.c (find_debuginfo_in_path): Remember whether |
| 184 | debuglink_file is NULL. Try file basename (without .debug) ofr |
| 185 | absolute and relative path if debug_file was NULL. |
| 186 | * linux-kernel-modules.c (try_kernel_name): If try_debug is true call |
| 187 | dwfl_standard_find_debuginfo with NULL debuglink_file, otherwise with |
| 188 | basename of fname. |
| 189 | |
| 190 | 2016-02-13 Mark Wielaard <mjw@redhat.com> |
| 191 | |
| 192 | * linux-proc-maps.c (proc_maps_report): Free last_file when ENOEXEC. |
| 193 | |
| 194 | 2016-02-13 Mark Wielaard <mjw@redhat.com> |
| 195 | |
| 196 | * frame_unwind.c (new_unwound): Check and return unwound. |
| 197 | (handle_cfi): Check new_unwound was able to allocate new memory |
| 198 | before use. Return DWFL_E_NOMEM otherwise. |
| 199 | |
| 200 | 2016-02-11 Mark Wielaard <mjw@redhat.com> |
| 201 | |
| 202 | * relocate.c (relocate_section): Check result of all gelf_get* calls. |
| 203 | (__libdwfl_relocate): Likewise. |
| 204 | (__libdwfl_relocate_section): Likewise. |
| 205 | |
| 206 | 2016-02-11 Mark Wielaard <mjw@redhat.com> |
| 207 | |
| 208 | * relocate.c (relocate_section): Check result of gelf_update_* calls. |
| 209 | |
| 210 | 2016-01-08 Mark Wielaard <mjw@redhat.com> |
| 211 | |
| 212 | * libdwfl_a_SOURCES: Unconditionally add gzip.c. |
| 213 | * linux-kernel-modules.c (vmlinux_suffixes): We always have at least |
| 214 | .gz support. |
| 215 | (try_kernel_name): Likewise. |
| 216 | (check_suffix): Likewise. |
| 217 | * open.c (decompress): Likewise. |
| 218 | |
| 219 | 2015-12-18 Mark Wielaard <mjw@redhat.com> |
| 220 | |
| 221 | * dwfl_module_getdwarf.c (find_symtab): Uncompress symstr, xndx, sym |
| 222 | sections and aux_str, aux_xndx and aux_sym sections if necessary. |
| 223 | * relocate.c (relocate_getsym): Uncompress symtab and symtab_shndx |
| 224 | if necessary. |
| 225 | (resolve_symbol): Uncompress strtab section if necessary. |
| 226 | (relocate_section): Uncompress the section the relocations apply to |
| 227 | if necessary. |
| 228 | |
| 229 | 2015-11-18 Chih-Hung Hsieh <chh@google.com> |
| 230 | |
| 231 | * linux-proc-maps.c (proc_maps_report): Move nested function |
| 232 | 'report' to file scope. |
| 233 | |
| 234 | 2015-11-18 Chih-Hung Hsieh <chh@google.com> |
| 235 | |
| 236 | * core-file.c (elf_begin_rand): Move nested function 'fail' to file |
| 237 | scope. |
| 238 | * core-file.c (dwfl_elf_phdr_memory_callback): Move nested functions |
| 239 | 'update_end' and 'more' to file scope. |
| 240 | |
| 241 | 2015-11-17 Chih-Hung Hsieh <chh@google.com> |
| 242 | |
| 243 | * link_map.c (auxv_format_probe): Move nested functions |
| 244 | check64 and check32 to file scope. |
| 245 | |
| 246 | 2015-12-08 Jose E. Marchesi <jose.marchesi@oracle.com> |
| 247 | |
| 248 | * dwfl_frame.c (state_fetch_pc): Add a backend-defined offset to |
| 249 | the value of the return address register as defined by the CFI |
| 250 | abi. |
| 251 | * frame_unwind.c (handle_cfi): Likewise. |
| 252 | |
| 253 | 2015-12-01 Mark Wielaard <mjw@redhat.com> |
| 254 | |
| 255 | * link_map.c (dwfl_link_map_report): Track whether in.d_buf comes |
| 256 | from exec or memory_callback, free as appropriate. |
| 257 | |
| 258 | 2015-12-01 Mark Wielaard <mjw@redhat.com> |
| 259 | |
| 260 | * libdwflP.h (struct Dwfl_User_Core): New. |
| 261 | (struct DWfl): Replace executable_for_core with user_core. |
| 262 | * argp-std.c (parse_opt): Store core and fd in Dwfl user_core. |
| 263 | * core-file.c (dwfl_core_file_report): Check and store |
| 264 | executable_for_core in Dwfl user_core. |
| 265 | * dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Check and use |
| 266 | executable_for_core in Dwfl user_core. |
| 267 | * dwfl_end.c (dwfl_end): Release resources held in Dwfl user_core. |
| 268 | * link-map.c (report_r_debug): Check executable_for_core in Dwfl |
| 269 | user_core. |
| 270 | (dwfl_link_map_report): Likewise. |
| 271 | |
| 272 | 2015-11-16 Chih-Hung Hsieh <chh@google.com> |
| 273 | |
| 274 | * dwfl_module_getdwarf.c (find_prelink_address_sync): Move nested |
| 275 | function 'consider_shdr' to file scope. |
| 276 | * dwfl_module_getdwarf.c (find_dynsym): Move nested function |
| 277 | 'translate_offs' to file scope. |
| 278 | |
| 279 | 2015-11-16 Chih-Hung Hsieh <chh@google.com> |
| 280 | |
| 281 | * dwfl_module_addrsym.c (__libdwfl_addrsym): Move nested functions |
| 282 | 'same_section', 'binding_value', 'try_sym_value', and 'search_table' |
| 283 | to file scope. |
| 284 | |
| 285 | 2015-11-19 Mark Wielaard <mjw@redhat.com> |
| 286 | |
| 287 | * dwfl_module.c (__libdwfl_module_free): Remove Dwfl_Module Ebl from |
| 288 | eh_cfi and dwarf_cfi cache if necessary before calling dwarf_end and |
| 289 | dwarf_cfi_end. |
| 290 | |
| 291 | 2015-11-13 Chih-Hung Hsieh <chh@google.com> |
| 292 | |
| 293 | * gzip.c (unzip): Move nested functions to file scope. |
| 294 | |
| 295 | 2015-10-21 Chih-Hung Hsieh <chh@google.com> |
| 296 | Mark Wielaard <mjw@redhat.com> |
| 297 | |
| 298 | * dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Move nested |
| 299 | functions 'dwarf_line_file', 'dwfl_line', and 'dwfl_line_file' to |
| 300 | file scope. Rename dwarf_line_file to dwfl_dwarf_line_file. Don't |
| 301 | use INTUSE. |
| 302 | |
| 303 | 2015-10-21 Chih-Hung Hsieh <chh@google.com> |
| 304 | |
| 305 | * frame_unwind.c (expr_eval): Move nested function 'push' and 'pop' |
| 306 | to file scope. Pass used local variables in struct eval_stack. |
| 307 | |
| 308 | 2015-10-21 Chih-Hung Hsieh <chh@google.com> |
| 309 | |
| 310 | * dwfl_module.c (dwfl_report_module): Move nested function 'use' to |
| 311 | file scope. |
| 312 | |
| 313 | 2015-10-09 Josh Stone <jistone@redhat.com> |
| 314 | |
| 315 | * core-file.c (elf_begin_rand): Replace loff_t with off_t. |
| 316 | * open.c (decompress): Replace off64_t with off_t. |
| 317 | * gzip.c (unzip): Likewise. |
| 318 | * image-header.c (__libdw_image_header): Likewise. |
| 319 | * libdwflP.h: Likewise in function declarations. |
| 320 | * argp-std.c (parse_opt): Replace open64 with open. |
| 321 | * dwfl_build_id_find_elf.c (__libdwfl_open_mod_by_build_id, |
| 322 | dwfl_build_id_find_elf): Likewise. |
| 323 | * dwfl_module_getdwarf.c (open_elf_file): Likewise. |
| 324 | * dwfl_report_elf.c (dwfl_report_elf): Likewise. |
| 325 | * dwfl_segment_report_module.c (dwfl_segment_report_module): Likewise. |
| 326 | * link_map.c (report_r_debug): Likewise. |
| 327 | * offline.c (dwfl_report_offline): Likewise. |
| 328 | * linux-proc-maps.c (grovel_auxv, get_pid_class, |
| 329 | dwfl_linux_proc_find_elf): Likewise. |
| 330 | (read_proc_memory): Replace off64_t with off_t. |
| 331 | * find-debuginfo.c (find_debuginfo_in_path): Replace stat64 and |
| 332 | fstat64 with stat and fstat. |
| 333 | (try_open): Likewise, and replace open64 with open. |
| 334 | * linux-kernel-modules.c: Manually define open and fopen to open64 and |
| 335 | fopen64 when needed, since the early fts.h include breaks that. |
| 336 | (try_kernel_name): Replace open64 with open. |
| 337 | (check_notes): Likewise. |
| 338 | |
| 339 | 2015-10-09 Jose E. Marchesi <jose.marchesi@oracle.com> |
| 340 | |
| 341 | * linux-proc-maps.c (read_proc_memory): Use seek+read instead of |
| 342 | pread, as the later doesn't accept negative offsets. |
| 343 | |
| 344 | 2015-10-07 Mark Wielaard <mjw@redhat.com> |
| 345 | |
| 346 | * dwfl_module_getdwarf.c (MAX): Removed. |
| 347 | (find_prelink_address_sync): Allocate exact amount of bytes for |
| 348 | phdrs and shdrs. |
| 349 | * dwfl_segment_report_module.c (dwfl_segment_report_module): |
| 350 | Likewise for phdrs. |
| 351 | * elf-from-memory.c (MAX): Removed. |
| 352 | (elf_from_remote_memory): Allocate exact amount of bytes for phdrs. |
| 353 | |
| 354 | 2015-10-05 Chih-Hung Hsieh <chh@google.com> |
| 355 | |
| 356 | * dwfl_module_getdwarf.c (find_prelink_address_sync): Do not use |
| 357 | union of variable length arrays. |
| 358 | * dwfl_segment_report_module.c (dwfl_segment_report_module): Likewise. |
| 359 | * elf-from-memory.c (elf_from_remote_memory): Likewise. |
| 360 | * link_map.c (auxv_format_probe): Likewise. |
| 361 | * link_map.c (report_r_debug): Likewise. |
| 362 | * link_map.c (dwfl_link_map_report): Likewise. |
| 363 | |
| 364 | 2015-09-18 Chih-Hung Hsieh <chh@google.com> |
| 365 | |
| 366 | * relocate.c (relocate_section): Move nested function "relocate" |
| 367 | to file scope, pass all used local variables as constants. |
| 368 | Move nested "check_badreltype" to file scope, pass addresses of |
| 369 | updated used local variables. |
| 370 | * linux-kernel-modules.c (intuit_kernel_bounds): Move nested function |
| 371 | "read_address" to file scope, pass all updated local variables in |
| 372 | a state structure. |
| 373 | * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Move nested |
| 374 | function "subst_name" to file scope, pass all used local variables |
| 375 | as constants. |
| 376 | * linux-kernel-modules.c (dwfl_linux_kernel_report_kernel): Replace |
| 377 | simple nested function "report" with a macro. Work around gcc static |
| 378 | analysis error -Werror=maybe-uninitialized. |
| 379 | |
| 380 | 2015-09-22 Mark Wielaard <mjw@redhat.com> |
| 381 | |
| 382 | * core-file.c: Remove old-style function definitions. |
| 383 | * dwfl_error.c: Likewise. |
| 384 | * dwfl_module_dwarf_cfi.c: Likewise. |
| 385 | * dwfl_module_eh_cfi.c: Likewise. |
| 386 | * dwfl_module_register_names.c: Likewise. |
| 387 | * dwfl_module_return_value_location.c: Likewise. |
| 388 | * dwfl_version.c: Likewise. |
| 389 | |
| 390 | 2015-09-09 Chih-Hung Hsieh <chh@google.com> |
| 391 | Mark Wielaard <mjw@redhat.com> |
| 392 | |
| 393 | * dwfl_frame.c (dwfl_attach_state): Remove redundant NULL tests |
| 394 | on parameters declared with __nonnull_attribute__. |
| 395 | * libdwfl.h (dwfl_module_getelf): Don't mark first argument as |
| 396 | nonnull. |
| 397 | |
| 398 | 2015-09-08 Mark Wielaard <mjw@redhat.com> |
| 399 | |
| 400 | * libdwflP.h (struct __libdwfl_pid_arg): Add elf and elf_fd. |
| 401 | * linux-pid-attach.c (pid_detach): Call elf_end and close. |
| 402 | (dwfl_linux_proc_attach): Open and save /proc/PID/exe. |
| 403 | |
| 404 | 2015-09-04 Chih-Hung Hsieh <chh@google.com |
| 405 | |
| 406 | * frame_unwind.c (expr_eval): Use llabs instead of abs. |
| 407 | |
| 408 | 2015-08-14 Dodji Seketeli <dodji@seketeli.org> |
| 409 | |
| 410 | * find-debuginfo.c (find_debuginfo_in_path): Try to locate the |
| 411 | debug info file named debuglink_file under |
| 412 | mod->dwfl->callbacks->debuginfo_path, by looking at |
| 413 | the set of sub-trees under mod->dwfl->callbacks->debuginfo_path |
| 414 | which is common to the set of non-absolute parent trees of |
| 415 | file_name. |
| 416 | |
| 417 | 2015-06-18 Mark Wielaard <mjw@redhat.com> |
| 418 | |
| 419 | * find-debuginfo.c (try_open): Free fname on all failure paths. |
| 420 | |
| 421 | 2015-06-18 Mark Wielaard <mjw@redhat.com> |
| 422 | |
| 423 | * dwfl_module_getdwarf.c (find_symtab): Check shdr is not NULL and |
| 424 | sh_entsize is not zero. |
| 425 | |
| 426 | 2015-06-06 Mark Wielaard <mjw@redhat.com> |
| 427 | |
| 428 | * find-debuginfo.c (find_debuginfo_in_path): Always free localpath, |
| 429 | localname and file_dirname. |
| 430 | |
| 431 | 2015-06-06 Mark Wielaard <mjw@redhat.com> |
| 432 | |
| 433 | * derelocate.c (cache_sections): Free sortrefs. |
| 434 | |
| 435 | 2015-06-05 Mark Wielaard <mjw@redhat.com> |
| 436 | |
| 437 | * dwfl_segment_report_module.c (dwfl_segment_report_module): |
| 438 | If the note_file exists, but the build_id doesn't match discard |
| 439 | the file and continue reporting. |
| 440 | |
| 441 | 2015-06-01 Mark Wielaard <mjw@redhat.com> |
| 442 | |
| 443 | * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Copy path |
| 444 | pointer before passing to strsep. |
| 445 | |
| 446 | 2015-05-30 Mark Wielaard <mjw@redhat.com> |
| 447 | |
| 448 | * link_map.c (check32): Use read_4ubyte_unaligned_noncvt to read |
| 449 | type and value. |
| 450 | (read_addrs): Use read_(4|8)ubyte_unaligned_noncvt or to read |
| 451 | adresses. |
| 452 | |
| 453 | 2015-05-30 Mark Wielaard <mjw@redhat.com> |
| 454 | |
| 455 | * find-debuginfo.c (dwfl_standard_find_debuginfo): Check file_name is |
| 456 | not NULL before calling canonicalize_file_name. |
| 457 | |
| 458 | 2015-05-24 Mark Wielaard <mjw@redhat.com> |
| 459 | |
| 460 | * derelocate.c (check_module): Check mod is not NULL. |
| 461 | |
| 462 | 2015-05-22 Mark Wielaard <mjw@redhat.com> |
| 463 | |
| 464 | * link_map.c (dwfl_link_map_report): Allocate phdrs and dyn with |
| 465 | malloc instead of stack allocating. Call free when done with data. |
| 466 | |
| 467 | 2015-05-22 Mark Wielaard <mjw@redhat.com> |
| 468 | |
| 469 | * dwfl_segment_report_module.c (dwfl_segment_report_module): |
| 470 | Allocate phdrs with malloc, not on stack. free in finish. |
| 471 | Allocate dyn with malloc, not on stack, free after use. |
| 472 | |
| 473 | 2015-05-22 Mark Wielaard <mjw@redhat.com> |
| 474 | |
| 475 | * find-debuginfo.c (find_debuginfo_in_path): malloc or strdup, |
| 476 | instead of alloca or strdupa, local strings of unknown size. |
| 477 | Call free before return. |
| 478 | |
| 479 | 2015-05-22 Mark Wielaard <mjw@redhat.com> |
| 480 | |
| 481 | * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Return |
| 482 | error when id_len too small or too large. strdup, not strdupa, |
| 483 | and free path when done. |
| 484 | |
| 485 | 2015-05-19 Mark Wielaard <mjw@redhat.com> |
| 486 | |
| 487 | * elf-from-memory.c (elf_from_remote_memory): Don't allocate all |
| 488 | phdrs on the stack. Allocate with malloc and free when done. |
| 489 | |
| 490 | 2015-05-19 Mark Wielaard <mjw@redhat.com> |
| 491 | |
| 492 | * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): malloc and |
| 493 | free alternate_name. |
| 494 | |
| 495 | 2015-05-19 Mark Wielaard <mjw@redhat.com> |
| 496 | |
| 497 | * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Don't |
| 498 | stack allocate name. Only change chars up to suffix. |
| 499 | |
| 500 | 2015-05-18 Mark Wielaard <mjw@redhat.com> |
| 501 | |
| 502 | * dwfl_module_getdwarf.c (find_prelink_address_sync): Allocate |
| 503 | phdrs and shdrs unions with malloc, not alloca. Free after use. |
| 504 | |
| 505 | 2015-05-18 Mark Wielaard <mjw@redhat.com> |
| 506 | |
| 507 | * derelocate.c (cache_sections): Allocate temporary newrefs and |
| 508 | sortrefs with malloc, not alloca. Always free them on return. |
| 509 | |
| 510 | 2015-05-07 Mark Wielaard <mjw@redhat.com> |
| 511 | |
| 512 | * cu.c (intern_cu): Check for EOF and check cuoff points to a real |
| 513 | Dwarf_Die before interning. Explicitly check EOF is expected. |
| 514 | |
| 515 | 2015-05-05 Mark Wielaard <mjw@redhat.com> |
| 516 | |
| 517 | * dwfl_lineinfo.c (dwfl_lineinfo): Check info->file is valid. |
| 518 | |
| 519 | 2015-05-06 Roland McGrath <roland@hack.frob.com> |
| 520 | |
| 521 | * dwfl_error.c (struct msgtable): Break type definition out of |
| 522 | the 'msgtable' initializer. |
| 523 | (msgtable): Make it a union of struct msgtable and a char array. |
| 524 | (msgstr): Use the full-table char array rather than the msg_0 entry. |
| 525 | |
| 526 | 2015-04-23 Max Filippov <jcmvbkbc@gmail.com> |
| 527 | |
| 528 | * core-file.c (_compat_without_executable_dwfl_core_file_report): |
| 529 | Guard with SYMBOL_VERSIONING. |
| 530 | * dwfl_module_build_id.c (_compat_vaddr_at_end_dwfl_module_build_id): |
| 531 | Likewise. |
| 532 | * dwfl_report_elf.c (_compat_without_add_p_vaddr_dwfl_report_elf): |
| 533 | Likewise. |
| 534 | |
| 535 | 2015-04-02 Mark Wielaard <mjw@redhat.com> |
| 536 | |
| 537 | * segment.c (insert): Check correct number of lookup_elts. |
| 538 | |
| 539 | 2015-03-31 Mark Wielaard <mjw@redhat.com> |
| 540 | |
| 541 | * core-file.c (core_file_read_eagerly): Special case small images. |
| 542 | |
| 543 | 2015-01-26 Mark Wielaard <mjw@redhat.com> |
| 544 | |
| 545 | * dwfl_module_getdwarf.c (find_symtab): Explicitly clear symdata, |
| 546 | syments and first_global on elferr before calling find_dynsym. |
| 547 | |
| 548 | 2014-12-27 Mark Wielaard <mjw@redhat.com> |
| 549 | |
| 550 | * dwfl_module_getsrc.c (dwfl_module_getsrc): Never match a line that |
| 551 | has end_sequence set. |
| 552 | |
| 553 | 2015-01-04 Mark Wielaard <mjw@redhat.com> |
| 554 | |
| 555 | * cu.c (intern_cu): Store result and return directly when finding |
| 556 | EOF marker. |
| 557 | (__libdwfl_nextcu): Check *nextp as returned by intern_cu isn't -1. |
| 558 | |
| 559 | 2014-12-19 Mark Wielaard <mjw@redhat.com> |
| 560 | |
| 561 | * dwfl_module_getdwarf.c (find_symtab): Always try find_dynsym last. |
| 562 | |
| 563 | 2014-12-19 Mark Wielaard <mjw@redhat.com> |
| 564 | |
| 565 | * elf-from-memory.c (handle_segment): Remove palign sanity check. |
| 566 | |
| 567 | 2014-12-18 Mark Wielaard <mjw@redhat.com> |
| 568 | |
| 569 | * relocate.c (resolve_symbol): Make sure symstrdata->d_buf != NULL. |
| 570 | |
| 571 | 2014-12-13 Mark Wielaard <mjw@redhat.com> |
| 572 | |
| 573 | * dwfl_module_getdwarf.c (find_dynsym): elf_getdata_rawchunk takes |
| 574 | a size_t, make sure it doesn't overflow. |
| 575 | |
| 576 | 2014-12-13 Mark Wielaard <mjw@redhat.com> |
| 577 | |
| 578 | * cu.c (cudie_offset): Make sure Dwarf_Off difference doesn't |
| 579 | wrap around before returning as int. |
| 580 | |
| 581 | 2014-12-11 Josh Stone <jistone@redhat.com> |
| 582 | |
| 583 | * dwfl_module_getsrc.c (dwfl_module_getsrc): Return the *last* line |
| 584 | record <= addr, rather than returning immediately on matches. |
| 585 | |
| 586 | 2014-12-09 Mark Wielaard <mjw@redhat.com> |
| 587 | |
| 588 | * dwfl_segment_report_module.c (handle_file_note): Check count doesn't |
| 589 | overflow. |
| 590 | |
| 591 | 2014-12-07 Mark Wielaard <mjw@redhat.com> |
| 592 | |
| 593 | * relocate.c (relocate_section): Sanity check section overlap against |
| 594 | actually used ehsize, shentsize and phentsize. |
| 595 | |
| 596 | 2014-12-07 Mark Wielaard <mjw@redhat.com> |
| 597 | |
| 598 | * offline.c (dwfl_offline_section_address): Assert shndx is not zero. |
| 599 | * relocate.c (__libdwfl_relocate_value): Don't relocate against |
| 600 | section zero. |
| 601 | |
| 602 | 2014-11-29 Mark Wielaard <mjw@redhat.com> |
| 603 | |
| 604 | * relocate.c (relocate_section): Check relocation section and target |
| 605 | section data don't overlap any of the ELF headers. |
| 606 | (relocate): Check for offset + size overflow. |
| 607 | |
| 608 | 2014-11-22 Mark Wielaard <mjw@redhat.com> |
| 609 | |
| 610 | * link_map.c (consider_executable): Use elf_getphdrnum. |
| 611 | (dwfl_link_map_report): Likewise. |
| 612 | |
| 613 | 2014-11-18 Mark Wielaard <mjw@redhat.com> |
| 614 | |
| 615 | * dwfl_module_getdwarf.c (find_symtab): Sanity check the data buffer, |
| 616 | number of symbols and first_global before use. |
| 617 | |
| 618 | 2014-11-14 Mark Wielaard <mjw@redhat.com> |
| 619 | |
| 620 | * dwfl_module_getdwarf.c (load_symtab): Don't use tables which have |
| 621 | a zero sh_entsize. |
| 622 | |
| 623 | 2014-11-10 Mark Wielaard <mjw@redhat.com> |
| 624 | |
| 625 | * dwfl_module_getdwarf.c (find_dynsym): New inner function |
| 626 | translate_offs that takes an adjust argument. Try finding |
| 627 | the symbol table with and without adjusting to main_bias. |
| 628 | |
| 629 | 2014-09-26 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 630 | |
| 631 | Support NT_FILE for locating files. |
| 632 | * core-file.c (dwfl_core_file_report): New variables note_file and |
| 633 | note_file_size, set them and pass them to dwfl_segment_report_module. |
| 634 | * dwfl_segment_report_module.c: Include common.h and fcntl.h. |
| 635 | (buf_has_data, buf_read_ulong, handle_file_note): New functions. |
| 636 | (invalid_elf): New function from code of dwfl_segment_report_module. |
| 637 | (dwfl_segment_report_module): Add parameters note_file and |
| 638 | note_file_size. New variables elf and fd, clean them up in finish. |
| 639 | Move some code to invalid_elf. Call handle_file_note, if it found |
| 640 | a name verify the file by invalid_elf. Protect elf and fd against |
| 641 | cleanup by finish if we found the file for new Dwfl_Module. |
| 642 | * libdwflP.h (dwfl_segment_report_module): Add parameters note_file and |
| 643 | note_file_size. |
| 644 | |
| 645 | 2014-09-23 Mark Wielaard <mjw@redhat.com> |
| 646 | |
| 647 | * dwfl_segment_report_module.c (dwfl_segment_report_module): |
| 648 | Extract ei_class, ei_data and e_type early and use the result. |
| 649 | |
| 650 | 2014-09-18 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 651 | |
| 652 | * dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Use IS_EXECUTABLE. |
| 653 | * dwfl_segment_report_module.c (dwfl_segment_report_module): Set |
| 654 | IS_EXECUTABLE. |
| 655 | * libdwflP.h (struct Dwfl_Module): New field is_executable. |
| 656 | |
| 657 | 2014-08-28 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 658 | |
| 659 | * dwfl_module_getdwarf.c (find_offsets): Add parameter main_bias, use |
| 660 | it. |
| 661 | (find_dynsym): Pass the new parameter main_bias. |
| 662 | |
| 663 | 2014-08-14 Mark Wielaard <mjw@redhat.com> |
| 664 | |
| 665 | * linux-kernel-modules.c (check-suffix): Also TRY .ko.xz. |
| 666 | |
| 667 | 2014-07-24 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 668 | |
| 669 | Fix report_r_debug for prelinked libraries. |
| 670 | * link_map.c (report_r_debug): Comment out variable l_addr. |
| 671 | Use instead new variable base recalculated from l_ld. |
| 672 | |
| 673 | 2014-06-24 Kurt Roeckx <kurt@roeckx.be> |
| 674 | |
| 675 | * linux-pid-attach.c: Make it build on non linux hosts. |
| 676 | |
| 677 | 2014-06-17 Mark Wielaard <mjw@redhat.com> |
| 678 | |
| 679 | * frame_unwind.c (handle_cfi): Use ebl_func_addr_mask. |
| 680 | * dwfl_module_getsym.c (__libdwfl_getsym): Likewise. |
| 681 | |
| 682 | 2014-06-15 Mark Wielaard <mjw@redhat.com> |
| 683 | |
| 684 | * linux-core-attach.c (core_memory_read): Use libdw/memory-access.h |
| 685 | macros read_4ubyte_unaligned_noncvt and read_8ubyte_unaligned_noncvt |
| 686 | to read possibly unaligned data. |
| 687 | (core_next_thread): Likewise. |
| 688 | (core_set_initial_registers): Likewise. |
| 689 | (dwfl_core_file_attach): Likewise. |
| 690 | |
| 691 | 2014-06-11 Mark Wielaard <mjw@redhat.com> |
| 692 | |
| 693 | * dwfl_frame.c (__libdwfl_process_free): Reset dwfl->attacherr. |
| 694 | (dwfl_attach_state): Set dwfl->attacherr. |
| 695 | (dwfl_pid): Check and return dwfl->attacherr if set. |
| 696 | (dwfl_getthreads): Likewise. |
| 697 | (getthread): Likewise. |
| 698 | * libdwflP.h: Add DWFL_E_NO_CORE_FILE. |
| 699 | (struct Dwfl): Add attacherr field. |
| 700 | * linux-core-attach.c (dwfl_core_file_attach): Set dwfl->attacherr. |
| 701 | Don't assert if ELF file is not ET_CORE, just return error. |
| 702 | * linux-pid-attach.c (dwfl_linux_proc_attach): Set dwfl->attacherr. |
| 703 | |
| 704 | 2014-06-10 Mark Wielaard <mjw@redhat.com> |
| 705 | |
| 706 | * argp-std.c (parse_opt): Ignore errors from dwfl_core_file_attach |
| 707 | or dwfl_linux_proc_attach. |
| 708 | |
| 709 | 2014-05-15 Mark Wielaard <mjw@redhat.com> |
| 710 | |
| 711 | * linux-proc-maps.c (grovel_auxv): Close fd on error. |
| 712 | |
| 713 | 2014-05-02 Mark Wielaard <mjw@redhat.com> |
| 714 | |
| 715 | * dwfl_module_getdwarf: Remove ENABLE_DWZ ifdefs so find_debug_altlink |
| 716 | is always called. |
| 717 | |
| 718 | 2014-05-01 Mark Wielaard <mjw@redhat.com> |
| 719 | |
| 720 | * libdwflP.h (struct Dwfl_Module): Add alt, alt_fd and alt_elf fields. |
| 721 | (__libdwfl_open_mod_by_build_id): Renamed __libdwfl_open_by_build_id. |
| 722 | (__libdwfl_open_by_build_id): New declaration that takes an explicit |
| 723 | build-id. |
| 724 | * dwfl_build_id_find_debuginfo.c (dwfl_build_id_find_debuginfo): If |
| 725 | we already have the Dwarf then look for the alt dwz multi file by |
| 726 | build-id. |
| 727 | * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Add the |
| 728 | build-id we are looking for as argument. |
| 729 | (__libdwfl_open_mod_by_build_id): New function, calls |
| 730 | __libdwfl_open_by_build_id. |
| 731 | (dwfl_build_id_find_elf): Call __libdwfl_open_mod_by_build_id. |
| 732 | * dwfl_module.c (__libdwfl_module_free): Release alt, alt_elf and |
| 733 | close alt_fd if necessary. |
| 734 | * dwfl_module_getdwarf.c (__check_build_id): Removed. |
| 735 | (try_debugaltlink): Removed. |
| 736 | (open_debugaltlink): Removed. |
| 737 | (open_elf_file): First half of open_elf that just opens the elf |
| 738 | file but doesn't setup the load address. |
| 739 | (open_elf): Call open_elf_file. |
| 740 | (find_debug_altlink): New function. |
| 741 | (load_dw): Remove loading of dwz multifile. |
| 742 | (find_dw): Call find_debug_altlink. |
| 743 | * find-debuginfo.c (validate): Handle alt debug case using |
| 744 | dwelf_dwarf_gnu_debugaltlink and mod->alt_elf. |
| 745 | (find_debuginfo_in_path): Handle alt debug files possibly in .dwz |
| 746 | subdirs. |
| 747 | * linux-kernel-modules.c (try_kernel_name): Use fakemod.debug.name |
| 748 | to store name to find by dwfl_standard_find_debuginfo instead of |
| 749 | allocating an extra variable on stack. |
| 750 | |
| 751 | 2014-04-30 Mark Wielaard <mjw@redhat.com> |
| 752 | |
| 753 | * dwfl_module_build_id.c (__libdwfl_find_elf_build_id): Moved to |
| 754 | dwelf_elf_gnu_build_id.c. |
| 755 | (__libdwfl_find_build_id): Add assert to make sure mod is never NULL. |
| 756 | * dwfl_segment_report_module.c (dwfl_segment_report_module): Call |
| 757 | dwelf_elf_gnu_build_id directly instead of __libdwfl_find_build_id. |
| 758 | * dwfl_module_getdwarf.c (__check_build_id): Implement using |
| 759 | dwelf_elf_gnu_build_id. |
| 760 | |
| 761 | 2014-04-15 Florian Weimer <fweimer@redhat.com> |
| 762 | |
| 763 | * dwfl_module_getdwarf.c (__check_build_id): Moved from libdw. |
| 764 | (try_debugaltlink): Likewise. |
| 765 | (open_debugaltlink): Likewise. |
| 766 | (load_dw): Locate alternate debug information using |
| 767 | dwelf_dwarf_gnu_debugaltlink and call open_debugaltlink. |
| 768 | |
| 769 | 2014-04-11 Mark Wielaard <mjw@redhat.com> |
| 770 | |
| 771 | * Makefile.am (AM_CPPFLAGS): Add libdwelf. |
| 772 | * libdwflP.h: Include libdwelfP.h. |
| 773 | * dwfl_module_getdwarf.c (find_debuglink): Moved to libdwelf. |
| 774 | (find_debuginfo): Use dwelf_elf_gnu_debuglink. |
| 775 | |
| 776 | 2014-04-22 Mark Wielaard <mjw@redhat.com> |
| 777 | |
| 778 | * frame_unwind.c (__libdwfl_frame_reg_get): Use uint64_t when |
| 779 | checking bits. |
| 780 | (__libdwfl_frame_reg_set): Likewise. |
| 781 | |
| 782 | 2014-04-22 Kurt Roeckx <kurt@roeckx.be> |
| 783 | |
| 784 | * linux-pid-attach.c: Make linux only. |
| 785 | |
| 786 | 2014-03-14 Mark Wielaard <mjw@redhat.com> |
| 787 | |
| 788 | * Makefile.am: Remove !MUDFLAP and MUDFLAP conditions. |
| 789 | Remove libelf and libdw definitions when MUDFLAP is defined. |
| 790 | * argp-std.c (__libdwfl_argp_mudflap_options): Removed. |
| 791 | |
| 792 | 2014-03-03 Mark Wielaard <mjw@redhat.com> |
| 793 | |
| 794 | * elf-from-memory.c (elf_from_remote_memory): Keep track of |
| 795 | segments_end_mem. Pass memsz to first handle_segment pass. Only |
| 796 | extend contents_size and use shdrs if only file bits are in |
| 797 | segment. |
| 798 | |
| 799 | 2014-03-11 Josh Stone <jistone@redhat.com> |
| 800 | |
| 801 | * dwfl_module_getdwarf.c (open_elf): Only explicitly set |
| 802 | mod->e_type when processing the main ELF file. |
| 803 | |
| 804 | 2014-03-04 Mark Wielaard <mjw@redhat.com> |
| 805 | |
| 806 | * libdwflP.h (struct __libdwfl_pid_arg): Moved here and renamed from |
| 807 | linux-pid-attach.c (struct pid_arg). |
| 808 | (__libdwfl_get_pid_arg): New internal function declaration. |
| 809 | (__libdwfl_ptrace_attach): Likewise. |
| 810 | (__libdwfl_ptrace_detach): Likewise. |
| 811 | * dwfl_frame.c (dwfl_attach_state): Add "(deleted)" files to the |
| 812 | special exception modules that cannot be checked at this point. |
| 813 | * linux-pid-attach.c (struct pid_arg): Moved to libdwflP.h |
| 814 | (ptrace_attach): Renamed to... |
| 815 | (__libdwfl_ptrace_attach): New internal function. |
| 816 | (__libdwfl_ptrace_detach): Likewise. Extracted from ... |
| 817 | (pid_thread_detach): Call __libdwfl_ptrace_detach now. |
| 818 | (__libdwfl_get_pid_arg): New internal function. |
| 819 | * linux-proc-maps.c (dwfl_linux_proc_find_elf): Check if special |
| 820 | module name contains "(deleted)" and dwfl_pid gives an attached |
| 821 | pid. If pid is set and try to (re)use ptrace attach state of |
| 822 | process before reading memory. |
| 823 | |
| 824 | 2014-03-03 Mark Wielaard <mjw@redhat.com> |
| 825 | |
| 826 | * elf-from-memory.c (elf_from_remote_memory): Take pagesize as |
| 827 | argument. Free buffer when detecting bad elf. Check PT_LOAD |
| 828 | alignment requirements on first handle_segment pass. Calculate |
| 829 | loadbase, start and end of segment using pagesize, not p_align. |
| 830 | * linux-proc-maps.c (dwfl_linux_proc_find_elf): Provide pagesize |
| 831 | to elf_from_remote_memory. |
| 832 | |
| 833 | 2014-02-26 Mark Wielaard <mjw@redhat.com> |
| 834 | |
| 835 | * linux-proc-maps.c (proc_maps_report): Don't assert on bad input. |
| 836 | |
| 837 | 2014-02-26 Mark Wielaard <mjw@redhat.com> |
| 838 | |
| 839 | * elf-from-memory.c (elf_from_remote_memory): Check against p64 |
| 840 | p_type in case ELFCLASS64, not against p32 p_type. |
| 841 | |
| 842 | 2014-01-17 Petr Machata <pmachata@redhat.com> |
| 843 | |
| 844 | * relocate.c (relocate_section): Use gelf_fsize instead of relying |
| 845 | on shdr->sh_entsize. |
| 846 | |
| 847 | 2014-01-05 Mark Wielaard <mjw@redhat.com> |
| 848 | |
| 849 | * frame_unwind.c (handle_cfi): Only skip resetting return register |
| 850 | if the regno is not the actual CIE return address register. |
| 851 | |
| 852 | 2014-01-02 Mark Wielaard <mjw@redhat.com> |
| 853 | |
| 854 | * linux-pid-attach.c (dwfl_linux_proc_attach): Use strtol, not atoi. |
| 855 | |
| 856 | 2013-12-30 Mark Wielaard <mjw@redhat.com> |
| 857 | |
| 858 | * argp-std.c (parse_opt): Call dwfl_linux_proc_attach and |
| 859 | dwfl_core_file_attach explicitly. |
| 860 | * core-file.c (dwfl_core_file_report): Don't call |
| 861 | __libdwfl_attach_state_for_core implicitly. |
| 862 | * dwfl_begin.c (dwfl_begin): Remove setting of process_attach_error. |
| 863 | * dwfl_frame.c (dwfl_pid): Set errno to DWFL_E_NO_ATTACH_STATE, not |
| 864 | process_attach_error. |
| 865 | (dwfl_getthreads): Likewise. |
| 866 | (getthread): Likewise. |
| 867 | * libdwfl.h (dwfl_core_file_report): Update documentation. |
| 868 | (dwfl_linux_proc_report): Likewise. |
| 869 | (dwfl_core_file_attach): New function declaration. |
| 870 | (dwfl_linux_proc_attach): Likewise. |
| 871 | * libdwflP.h (struct Dwfl): Remove process_attach_error. |
| 872 | (__libdwfl_attach_state_for_pid): Removed declaration. |
| 873 | (__libdwfl_attach_state_for_core): Likewise. |
| 874 | (dwfl_core_file_attach): New internal declaration. |
| 875 | (dwfl_linux_proc_attach): Likewise. |
| 876 | (attach_state_for_core): Renamed to... |
| 877 | (dwfl_core_file_attach): ...this. Change return type. |
| 878 | (__libdwfl_attach_state_for_core): Removed. |
| 879 | * linux-pid-attach.c (struct pid_arg): Add assume_ptrace_stopped. |
| 880 | (pid_set_initial_registers): Check assume_ptrace_stopped before |
| 881 | calling ptrace. |
| 882 | (pid_thread_detach): Likewise. |
| 883 | (__libdwfl_attach_state_for_pid): Renamed to... |
| 884 | (dwfl_linux_proc_attach): ...this. Adjust return type. |
| 885 | * linux-proc-maps.c (dwfl_linux_proc_report): Don't call |
| 886 | __libdwfl_attach_state_for_pid implicitly. |
| 887 | |
| 888 | 2013-12-28 Mark Wielaard <mjw@redhat.com> |
| 889 | |
| 890 | * linux-proc-maps.c (dwfl_linux_proc_find_elf): Don't return special |
| 891 | character device files, only regular files. |
| 892 | |
| 893 | 2013-12-24 Mark Wielaard <mjw@redhat.com> |
| 894 | |
| 895 | * linux-core-attach.c (core_next_thread): Check whether thread_argp |
| 896 | is NULL. Reset core_arg->thread_note_offset and malloc a thread_arg |
| 897 | in that case. Free thread_arg if there are no more threads. |
| 898 | |
| 899 | 2013-12-23 Mark Wielaard <mjw@redhat.com> |
| 900 | |
| 901 | * dwfl_segment_report_module.c (dwfl_segment_report_module): Free |
| 902 | build_id before returning early. |
| 903 | |
| 904 | 2013-12-23 Mark Wielaard <mjw@redhat.com> |
| 905 | |
| 906 | * linux-pid-attach.c (__libdwfl_attach_state_for_pid): Report actual |
| 907 | pid (thread group leader) to dwfl_attach_state. |
| 908 | |
| 909 | 2013-12-21 Mark Wielaard <mjw@redhat.com> |
| 910 | |
| 911 | * frame_unwind.c (handle_cfi): Track whether the return register |
| 912 | has been set and only allow it to be set once. |
| 913 | |
| 914 | 2013-12-20 Mark Wielaard <mjw@redhat.com> |
| 915 | |
| 916 | * dwfl_frame.c (one_arg): New struct. |
| 917 | (get_one_thread_cb): New function. |
| 918 | (dwfl_getthread): Likewise. |
| 919 | (one_thread): New struct. |
| 920 | (get_one_thread_frames_cb): New function. |
| 921 | (dwfl_getthread_frames): Likewise. |
| 922 | * libdwfl.h (Dwfl_Thread_Callbacks): Add get_thread function. |
| 923 | (dwfl_getthread_frames): Likewise. |
| 924 | * libdwflP.h (dwfl_getthread_frames): New internal function declaration. |
| 925 | * linux-core-attach.c (core_thread_callbacks): Initialize get_thread |
| 926 | to NULL. |
| 927 | * linux-pid-attach.c (pid_getthread): New function. |
| 928 | (pid_thread_callbacks): Initialize get_thread to pid_getthread. |
| 929 | |
| 930 | 2013-12-20 Mark Wielaard <mjw@redhat.com> |
| 931 | |
| 932 | * linux-kernel-modules.c (report_kernel_archive): Correct nested |
| 933 | asprintf result check for debug.a. |
| 934 | |
| 935 | 2013-12-18 Mark Wielaard <mjw@redhat.com> |
| 936 | |
| 937 | * derelocate.c (__libdwfl_find_section_ndx): New internal function. |
| 938 | * dwfl_module_addrname.c (dwfl_module_addrname): Use |
| 939 | dwfl_module_addrinfo. |
| 940 | * dwfl_module_addrsym.c (dwfl_module_addrsym_elf): Replace with... |
| 941 | (__libdwfl_addrsym): ...this. Use __libdwfl_getsym, use value |
| 942 | for comparisons, not st_value. Fill in off. Search for both value |
| 943 | and the (adjusted) sym.st_value when different. |
| 944 | (dwfl_module_addrsym): Implement using __libdwfl_addrsym. |
| 945 | (dwfl_module_addrinfo): New function. |
| 946 | * dwfl_module_getsym.c (dwfl_module_getsym_elf): Replace with... |
| 947 | (__libdwfl_getsym): ...this. Use ebl_resolve_sym_value if requested |
| 948 | and possible. Adjust sym->st_value only when requested. Fill in addr |
| 949 | if available. |
| 950 | (dwfl_module_getsym_info): New function. |
| 951 | (dwfl_module_getsym): Use __libdwfl_getsym. |
| 952 | * libdwfl.h (dwfl_module_getsym_elf): Removed. |
| 953 | (dwfl_module_getsym_info): New function declaration. |
| 954 | (dwfl_module_addrinfo): Likewise. |
| 955 | (dwfl_module_addrsym): Add documentation describing differences |
| 956 | with addrinfo variants. |
| 957 | (dwfl_module_addrsym_elf): Removed. |
| 958 | * libdwflP.h (__libdwfl_getsym): New internal function declaration. |
| 959 | (__libdwfl_addrsym): Likewise. |
| 960 | (__libdwfl_find_section_ndx): Likewise. |
| 961 | (dwfl_module_addrinfo): New internal declaration. |
| 962 | (dwfl_module_getsym_info): Likewise. |
| 963 | (dwfl_module_addrsym_elf): Removed. |
| 964 | (dwfl_module_getsym_elf): Likewise. |
| 965 | |
| 966 | 2013-12-18 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 967 | |
| 968 | * argp-std.c (offline_find_elf): Remove. |
| 969 | (offline_callbacks): Use dwfl_build_id_find_elf instead. |
| 970 | * dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Move here the code |
| 971 | removed above. |
| 972 | |
| 973 | 2013-12-18 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 974 | |
| 975 | unwinder: s390 and s390x |
| 976 | * dwfl_frame_pc.c (dwfl_frame_pc): Call ebl_normalize_pc. |
| 977 | * frame_unwind.c (new_unwound): New function from ... |
| 978 | (handle_cfi): ... here. Call it. |
| 979 | (setfunc, getfunc, readfunc): New functions. |
| 980 | (__libdwfl_frame_unwind): Call ebl_unwind with those functions. |
| 981 | * linux-core-attach.c (core_set_initial_registers): Always iterate |
| 982 | through the Ebl_Register_Location loop. Call |
| 983 | dwfl_thread_state_register_pc there. |
| 984 | |
| 985 | 2013-12-17 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 986 | |
| 987 | * frame_unwind.c (handle_cfi): Call ebl_dwarf_to_regno for RA. |
| 988 | |
| 989 | 2013-12-17 Mark Wielaard <mjw@redhat.com> |
| 990 | |
| 991 | * linux-pid-attach.c (pid_next_thread): Call rewinddir on first |
| 992 | traversal. |
| 993 | |
| 994 | 2013-12-16 Mark Wielaard <mjw@redhat.com> |
| 995 | |
| 996 | * libdwfl.h (dwfl_module_getsymtab_first_global): New function |
| 997 | definition. |
| 998 | * dwfl_module_getdwarf.c (dwfl_module_getsymtab_first_global): New |
| 999 | function. |
| 1000 | * libdwflP.h (dwfl_module_getsymtab_first_global): New internal |
| 1001 | function definition. |
| 1002 | * dwfl_module_addrsym.c (dwfl_module_addrsym_elf): Use new function. |
| 1003 | |
| 1004 | 2013-12-14 Mark Wielaard <mjw@redhat.com> |
| 1005 | |
| 1006 | * dwfl_module.c (__libdwfl_module_free): Free mod->reloc_info if |
| 1007 | allocated. Call dwarf_cfi_end on mod->eh_cfi if necessary. |
| 1008 | * frame_unwind.c (handle_cfi): Free frame result from |
| 1009 | dwarf_cfi_addrframe when done. |
| 1010 | |
| 1011 | 2013-12-15 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1012 | |
| 1013 | unwinder: ppc and ppc64 |
| 1014 | * frame_unwind.c (__libdwfl_frame_reg_get, __libdwfl_frame_reg_set): |
| 1015 | Call ebl_dwarf_to_regno. |
| 1016 | * linux-core-attach.c (core_set_initial_registers): Implement |
| 1017 | pc_register support. |
| 1018 | * linux-pid-attach.c (pid_thread_state_registers_cb): Implement |
| 1019 | FIRSTREG -1. |
| 1020 | |
| 1021 | 2013-11-30 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1022 | |
| 1023 | Introduce process_attach_error. |
| 1024 | * dwfl_begin.c (dwfl_begin): Initialize process_attach_error. |
| 1025 | * dwfl_frame.c (dwfl_pid, dwfl_getthreads): Use PROCESS_ATTACH_ERROR if |
| 1026 | PROCESS is NULL. |
| 1027 | * libdwflP.h (struct Dwfl): New field process_attach_error. |
| 1028 | * linux-core-attach.c (__libdwfl_attach_state_for_core): Rename to ... |
| 1029 | (attach_state_for_core): ... here, make it static, change return type, |
| 1030 | no longer use __libdwfl_seterrno. |
| 1031 | (__libdwfl_attach_state_for_core): New wrapper for it. |
| 1032 | |
| 1033 | 2013-11-27 Mark Wielaard <mjw@redhat.com> |
| 1034 | |
| 1035 | * dwfl_module_addrsym.c (dwfl_module_addrsym): Rename to and call... |
| 1036 | (dwfl_module_addrsym_elf): this. Add elfp and biasp arguments, |
| 1037 | keep track of symelf, addr_symelf, closest_elf and sizeless_elf |
| 1038 | instead of tracking dwfl_files. |
| 1039 | * dwfl_module_getsym.c (__libdwfl_module_getsym): Renamed to... |
| 1040 | (dwfl_module_getsym_elf): ...this. Remove dwfl_file argument, add |
| 1041 | new elfp and biasp arguments. Track elf instead of file. |
| 1042 | (dwfl_module_getsym): Call dwfl_module_getsym_elf. |
| 1043 | dwfl_module_info.c (dwfl_module_info): Pass elf to |
| 1044 | dwfl_adjusted_st_value. |
| 1045 | * libdwfl.h (dwfl_module_getsym): Document limitations of shndx. |
| 1046 | (dwfl_module_getsym_elf): New function declaration. |
| 1047 | (dwfl_module_addrsym_elf): Likewise. |
| 1048 | * libdwflP.h (dwfl_module_addrsym_elf): INTDECL. |
| 1049 | (dwfl_module_getsym_elf): Likewise. |
| 1050 | (dwfl_adjusted_st_value): Take and check elf not dwfl_file. |
| 1051 | (dwfl_deadjust_st_value): Likewise. |
| 1052 | (__libdwfl_module_getsym): Removed. |
| 1053 | * relocate.c (resolve_symbol): Pass elf to dwfl_adjusted_st_value. |
| 1054 | |
| 1055 | 2013-11-21 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1056 | |
| 1057 | Fix non-build-id core files on build-id system. |
| 1058 | * link_map.c (report_r_debug): Remove valid clearing if build-id cannot |
| 1059 | be read from memory. |
| 1060 | |
| 1061 | 2013-11-21 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1062 | |
| 1063 | * dwfl_segment_report_module.c (dwfl_segment_report_module): New |
| 1064 | variable close_elf. Call __libdwfl_find_elf_build_id and compare the |
| 1065 | content, if possible. |
| 1066 | |
| 1067 | 2013-11-21 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1068 | |
| 1069 | link_map: Use proper bias, not l_addr. |
| 1070 | * core-file.c (dynamic_vaddr_get): Rename to ... |
| 1071 | (__libdwfl_dynamic_vaddr_get): ... here, make it global, |
| 1072 | internal_function. |
| 1073 | (dwfl_core_file_report): Update name in the caller. |
| 1074 | * libdwflP.h (__libdwfl_dynamic_vaddr_get): New declaration. |
| 1075 | * link_map.c (report_r_debug): New variable elf_dynamic_vaddr. Call |
| 1076 | __libdwfl_dynamic_vaddr_get for it. Remove L_ADDR FIXME comment. |
| 1077 | Use ELF_DYNAMIC_VADDR instead of L_ADDR. |
| 1078 | |
| 1079 | 2013-11-19 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1080 | |
| 1081 | Compatibility with older kernels such as RHEL-6. |
| 1082 | * linux-pid-attach.c (struct pid_arg): New field tid_was_stopped. |
| 1083 | (ptrace_attach): New parameter tid_was_stoppedp. Set it. |
| 1084 | (pid_set_initial_registers): Pass tid_was_stopped. |
| 1085 | (pid_thread_detach): Use tid_was_stopped. |
| 1086 | |
| 1087 | 2013-11-18 Josh Stone <jistone@redhat.com> |
| 1088 | |
| 1089 | * dwfl_module_getdwarf.c (find_aux_address_sync): New function. |
| 1090 | (find_aux_sym): Use it. |
| 1091 | |
| 1092 | 2013-11-14 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1093 | |
| 1094 | Code cleanup: Remove const in prototype |
| 1095 | * dwfl_frame_regs.c (dwfl_thread_state_registers): Remove const from |
| 1096 | firstreg. |
| 1097 | * libdwfl.h (dwfl_thread_state_registers): Likewise. |
| 1098 | * linux-pid-attach.c (pid_thread_state_registers_cb): Likewise. |
| 1099 | |
| 1100 | 2013-11-14 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1101 | |
| 1102 | Fix dwfl_attach_state machine->elf. |
| 1103 | * dwfl_frame.c (dwfl_attach_state): Change parameter machine to elf. |
| 1104 | Call ebl_openbackend instead of ebl_openbackend_machine. |
| 1105 | * libdwfl.h (dwfl_attach_state): Change parameter machine to elf. |
| 1106 | Update the function description. |
| 1107 | * linux-core-attach.c (__libdwfl_attach_state_for_core): Pass CORE to |
| 1108 | dwfl_attach_state. |
| 1109 | * linux-pid-attach.c (__libdwfl_attach_state_for_pid): Pass NULL to |
| 1110 | dwfl_attach_state. |
| 1111 | |
| 1112 | 2013-11-06 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1113 | |
| 1114 | Provide __libdwfl_module_getsym to get dwfl_file *. |
| 1115 | * dwfl_module_addrsym.c (dwfl_module_addrsym) (i_to_symfile): Remove. |
| 1116 | (dwfl_module_addrsym) (search_table): New variable file. Use |
| 1117 | __libdwfl_module_getsym. Use file. |
| 1118 | * dwfl_module_getsym.c (dwfl_module_getsym): Rename to ... |
| 1119 | (__libdwfl_module_getsym): ... here. Add parameter filep. Set it. |
| 1120 | (dwfl_module_getsym): New wrapper. |
| 1121 | * libdwflP.h (__libdwfl_module_getsym): New declaration. |
| 1122 | |
| 1123 | 2013-11-13 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1124 | |
| 1125 | Fix dwfl_module_addrsym for minidebuginfo. |
| 1126 | * dwfl_module_addrsym.c (dwfl_module_addrsym): New variable |
| 1127 | addr_symfile. |
| 1128 | (dwfl_module_addrsym) (same_section): Use it. |
| 1129 | (dwfl_module_addrsym) (i_to_symfile): New function. |
| 1130 | (dwfl_module_addrsym) (search_table): Use it. |
| 1131 | |
| 1132 | 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1133 | Mark Wielaard <mjw@redhat.com> |
| 1134 | |
| 1135 | * Makefile.am (libdwfl_a_SOURCES): Add dwfl_frame.c, frame_unwind.c, |
| 1136 | dwfl_frame_pc.c, linux-pid-attach.c, linux-core-attach.c and |
| 1137 | dwfl_frame_regs.c. |
| 1138 | * core-file.c (dwfl_core_file_report): Call |
| 1139 | __libdwfl_attach_state_for_core. |
| 1140 | * dwfl_end.c (dwfl_end): Call __libdwfl_process_free. |
| 1141 | * dwfl_frame.c: New file. |
| 1142 | * frame_unwind.c: New file. |
| 1143 | * dwfl_frame_pc.c: New file. |
| 1144 | * linux-pid-attach.c: New file. |
| 1145 | * linux-core-attach.c: New file. |
| 1146 | * dwfl_frame_regs.c: New file. |
| 1147 | * libdwfl.h (Dwfl_Thread, Dwfl_Frame): New typedefs. |
| 1148 | (dwfl_core_file_report, dwfl_linux_proc_report): Extend comments. |
| 1149 | (Dwfl_Thread_Callbacks): New definition. |
| 1150 | (struct ebl, dwfl_attach_state, dwfl_pid, dwfl_thread_dwfl) |
| 1151 | (dwfl_thread_tid, dwfl_frame_thread, dwfl_thread_state_registers) |
| 1152 | (dwfl_thread_state_register_pc, dwfl_getthreads, dwfl_thread_getframes) |
| 1153 | (dwfl_frame_pc): New declarations. |
| 1154 | * libdwflP.h (Dwfl_Process): New typedef. |
| 1155 | (LIBEBL_BAD, CORE_MISSING, INVALID_REGISTER, PROCESS_MEMORY_READ) |
| 1156 | (PROCESS_NO_ARCH, PARSE_PROC, INVALID_DWARF, UNSUPPORTED_DWARF) |
| 1157 | (NEXT_THREAD_FAIL, ATTACH_STATE_CONFLICT, NO_ATTACH_STATE, NO_UNWIND) |
| 1158 | (INVALID_ARGUMENT): New DWFL_ERROR entries. |
| 1159 | (struct Dwfl): New entry process. |
| 1160 | (struct Dwfl_Process, struct Dwfl_Thread, struct Dwfl_Frame) |
| 1161 | (__libdwfl_frame_reg_get, __libdwfl_frame_reg_set) |
| 1162 | (__libdwfl_process_free, __libdwfl_frame_unwind) |
| 1163 | (__libdwfl_attach_state_for_pid, __libdwfl_attach_state_for_core) |
| 1164 | (__libdwfl_segment_start, __libdwfl_segment_end): New declarations. |
| 1165 | (dwfl_attach_state, dwfl_pid, dwfl_thread_dwfl, dwfl_thread_tid) |
| 1166 | (dwfl_frame_thread, dwfl_thread_state_registers) |
| 1167 | (dwfl_thread_state_register_pc, dwfl_getthreads, dwfl_thread_getframes) |
| 1168 | (dwfl_frame_pc): New INTDECL entries. |
| 1169 | * linux-proc-maps.c (dwfl_linux_proc_report): Call |
| 1170 | __libdwfl_attach_state_for_pid. |
| 1171 | * segment.c (segment_start): Rename to ... |
| 1172 | (__libdwfl_segment_start): ... here and make it internal_function. |
| 1173 | (segment_end): Rename to ... |
| 1174 | (__libdwfl_segment_end): ... here and make it internal_function. |
| 1175 | (reify_segments, dwfl_report_segment): Rename them at the callers. |
| 1176 | |
| 1177 | 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1178 | |
| 1179 | * core-file.c (dwfl_core_file_report): Remove the use of MAX. |
| 1180 | |
| 1181 | 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1182 | |
| 1183 | * core-file.c (dwfl_core_file_report): Replaced variable sniffed by |
| 1184 | retval. Fix one forgotten LISTED increase. |
| 1185 | |
| 1186 | 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1187 | |
| 1188 | Fix core files for re-prelink-ed files. |
| 1189 | * core-file.c (dynamic_vaddr_get): New function. |
| 1190 | (dwfl_core_file_report): New variable file_dynamic_vaddr. Call |
| 1191 | dynamic_vaddr_get instead of using L_ADDR. |
| 1192 | * libdwflP.h (struct r_debug_info_module): Remove field l_addr. |
| 1193 | * link_map.c (report_r_debug): Do not initialize l_addr. |
| 1194 | |
| 1195 | 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1196 | |
| 1197 | Code cleanup. |
| 1198 | * core-file.c (dwfl_core_file_report): Reindent block of code by |
| 1199 | continue keyword. |
| 1200 | |
| 1201 | 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1202 | |
| 1203 | * argp-std.c (parse_opt): Use executable parameter of |
| 1204 | dwfl_core_file_report. |
| 1205 | * core-file.c (dwfl_core_file_report): Add parameter executable. Set |
| 1206 | it to DWFL. Add NEW_VERSION for it. |
| 1207 | (_compat_without_executable_dwfl_core_file_report): New. Twice. |
| 1208 | * libdwfl.h (dwfl_core_file_report): Add parameter executable, update |
| 1209 | the function comment. |
| 1210 | |
| 1211 | 2013-10-15 Mark Wielaard <mjw@redhat.com> |
| 1212 | |
| 1213 | * linux-proc-maps.c (proc_maps_report): Ignore non-absolute file |
| 1214 | mappings. |
| 1215 | (dwfl_linux_proc_find_elf): Don't abort, just return failure. |
| 1216 | |
| 1217 | 2013-09-12 Mark Wielaard <mjw@redhat.com> |
| 1218 | |
| 1219 | * cu.c (intern_cu): If dwarf_offdie fails free cu. |
| 1220 | |
| 1221 | 2013-09-12 Mark Wielaard <mjw@redhat.com> |
| 1222 | |
| 1223 | * linux-proc-maps.c (proc_maps_report): Don't fclose FILE in |
| 1224 | bad_report. |
| 1225 | |
| 1226 | 2013-09-12 Mark Wielaard <mjw@redhat.com> |
| 1227 | |
| 1228 | * dwfl_module_getdwarf.c (find_symtab): Call elf_getdata with |
| 1229 | aux_xndxscn, not xndxscn, for aux_symxndxdata. |
| 1230 | |
| 1231 | 2013-08-25 Mark Wielaard <mjw@redhat.com> |
| 1232 | |
| 1233 | * linux-kernel-modules.c (report_kernel): Pass add_p_vaddr as true |
| 1234 | to dwfl_report_elf. |
| 1235 | |
| 1236 | 2013-07-25 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1237 | |
| 1238 | * dwfl_segment_report_module.c (dwfl_segment_report_module): Check for |
| 1239 | conflicts all the modules, not just the first one. Compare L_LD if it |
| 1240 | is equal, not if it is in a module address range. |
| 1241 | |
| 1242 | 2013-07-23 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1243 | |
| 1244 | * libdwflP.h (__libdwfl_elf_address_range): Add internal_function. |
| 1245 | |
| 1246 | 2013-07-23 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1247 | |
| 1248 | * core-file.c (clear_r_debug_info): Close also ELF and FD. |
| 1249 | (dwfl_core_file_report): Call __libdwfl_report_elf for |
| 1250 | R_DEBUG_INFO.MODULE. |
| 1251 | * dwfl_report_elf.c (__libdwfl_elf_address_range): New function from |
| 1252 | code of ... |
| 1253 | (__libdwfl_report_elf): ... this function. Call it. |
| 1254 | * dwfl_segment_report_module.c: Include unistd.h. |
| 1255 | (dwfl_segment_report_module): Use basename for MODULE->NAME. |
| 1256 | Clear MODULE if it has no build-id and we have segment with build-id. |
| 1257 | Ignore this segment only if MODULE still contains valid ELF. |
| 1258 | * libdwflP.h (__libdwfl_elf_address_range): New declaration. |
| 1259 | (struct r_debug_info_module): New fields fd, elf, l_addr, start, end |
| 1260 | and disk_file_has_build_id. |
| 1261 | (dwfl_link_map_report): Extend the comment. |
| 1262 | * link_map.c (report_r_debug): Extend the comment. Always fill in new |
| 1263 | r_debug_info_module. Initialize also the new r_debug_info_module |
| 1264 | fields. Remove one FIXME comment. Call __libdwfl_elf_address_range |
| 1265 | instead of __libdwfl_report_elf when R_DEBUG_INFO is not NULL. |
| 1266 | |
| 1267 | 2013-07-19 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1268 | |
| 1269 | * libdwflP.h (__libdwfl_find_elf_build_id): Add internal_function. |
| 1270 | |
| 1271 | 2013-07-02 Mark Wielaard <mjw@redhat.com> |
| 1272 | |
| 1273 | * relocate.c (__libdwfl_relocate_value): Remove mod->e_type assert. |
| 1274 | |
| 1275 | 2013-06-05 Mark Wielaard <mjw@redhat.com> |
| 1276 | |
| 1277 | * link_map.c (report_r_debug): Always call release_buffer after |
| 1278 | memory_callback succeeded reading build_id. |
| 1279 | |
| 1280 | 2013-05-30 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1281 | |
| 1282 | * argp-std.c (parse_opt) <ARGP_KEY_SUCCESS> <opt->core> <opt->e>: Set |
| 1283 | executable_for_core before calling dwfl_core_file_report. |
| 1284 | * core-file.c (clear_r_debug_info): New function. |
| 1285 | (dwfl_core_file_report): Move raw segments reporting lower. New |
| 1286 | variable r_debug_info, pass it to dwfl_segment_report_module. Call |
| 1287 | clear_r_debug_info in the end. Return sum of LISTED and SNIFFED. |
| 1288 | * dwfl_module_build_id.c (check_notes): Move into |
| 1289 | __libdwfl_find_elf_build_id. |
| 1290 | (__libdwfl_find_build_id): Rename to ... |
| 1291 | (__libdwfl_find_elf_build_id): ... here. Add parameters build_id_bits, |
| 1292 | build_id_elfaddr and build_id_len. Verify MOD vs. ELF. |
| 1293 | (__libdwfl_find_elf_build_id) (check_notes): Remove parameters mod and |
| 1294 | set, rename data_vaddr to data_elfaddr. Do not call found_build_id. |
| 1295 | (__libdwfl_find_elf_build_id): Update the check_notes caller, do not |
| 1296 | adjust its data_elfaddr parameter. |
| 1297 | (__libdwfl_find_build_id): New wrapper of __libdwfl_find_elf_build_id. |
| 1298 | * dwfl_segment_report_module.c (dwfl_segment_report_module): New |
| 1299 | parameter r_debug_info. New variable name_is_final. Adjust addresses |
| 1300 | according to R_DEBUG_INFO->MODULE. Check conflicts against DWFL. |
| 1301 | Do not overwrite NAME by SONAME if NAME_IS_FINAL. |
| 1302 | * libdwflP.h (__libdwfl_find_elf_build_id): New declaration. |
| 1303 | (struct r_debug_info_module, struct r_debug_info): New definitions. |
| 1304 | (dwfl_segment_report_module, dwfl_link_map_report): Add parameter |
| 1305 | r_debug_info. |
| 1306 | * link_map.c: Include fcntl.h. |
| 1307 | (report_r_debug): Add parameter r_debug_info, describe it in the |
| 1308 | function comment. Delete dwfl_addrmodule call and its dependent code. |
| 1309 | Verify build-id before calling dwfl_report_elf, also supply |
| 1310 | executable_for_core to it. Store r_debug_info->module info when |
| 1311 | appropriate. |
| 1312 | (dwfl_link_map_report): Add parameter r_debug_info. New variable |
| 1313 | in_ok. Try to read IN from EXECUTABLE_FOR_CORE. Update report_r_debug |
| 1314 | caller parameters. |
| 1315 | |
| 1316 | 2013-04-30 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1317 | |
| 1318 | * dwfl_report_elf.c (__libdwfl_report_elf): Add parameter add_p_vaddr. |
| 1319 | Set it to true for ET_EXEC and ET_CORE. Provide alternative |
| 1320 | setup of START and BIAS if !ADD_P_VADDR. Set END from BIAS, not BASE. |
| 1321 | (dwfl_report_elf): Add parameter add_p_vaddr. Pass it down. Add |
| 1322 | NEW_VERSION. |
| 1323 | (_compat_without_add_p_vaddr_dwfl_report_elf) <SHARED>: New, with |
| 1324 | COMPAT_VERSION. |
| 1325 | * libdwfl.h (dwfl_report_elf): Add parameter add_p_vaddr. Describe it. |
| 1326 | * libdwflP.h (__libdwfl_report_elf): Add parameter add_p_vaddr. |
| 1327 | * link_map.c (report_r_debug): Use true add_p_vaddr for dwfl_report_elf. |
| 1328 | * linux-kernel-modules.c (report_kernel): Use false add_p_vaddr for |
| 1329 | dwfl_report_elf. |
| 1330 | * offline.c (process_elf): Use true add_p_vaddr for dwfl_report_elf. |
| 1331 | |
| 1332 | 2013-04-27 Mark Wielaard <mjw@redhat.com> |
| 1333 | |
| 1334 | * link_map.c: #include system.h. |
| 1335 | |
| 1336 | 2013-04-26 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1337 | |
| 1338 | * link_map.c (BE32, BE64, LE32, LE64): Delete the definitions, move |
| 1339 | them to lib/system.h. |
| 1340 | |
| 1341 | 2013-04-24 Mark Wielaard <mjw@redhat.com> |
| 1342 | |
| 1343 | * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. |
| 1344 | |
| 1345 | 2013-03-20 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1346 | |
| 1347 | * dwfl_report_elf.c (__libdwfl_report_elf): Remove BASE aligning. |
| 1348 | |
| 1349 | 2013-03-12 Mark Wielaard <mjw@redhat.com> |
| 1350 | |
| 1351 | * dwfl_getsrclines.c (dwfl_getsrclines): Return 0 on success. |
| 1352 | |
| 1353 | 2013-02-22 Mark Wielaard <mjw@redhat.com> |
| 1354 | |
| 1355 | * open.c (__libdw_gunzip,__libdw_bunzip2,__libdw_unlzma): Define |
| 1356 | as DWFL_E_BADELF when not used. |
| 1357 | |
| 1358 | 2013-02-10 Mark Wielaard <mjw@redhat.com> |
| 1359 | |
| 1360 | * argp-std.c (parse_opt): Use opt->core and opt->e explicitly in |
| 1361 | failure messages When handling ARGP_KEY_SUCCESS because arg will |
| 1362 | not have been set. |
| 1363 | |
| 1364 | 2013-01-30 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1365 | |
| 1366 | * linux-proc-maps.c: Include system.h. |
| 1367 | (PROCEXEFMT, get_pid_class): New. |
| 1368 | (grovel_auxv): Detect 32-bit vs. 64-bit auxv, possibly call |
| 1369 | get_pid_class. |
| 1370 | |
| 1371 | 2013-01-23 Mark Wielaard <mjw@redhat.com> |
| 1372 | |
| 1373 | * dwfl_module_getdwarf.c (find_aux_sym): Don't substract one |
| 1374 | from aux_syments by default. |
| 1375 | (find_symtab): Also succeed when only aux_symdata is found. |
| 1376 | When no symtab is found always try to load auxiliary table. |
| 1377 | (dwfl_module_getsymtab): Substract one from result when both |
| 1378 | tables have symbols. |
| 1379 | * dwfl_module_getsym.c (dwfl_module_getsym): Only skip auxiliary |
| 1380 | zero entry when both tables have symbols. |
| 1381 | * dwfl_module_addrsym.c (dwfl_module_addrsym): Only substract |
| 1382 | one from first_global when both tables have symbols. |
| 1383 | |
| 1384 | 2013-01-16 Mark Wielaard <mjw@redhat.com> |
| 1385 | |
| 1386 | * libdwflP.h (struct Dwfl_Module): Add aux_sym, aux_symdata, |
| 1387 | aux_syments, aux_symstrdata, aux_symxndxdata and aux_first_global. |
| 1388 | (dwfl_adjusted_aux_sym_addr): New function. |
| 1389 | (dwfl_deadjust_aux_sym_addr): Likewise. |
| 1390 | (dwfl_adjusted_st_value): Take and check symfile argument. |
| 1391 | (dwfl_deadjust_st_value): Likewise. |
| 1392 | * dwfl_module_getdwarf.c (find_prelink_address_sync): Take and |
| 1393 | use dwfl_file as argument to set address_sync. |
| 1394 | (find_debuginfo): Call find_prelink_address_sync with debug file. |
| 1395 | (find_aux_sym): New function. |
| 1396 | (find_symtab): Use find_aux_sym if all we have is the dynsym table |
| 1397 | and fill in aux DwflModule fields. |
| 1398 | (dwfl_module_getsymtab): Return syments plus aux_syments. |
| 1399 | (load_symtab): Always set first_global. |
| 1400 | * dwfl_module_addrsym.c (dwfl_module_addrsym): Check symfile |
| 1401 | when using same_section. Calculate first_global based on both |
| 1402 | mod->first_global and mod->aux_first_global. |
| 1403 | * dwfl_module.c (__libdwfl_module_free): Free aux_sym. |
| 1404 | * dwfl_module_getsym.c (dwfl_module_getsym): Use auxsym table |
| 1405 | to retrieve symbol and name if necessary, making sure all locals |
| 1406 | from any table come before any globals. |
| 1407 | * dwfl_module_info.c (dwfl_module_info): Call dwfl_adjusted_st_value |
| 1408 | with symfile. |
| 1409 | * relocate.c (resolve_symbol): Likewise. |
| 1410 | |
| 1411 | 2013-01-07 Roland McGrath <roland@hack.frob.com> |
| 1412 | |
| 1413 | * link_map.c (auxv_format_probe): Handle unaligned 64-bit data, but |
| 1414 | still assume the data is at least 32-bit aligned anyway. |
| 1415 | (dwfl_link_map_report): Handle unaligned auxv data. |
| 1416 | |
| 1417 | 2012-12-11 Mark Wielaard <mjw@redhat.com> |
| 1418 | |
| 1419 | * linux-kernel-modules.c (report_kernel): Only free fname if |
| 1420 | find_kernel_elf succeeds and allocates it. |
| 1421 | (report_kernel_archive): Fix brackets around unlikely expression. |
| 1422 | |
| 1423 | 2012-11-29 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1424 | |
| 1425 | * argp-std.c: Update Copyright year. |
| 1426 | (offline_find_elf): New function. |
| 1427 | (offline_callbacks): Use it for find_elf. |
| 1428 | (struct parse_opt): New. |
| 1429 | (parse_opt): New key ARGP_KEY_INIT. In other make hook struct |
| 1430 | parse_opt pointer from former Dwfl pointer. Delay 'e and OPT_COREFILE |
| 1431 | processing till ARGP_KEY_SUCCESS. Initialize state->input already from |
| 1432 | ARGP_KEY_SUCCESS. Modify the cleanup in ARGP_KEY_ERROR. Make the |
| 1433 | final state->input initialization optional. |
| 1434 | * dwfl_end.c: Update Copyright year. |
| 1435 | (dwfl_end): Free executable_for_core. |
| 1436 | * libdwflP.h: Update Copyright year. |
| 1437 | (struct Dwfl): New field executable_for_core. |
| 1438 | |
| 1439 | 2012-11-20 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1440 | |
| 1441 | * dwfl_report_elf.c (__libdwfl_report_elf): Simplify START and BIAS |
| 1442 | calculation. |
| 1443 | |
| 1444 | 2012-10-17 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1445 | |
| 1446 | * dwfl_module_getdwarf.c (mod_verify_build_id): New function with code |
| 1447 | from ... |
| 1448 | (__libdwfl_getelf): ... here. Call it. |
| 1449 | |
| 1450 | 2012-10-17 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1451 | |
| 1452 | * libdwfl.h (dwfl_module_getelf): Add __nonnull_attribute__. |
| 1453 | |
| 1454 | 2012-10-10 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1455 | |
| 1456 | * dwfl_segment_report_module.c (dwfl_segment_report_module): |
| 1457 | Initialize mod->MAIN_BIAS. |
| 1458 | |
| 1459 | 2012-10-10 Jan Kratochvil <jan.kratochvil@redhat.com> |
| 1460 | |
| 1461 | * dwfl_module_addrsym.c (dwfl_module_addrsym): New function |
| 1462 | binding_value. Use it for both zero and non-zero size symbols |
| 1463 | comparisons. |
| 1464 | |
| 1465 | 2012-10-01 Mark Wielaard <mjw@redhat.com> |
| 1466 | |
| 1467 | * cu.c (cudie_offset): Don't use type_sig8, it might not be |
| 1468 | initialized and these are always real CUs, never TUs. |
| 1469 | |
| 1470 | 2012-10-01 Mark Wielaard <mjw@redhat.com> |
| 1471 | |
| 1472 | * derelocate.c (find_section): Check next section exists before |
| 1473 | accessing it. |
| 1474 | |
| 1475 | 2012-08-01 Petr Machata <pmachata@redhat.com> |
| 1476 | |
| 1477 | * offline.c (process_archive_member): Ignore entry "/SYM64/". |
| 1478 | |
| 1479 | 2012-03-28 Roland McGrath <roland@hack.frob.com> |
| 1480 | |
| 1481 | * dwfl_segment_report_module.c |
| 1482 | (dwfl_segment_report_module: read_portion): Don't use existing buffer |
| 1483 | when FILESZ is zero (string mode) and available portion doesn't hold |
| 1484 | a terminated string. |
| 1485 | |
| 1486 | 2011-12-02 Roland McGrath <roland@hack.frob.com> |
| 1487 | |
| 1488 | * elf-from-memory.c (elf_from_remote_memory): Fix ELFCLASS64 case |
| 1489 | to use elf64_xlatetom and PHDRS.p64. |
| 1490 | Reported by Serge Pavlov <serge.pavlov.at.gnu@gmail.com>. |
| 1491 | |
| 1492 | 2011-11-31 Mark Wielaard <mjw@redhat.com> |
| 1493 | |
| 1494 | * dwfl_module_addrsym.c (dwfl_module_addrsym): First search all |
| 1495 | global symbols. Then only when that doesn't provide a match search |
| 1496 | all local symbols too. |
| 1497 | * dwfl_module_getdwarf.c (load_symtab): Take first_global int arg |
| 1498 | and fill it in. |
| 1499 | (find_symtab): Initialize mod->first_global and pass it to load_symtab. |
| 1500 | * libdwfl/libdwflP.h (Dwfl_Module): Add first_global field. |
| 1501 | |
| 1502 | 2011-11-31 Mark Wielaard <mjw@redhat.com> |
| 1503 | |
| 1504 | * dwfl_module_addrsym.c (dwfl_module_addrsym): Only update |
| 1505 | sizeless_sym if needed and closer to desired addr. |
| 1506 | |
| 1507 | 2011-10-20 Mark Wielaard <mjw@redhat.com> |
| 1508 | |
| 1509 | * derelocate.c (cache_sections): Intern mod->reloc_info check. |
| 1510 | (dwfl_module_relocations): Don't check mod->reloc_info. |
| 1511 | (dwfl_module_relocation_info): Likewise. |
| 1512 | (find_section): Likewise. |
| 1513 | |
| 1514 | 2011-07-09 Roland McGrath <roland@hack.frob.com> |
| 1515 | |
| 1516 | * image-header.c (LE32): Macro removed (now in lib/system.h). |
| 1517 | |
| 1518 | 2011-04-11 Mark Wielaard <mjw@redhat.com> |
| 1519 | |
| 1520 | * linux-kernel-modules.c (vmlinux_suffixes): Guard definition |
| 1521 | by check for zlib, bzlib or lzma defines to check it isn't empty. |
| 1522 | (try_kernel_name): Use same guard for use of vmlinux_suffixes. |
| 1523 | |
| 1524 | 2011-03-08 Roland McGrath <roland@redhat.com> |
| 1525 | |
| 1526 | * dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL. |
| 1527 | Reported by Kurt Roeckx <kurt@roeckx.be>. |
| 1528 | |
| 1529 | 2011-02-11 Roland McGrath <roland@redhat.com> |
| 1530 | |
| 1531 | * linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz |
| 1532 | suffixes if corresponding decompression support is enabled. |
| 1533 | |
| 1534 | 2011-02-01 Roland McGrath <roland@redhat.com> |
| 1535 | |
| 1536 | * dwfl_module_getdwarf.c (find_prelink_address_sync): Use the |
| 1537 | section-end address as the synchronization point, rather than sh_addr. |
| 1538 | |
| 1539 | * dwfl_module_getdwarf.c (find_prelink_address_sync): Discover |
| 1540 | PT_INTERP p_vaddr separately from main phdrs and undo phdrs. |
| 1541 | |
| 1542 | * dwfl_module_getdwarf.c (find_prelink_address_sync): Fix pasto in |
| 1543 | last change, so we recognize PT_INTERP in ELFCLASS64 correctly. |
| 1544 | |
| 1545 | 2011-01-11 Roland McGrath <roland@redhat.com> |
| 1546 | |
| 1547 | * dwfl_module_getdwarf.c (open_elf): Remove section-based |
| 1548 | address_sync fixup from here. |
| 1549 | (find_prelink_address_sync): New function. |
| 1550 | (find_debuginfo): Call it. |
| 1551 | * libdwflP.h (DWFL_ERRORS): Add BAD_PRELINK error. |
| 1552 | |
| 1553 | 2011-01-04 Roland McGrath <roland@redhat.com> |
| 1554 | |
| 1555 | * dwfl_module_getdwarf.c (open_elf): Enhance address_sync calculation |
| 1556 | logic to consider section addresses, the better to survive all the |
| 1557 | possible prelink machinations. |
| 1558 | * libdwflP.h (struct dwfl_file): Comment change. |
| 1559 | |
| 1560 | 2010-11-30 Roland McGrath <roland@redhat.com> |
| 1561 | |
| 1562 | * derelocate.c (dwfl_module_relocations): Remove over-eager assert. |
| 1563 | |
| 1564 | 2010-11-12 Roland McGrath <roland@redhat.com> |
| 1565 | |
| 1566 | * libdwflP.h (struct Dwfl_Module): New member main_bias. |
| 1567 | (dwfl_adjusted_address, dwfl_deadjust_address): Use it. |
| 1568 | * dwfl_module_getdwarf.c (__libdwfl_getelf): Initialize it. |
| 1569 | |
| 1570 | * libdwflP.h (dwfl_deadjust_address): New function. |
| 1571 | (dwfl_deadjust_dwarf_addr, dwfl_deadjust_st_value): New functions. |
| 1572 | * cu.c (addrarange): Use dwfl_deadjust_dwarf_addr. |
| 1573 | * dwfl_module_addrsym.c: Use dwfl_deadjust_st_value. |
| 1574 | |
| 1575 | 2010-11-11 Roland McGrath <roland@redhat.com> |
| 1576 | |
| 1577 | * libdwflP.h (struct dwfl_file): Remove bias member. |
| 1578 | Add vaddr and address_sync members instead. |
| 1579 | (dwfl_adjusted_address): Calculate using vaddr. |
| 1580 | (dwfl_adjusted_dwarf_addr): Calculate using address_sync and call that. |
| 1581 | (dwfl_adjusted_st_value): Use one of those calls. |
| 1582 | * dwfl_module_getdwarf.c (open_elf): Initialize vaddr and address_sync. |
| 1583 | * dwfl_segment_report_module.c (dwfl_segment_report_module): Likewise. |
| 1584 | * derelocate.c (dwfl_module_relocations): Update ET_EXEC assertions. |
| 1585 | * link_map.c (consider_executable): Adjust only MOD->low_addr for |
| 1586 | detected PIE bias change. |
| 1587 | |
| 1588 | * libdwflP.h (dwfl_adjusted_dwarf_addr): New function. |
| 1589 | * dwfl_module_info.c: Use it. |
| 1590 | * cu.c (addrarange): Likewise. |
| 1591 | * dwfl_dwarf_line.c: Likewise. |
| 1592 | * dwfl_module_dwarf_cfi.c: Likewise. |
| 1593 | * dwfl_lineinfo.c: Likewise. |
| 1594 | * dwfl_nextcu.c: Likewise. |
| 1595 | * dwfl_module_getdwarf.c (dwfl_module_getdwarf): Likewise. |
| 1596 | |
| 1597 | * libdwflP.h (dwfl_adjusted_st_value): New function. |
| 1598 | * relocate.c (resolve_symbol): Use it. |
| 1599 | * dwfl_module_getsym.c: Likewise. |
| 1600 | * dwfl_module_addrsym.c: Likewise. |
| 1601 | * dwfl_module_info.c: Likewise. |
| 1602 | |
| 1603 | * libdwflP.h (dwfl_adjusted_address): New function. |
| 1604 | * dwfl_module_build_id.c (__libdwfl_find_build_id): Use it. |
| 1605 | * relocate.c (__libdwfl_relocate_value): Likewise. |
| 1606 | * derelocate.c (cache_sections): Likewise. |
| 1607 | (dwfl_module_address_section): Likewise. |
| 1608 | * dwfl_module_getelf.c: Likewise. |
| 1609 | * dwfl_module_eh_cfi.c: Likewise. |
| 1610 | * link_map.c (consider_executable): Likewise. |
| 1611 | |
| 1612 | 2010-08-24 Roland McGrath <roland@redhat.com> |
| 1613 | |
| 1614 | * dwfl_dwarf_line.c: New file. |
| 1615 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 1616 | |
| 1617 | 2010-08-18 Roland McGrath <roland@redhat.com> |
| 1618 | |
| 1619 | * link_map.c (report_r_debug): Use found name if we have no name, |
| 1620 | even if we already have an Elf handle. |
| 1621 | |
| 1622 | 2010-06-30 Roland McGrath <roland@redhat.com> |
| 1623 | |
| 1624 | * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't be |
| 1625 | confused by -1 return from dwfl_build_id_find_elf after it opened |
| 1626 | the Elf handle. |
| 1627 | * find-debuginfo.c (dwfl_standard_find_debuginfo): Likewise for |
| 1628 | dwfl_build_id_find_debuginfo. |
| 1629 | |
| 1630 | 2010-06-16 Roland McGrath <roland@redhat.com> |
| 1631 | |
| 1632 | * cu.c (cudie_offset): Use DIE_OFFSET_FROM_CU_OFFSET macro. |
| 1633 | |
| 1634 | 2010-06-14 Roland McGrath <roland@redhat.com> |
| 1635 | |
| 1636 | * find-debuginfo.c (try_open): Take new arg MAIN_STAT. Compare |
| 1637 | candidate file to that st_dev/st_ino and pretend it didn't exist |
| 1638 | if they match. |
| 1639 | (find_debuginfo_in_path): Update caller, pass main file's info. |
| 1640 | |
| 1641 | 2010-05-20 Roland McGrath <roland@redhat.com> |
| 1642 | |
| 1643 | * linux-proc-maps.c (find_sysinfo_ehdr): Renamed to ... |
| 1644 | (grovel_auxv): ... this. Take DWFL argument. |
| 1645 | (dwfl_linux_proc_report): Update caller. |
| 1646 | |
| 1647 | * dwfl_module_getdwarf.c (open_elf): Calculate alignment for bias |
| 1648 | based on dwfl->segment_align or manifest alignment of MOD->low_addr. |
| 1649 | |
| 1650 | 2010-05-19 Roland McGrath <roland@redhat.com> |
| 1651 | |
| 1652 | * linux-kernel-modules.c (intuit_kernel_bounds): Rewritten. |
| 1653 | |
| 1654 | 2010-05-06 Roland McGrath <roland@redhat.com> |
| 1655 | |
| 1656 | * segment.c (insert): Clear inserted elements of DWFL->lookup_module. |
| 1657 | |
| 1658 | * libdwflP.h (DWFL_ERRORS): Add WRONG_ID_ELF. |
| 1659 | * dwfl_build_id_find_elf.c: Set MOD->main.valid when there is a build |
| 1660 | ID but we didn't find a file. |
| 1661 | * dwfl_module_getdwarf.c (__libdwfl_getelf): When that's set, check |
| 1662 | and refuse any fallback file-by-name if it lacks the matching ID. |
| 1663 | |
| 1664 | * dwfl_error.c (dwfl_errno): Add INTDEF. |
| 1665 | * libdwflP.h: Add INTDECL. |
| 1666 | |
| 1667 | * dwfl_module_getdwarf.c (open_elf): Do elf_end and clear FILE->elf in |
| 1668 | failure cases. |
| 1669 | |
| 1670 | 2010-05-04 Roland McGrath <roland@redhat.com> |
| 1671 | |
| 1672 | * dwfl_segment_report_module.c: Use "[pie]" rather than "[dso]" for an |
| 1673 | ET_DYN that has a DT_DEBUG. |
| 1674 | |
| 1675 | * dwfl_segment_report_module.c: Fix jump-start of NDX-finding loop. |
| 1676 | |
| 1677 | * segment.c (insert): Fix moving of values following insertion. |
| 1678 | (reify_segments): Fix up MOD->segment backpointer indices after |
| 1679 | later insertions in the main loop invalidate them. |
| 1680 | |
| 1681 | * link_map.c (dwfl_link_map_report): Detect bias of embedded phdrs and |
| 1682 | apply it to PT_DYNAMIC p_vaddr so we handle a PIE correctly. |
| 1683 | |
| 1684 | * core-file.c (dwfl_core_file_report): Return any nonzero count of |
| 1685 | modules reported, even if link_map grovelling failed and only sniffing |
| 1686 | found anything. |
| 1687 | |
| 1688 | 2010-04-26 Roland McGrath <roland@redhat.com> |
| 1689 | |
| 1690 | * relocate.c (relocate_section): Treat R_*_NONE reloc as no reloc. |
| 1691 | Works around probably-wrong ld -r behavior for case of a DWARF address |
| 1692 | constant that refers to a discarded SHF_ALLOC section. |
| 1693 | |
| 1694 | 2010-04-14 Roland McGrath <roland@redhat.com> |
| 1695 | |
| 1696 | * link_map.c (report_r_debug): Limit iterations on the l_next chain to |
| 1697 | an upper bound on sane possible number of elements. |
| 1698 | |
| 1699 | 2010-03-11 Roland McGrath <roland@redhat.com> |
| 1700 | |
| 1701 | * link_map.c (auxv_format_probe): Fix scanning loop, so we really scan |
| 1702 | the second half for 32-bit matches. |
| 1703 | |
| 1704 | 2010-03-10 Roland McGrath <roland@redhat.com> |
| 1705 | |
| 1706 | * core-file.c (dwfl_core_file_report): Punt EHDR argument. |
| 1707 | * argp-std.c (parse_opt): Update caller. |
| 1708 | * libdwfl.h: Declare dwfl_core_file_report. |
| 1709 | * libdwflP.h: Don't. |
| 1710 | |
| 1711 | 2010-02-17 Roland McGrath <roland@redhat.com> |
| 1712 | |
| 1713 | * dwfl_segment_report_module.c (addr_segndx): Take new flag argument. |
| 1714 | If set, find the first index not below ADDR. |
| 1715 | (dwfl_segment_report_module): Update callers. |
| 1716 | Pass true when calculating return value. |
| 1717 | |
| 1718 | 2010-02-15 Roland McGrath <roland@redhat.com> |
| 1719 | |
| 1720 | * Makefile.am: Use config/eu.am for common stuff. |
| 1721 | |
| 1722 | * find-debuginfo.c (find_debuginfo_in_path): Fix uninitialized |
| 1723 | variable in failure path. |
| 1724 | |
| 1725 | 2010-02-02 Mark Wielaard <mjw@redhat.com> |
| 1726 | |
| 1727 | * dwfl_module_dwarf_cfi.c (dwfl_module_dwarf_cfi): Always set bias. |
| 1728 | * dwfl_module_eh_cfi.c (dwfl_module_eh_cfi): Likewise |
| 1729 | |
| 1730 | 2010-01-07 Roland McGrath <roland@redhat.com> |
| 1731 | |
| 1732 | * core-file.c (dwfl_core_file_report): Use elf_getphdrnum. |
| 1733 | * dwfl_module_build_id.c (__libdwfl_find_build_id): Likewise. |
| 1734 | * dwfl_module_getdwarf.c (open_elf, find_dynsym): Likewise. |
| 1735 | * dwfl_report_elf.c (__libdwfl_report_elf): Likewise. |
| 1736 | |
| 1737 | 2010-01-06 Roland McGrath <roland@redhat.com> |
| 1738 | |
| 1739 | * relocate.c (relocate_getsym): For SHN_COMMON, zero st_value. |
| 1740 | (relocate_section): Let unresolved SHN_COMMON symbol stay 0. |
| 1741 | |
| 1742 | 2009-11-16 Roland McGrath <roland@redhat.com> |
| 1743 | |
| 1744 | * relocate.c (relocate_section): Skip SHT_NOBITS or empty target scn. |
| 1745 | |
| 1746 | 2009-11-12 Petr Machata <pmachata@redhat.com> |
| 1747 | |
| 1748 | * core-file.c (dwfl_elf_phdr_memory_callback): Only load ahead if |
| 1749 | the chunk is both offset-contiguous and vaddr-contiguous. |
| 1750 | |
| 1751 | 2009-11-05 Roland McGrath <roland@redhat.com> |
| 1752 | |
| 1753 | * link_map.c (report_r_debug): Skip entries with l_ld==0. |
| 1754 | Use dwfl_addrmodule for l_ld lookup, don't bail on lookup failure. |
| 1755 | |
| 1756 | 2009-09-04 Roland McGrath <roland@redhat.com> |
| 1757 | |
| 1758 | * image-header.c (__libdw_image_header): Fix tranposed comparison. |
| 1759 | |
| 1760 | 2009-08-27 Roland McGrath <roland@redhat.com> |
| 1761 | |
| 1762 | * image-header.c: New file. |
| 1763 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 1764 | * libdwflP.h: Declare __libdw_image_header. |
| 1765 | * open.c (decompress): Don't consume ELF on failure. |
| 1766 | (what_kind): New function, broken out of ... |
| 1767 | (__libdw_open_file): ... here. Call it. |
| 1768 | If it fails, try __libdw_image_header and then try what_kind again. |
| 1769 | |
| 1770 | * gzip.c (unzip): Reuse *WHOLE as first INPUT_BUFFER, |
| 1771 | leave it behind for next decompressor. |
| 1772 | * open.c (decompress): Free BUFFER on failure. |
| 1773 | |
| 1774 | 2009-08-26 Roland McGrath <roland@redhat.com> |
| 1775 | |
| 1776 | * gzip.c (find_zImage_payload): New function, broken out of ... |
| 1777 | (mapped_zImage): ... here. Call it. |
| 1778 | (find_zImage_payload) [LZMA]: Match LZMA-compressed kernels with |
| 1779 | stupid method of just trying the decoder. |
| 1780 | |
| 1781 | * open.c [USE_LZMA]: Try __libdw_unlzma. |
| 1782 | * libdwflP.h: Declare it. |
| 1783 | (DWFL_ERRORS): Add DWFL_E_LZMA. |
| 1784 | * gzip.c [LZMA]: Implement liblzma version for XZ file format. |
| 1785 | * lzma.c: New file. |
| 1786 | * Makefile.am [LZMA] (libdwfl_a_SOURCES): Add it. |
| 1787 | |
| 1788 | * gzip.c (mapped_zImage): Limit scan to 32kb. |
| 1789 | Make this unconditional, support bzip2 kernel images too. |
| 1790 | (unzip): Use direct inflate method for non-mmap case too. |
| 1791 | Only zlib uses the stream method. |
| 1792 | |
| 1793 | 2009-08-09 Roland McGrath <roland@redhat.com> |
| 1794 | |
| 1795 | * dwfl_module_build_id.c: Use new macros for versioned definitions. |
| 1796 | |
| 1797 | 2009-07-08 Roland McGrath <roland@redhat.com> |
| 1798 | |
| 1799 | * dwfl_module_dwarf_cfi.c: New file. |
| 1800 | * dwfl_module_eh_cfi.c: New file. |
| 1801 | * Makefile.am (libdwfl_a_SOURCES): Add them. |
| 1802 | * libdwflP.h (struct Dwfl_Module): New members `dwarf_cfi', `eh_cfi. |
| 1803 | Add INTDECL for dwfl_module_eh_cfi, dwfl_module_dwarf_cfi. |
| 1804 | |
| 1805 | 2009-07-08 Roland McGrath <roland@redhat.com> |
| 1806 | |
| 1807 | * libdwflP.h (struct Dwfl_Module): Reorder members to pack better. |
| 1808 | |
| 1809 | 2009-06-18 Mark Wielaard <mjw@redhat.com> |
| 1810 | |
| 1811 | * dwfl_report_elf.c (__libdwfl_report_elf): Return NULL on overlap. |
| 1812 | |
| 1813 | 2009-06-13 Ulrich Drepper <drepper@redhat.com> |
| 1814 | |
| 1815 | * derelocate.c: Don't use deprecated libelf functions. |
| 1816 | * dwfl_module_getdwarf.c: Likewise. |
| 1817 | * relocate.c: Likewise. |
| 1818 | |
| 1819 | 2009-04-23 Ulrich Drepper <drepper@redhat.com> |
| 1820 | |
| 1821 | * dwfl_module_build_id.c: Define versioned symbols only if SHARED is |
| 1822 | defined. Otherwise just define the latest version. |
| 1823 | |
| 1824 | 2009-04-22 Roland McGrath <roland@redhat.com> |
| 1825 | |
| 1826 | * relocate.c (resolve_symbol): Apply correct bias to st_value found in |
| 1827 | a non-ET_REL module. |
| 1828 | |
| 1829 | * dwfl_module_build_id.c (__libdwfl_find_build_id): Fix last change to |
| 1830 | adjust properly for non-ET_REL. |
| 1831 | |
| 1832 | 2009-04-21 Roland McGrath <roland@redhat.com> |
| 1833 | |
| 1834 | * dwfl_module_getsym.c: Apply non-ET_REL bias only if SHF_ALLOC. |
| 1835 | |
| 1836 | * relocate.c (__libdwfl_relocate_value): Assert that MOD is ET_REL. |
| 1837 | * derelocate.c (cache_sections): Call __libdwfl_relocate_value only |
| 1838 | for ET_REL. |
| 1839 | * dwfl_module_build_id.c (__libdwfl_find_build_id): Likewise. |
| 1840 | |
| 1841 | 2009-04-20 Roland McGrath <roland@redhat.com> |
| 1842 | |
| 1843 | * dwfl_module_getdwarf.c (__libdwfl_getelf): Add internal_function. |
| 1844 | |
| 1845 | 2009-04-19 Roland McGrath <roland@redhat.com> |
| 1846 | |
| 1847 | * dwfl_module_getdwarf.c (find_file): Renamed to ... |
| 1848 | (__libdwfl_getelf): ... this. Make it global. |
| 1849 | (find_symtab, find_dw): Update callers. |
| 1850 | (dwfl_module_getelf): Functions moved ... |
| 1851 | * dwfl_module_getelf.c: ... here, new file. |
| 1852 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 1853 | * libdwflP.h: Declare __libdwfl_getelf. |
| 1854 | |
| 1855 | 2009-04-14 Roland McGrath <roland@redhat.com> |
| 1856 | |
| 1857 | * dwfl_segment_report_module.c: Handle DT_STRTAB value being either |
| 1858 | absolute (already adjusted in place) or needing load bias adjustment. |
| 1859 | |
| 1860 | * core-file.c (dwfl_elf_phdr_memory_callback): Fix return value for |
| 1861 | gelf_getphdr failure. Fix file size limit checks. |
| 1862 | |
| 1863 | * dwfl_segment_report_module.c: Fix underflow in DYNSTRSZ check. |
| 1864 | |
| 1865 | 2009-04-08 Roland McGrath <roland@redhat.com> |
| 1866 | |
| 1867 | * dwfl_module_getsym.c: Don't adjust for bias again after |
| 1868 | __libdwfl_relocate_value. |
| 1869 | |
| 1870 | * relocate.c (__libdwfl_relocate_value): Don't adjust a value from |
| 1871 | a non-SHF_ALLOC section. |
| 1872 | (relocate_getsym): Test st_shndx for SHN_* values, not *SHNDX. |
| 1873 | * dwfl_module_getsym.c (dwfl_module_getsym): Likewise. |
| 1874 | |
| 1875 | 2009-03-09 Roland McGrath <roland@redhat.com> |
| 1876 | |
| 1877 | * dwfl_module_build_id.c (__libdwfl_find_build_id): Move SHSTRNDX |
| 1878 | variable to outer scope, so we cache it for the loop. |
| 1879 | |
| 1880 | * relocate.c (__libdwfl_relocate_value): Add MOD->main.bias to sh_addr. |
| 1881 | |
| 1882 | 2009-02-12 Roland McGrath <roland@redhat.com> |
| 1883 | |
| 1884 | * dwfl_module_build_id.c (__libdwfl_find_build_id): Use |
| 1885 | __libdwfl_relocate_value to find correct sh_addr value. |
| 1886 | |
| 1887 | 2009-02-10 Roland McGrath <roland@redhat.com> |
| 1888 | |
| 1889 | * dwfl_report_elf.c (__libdwfl_report_elf): Take new arg SANITY. |
| 1890 | If false, don't fail for NO_PHDR. |
| 1891 | (dwfl_report_elf): Update caller. |
| 1892 | * libdwflP.h: Update decl. |
| 1893 | * offline.c (process_elf): Call it with false, so we don't refuse |
| 1894 | dubiously-formed objects here. |
| 1895 | |
| 1896 | * link_map.c (consider_executable): Don't assert dwfl_addrsegment |
| 1897 | finds our module. We shouldn't crash when we confuse some guesses. |
| 1898 | |
| 1899 | 2009-02-10 Ulrich Drepper <drepper@redhat.com> |
| 1900 | |
| 1901 | * open.c (decompress): Avoid crash with empty input file. |
| 1902 | |
| 1903 | 2009-01-27 Roland McGrath <roland@redhat.com> |
| 1904 | |
| 1905 | * dwfl_report_elf.c (__libdwfl_report_elf): Ignore trailing PT_LOAD |
| 1906 | with zero vaddr and memsz. |
| 1907 | |
| 1908 | 2009-01-22 Roland McGrath <roland@redhat.com> |
| 1909 | |
| 1910 | * open.c (decompress): Move BUFFER, SIZE decls outside #if. |
| 1911 | |
| 1912 | * dwfl_segment_report_module.c (addr_segndx): Remove bogus adjustments |
| 1913 | after address-matching loop. |
| 1914 | |
| 1915 | * segment.c (lookup): Fix fencepost in checking for HINT match. |
| 1916 | |
| 1917 | 2009-01-14 Roland McGrath <roland@redhat.com> |
| 1918 | |
| 1919 | * gzip.c [!BZLIB] (mapped_zImage): New function. |
| 1920 | (unzip) [!BZLIB]: Grok Linux kernel zImage format. |
| 1921 | |
| 1922 | 2009-01-10 Ulrich Drepper <drepper@redhat.com> |
| 1923 | |
| 1924 | * dwfl_error.c: Always use __thread. Remove all !USE_TLS code. |
| 1925 | |
| 1926 | 2009-01-08 Roland McGrath <roland@redhat.com> |
| 1927 | |
| 1928 | * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): |
| 1929 | Skip subdirectory named "source". |
| 1930 | (dwfl_linux_kernel_find_elf): Likewise. |
| 1931 | |
| 1932 | 2009-01-06 Roland McGrath <roland@redhat.com> |
| 1933 | |
| 1934 | * linux-kernel-modules.c (check_suffix): New function. |
| 1935 | Match ".ko", ".ko.gz", and ".ko.bz2" suffixes. |
| 1936 | (dwfl_linux_kernel_report_offline): Use it. |
| 1937 | (dwfl_linux_kernel_find_elf): Likewise. |
| 1938 | |
| 1939 | 2009-01-05 Roland McGrath <roland@redhat.com> |
| 1940 | |
| 1941 | * argp-std.c (parse_opt): Use __libdw_open_file for core file. |
| 1942 | * dwfl_build_id_find_debuginfo.c: Use it to open the file. |
| 1943 | * dwfl_build_id_find_elf.c: Likewise. |
| 1944 | * dwfl_module_getdwarf.c (open_elf): Likewise. |
| 1945 | * dwfl_report_elf.c: Likewise. |
| 1946 | * find-debuginfo.c (validate): Likewise. |
| 1947 | * offline.c (__libdwfl_report_offline): Likewise. |
| 1948 | |
| 1949 | * libdwflP.h: Declare __libdw_open_file. |
| 1950 | * open.c: New file. |
| 1951 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 1952 | |
| 1953 | * gzip.c: New file. |
| 1954 | * Makefile.am [ZLIB] (libdwfl_a_SOURCES): Add it. |
| 1955 | * bzip2.c: New file. |
| 1956 | * Makefile.am [BZLIB] (libdwfl_a_SOURCES): Add it. |
| 1957 | * libdwflP.h: Declare __libdw_gunzip, __libdw_bunzip2. |
| 1958 | |
| 1959 | 2008-12-16 Roland McGrath <roland@redhat.com> |
| 1960 | |
| 1961 | * dwfl_module_build_id.c (dwfl_module_build_id): Define with alias and |
| 1962 | symver magic to bind to ELFUTILS_0.138. |
| 1963 | (_BUG_COMPAT_dwfl_module_build_id): New function, bug compatible |
| 1964 | wrapper for ELFUTILS_0.130 version set. |
| 1965 | |
| 1966 | 2008-12-18 Roland McGrath <roland@redhat.com> |
| 1967 | |
| 1968 | * derelocate.c (dwfl_module_relocate_address): Fix last fix: ET_DYN |
| 1969 | addresses are taken as relative to MOD->low_addr. |
| 1970 | |
| 1971 | 2008-12-15 Roland McGrath <roland@redhat.com> |
| 1972 | |
| 1973 | * derelocate.c (dwfl_module_relocate_address): Apply main.bias, not |
| 1974 | debug.bias. |
| 1975 | |
| 1976 | 2008-12-11 Roland McGrath <roland@redhat.com> |
| 1977 | |
| 1978 | * offline.c (process_archive): Don't call elf_end and close if |
| 1979 | returning NULL. Check first elf_begin call and set error code |
| 1980 | specially for empty archive. |
| 1981 | Fixes RHBZ#465878. |
| 1982 | |
| 1983 | 2008-12-02 Roland McGrath <roland@redhat.com> |
| 1984 | |
| 1985 | * dwfl_getmodules.c (dwfl_getmodules): Typo fix in last change. |
| 1986 | |
| 1987 | 2008-11-26 Roland McGrath <roland@redhat.com> |
| 1988 | |
| 1989 | * dwfl_getmodules.c (dwfl_getmodules): Encode iteration style in |
| 1990 | return value, and interpret encoded OFFSET argument. |
| 1991 | |
| 1992 | 2008-10-07 Roland McGrath <roland@redhat.com> |
| 1993 | |
| 1994 | * dwfl_module_build_id.c (check_notes): Fix typo in vaddr calculation. |
| 1995 | |
| 1996 | 2008-09-29 Roland McGrath <roland@redhat.com> |
| 1997 | |
| 1998 | * segment.c (insert): Must realloc DWFL->lookup_module here too. |
| 1999 | (dwfl_report_segment): Clear DWFL->lookup_module before insert calls. |
| 2000 | |
| 2001 | 2008-08-28 Roland McGrath <roland@redhat.com> |
| 2002 | |
| 2003 | * segment.c (reify_segments): Fix last change. |
| 2004 | |
| 2005 | 2008-08-27 Roland McGrath <roland@redhat.com> |
| 2006 | |
| 2007 | * linux-proc-maps.c (read_proc_memory): Return 0 for EINVAL or EPERM |
| 2008 | failure from pread64. |
| 2009 | |
| 2010 | 2008-08-26 Roland McGrath <roland@redhat.com> |
| 2011 | |
| 2012 | * segment.c (reify_segments): Insert a trailing segment for a module |
| 2013 | end that is above the highest current segment. |
| 2014 | |
| 2015 | 2008-08-25 Roland McGrath <roland@redhat.com> |
| 2016 | |
| 2017 | * dwfl_module_getdwarf.c (open_elf): Extract elf_errno () for |
| 2018 | coded return value, not plain DWFL_E_LIBELF. Return DWFL_E_BADELF |
| 2019 | if FILE->elf is not ELF_K_ELF. |
| 2020 | |
| 2021 | * dwfl_segment_report_module.c: Add a cast. |
| 2022 | |
| 2023 | 2008-08-21 Denys Vlasenko <dvlasenk@redhat.com> |
| 2024 | |
| 2025 | * dwfl_module_addrsym.c (dwfl_module_addrsym): Improve logic |
| 2026 | which decides which symbol is "closest" to a given address. |
| 2027 | |
| 2028 | 2008-08-15 Roland McGrath <roland@redhat.com> |
| 2029 | |
| 2030 | * argp-std.c (offline_callbacks): Use dwfl_build_id_find_elf. |
| 2031 | (options, parse_opt): Handle --core. |
| 2032 | |
| 2033 | * core-file.c: New file. |
| 2034 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 2035 | * libdwflP.h (dwfl_core_file_report): Declare it. |
| 2036 | |
| 2037 | * link_map.c: New file. |
| 2038 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 2039 | * libdwflP.h (dwfl_link_map_report): Declare it. |
| 2040 | |
| 2041 | * libdwflP.h (MIN, MAX): New macros. |
| 2042 | (Dwfl_Memory_Callback): New typedef. |
| 2043 | (Dwfl_Module_Callback): New typedef. |
| 2044 | (dwfl_segment_report_module): Declare it. |
| 2045 | * dwfl_segment_report_module.c: New file. |
| 2046 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 2047 | |
| 2048 | * derelocate.c (dwfl_module_address_section): Add INTDEF. |
| 2049 | * libdwflP.h: Add INTDECL. |
| 2050 | |
| 2051 | * segment.c: New file. |
| 2052 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 2053 | * libdwfl.h: Declare dwfl_addrsegment, dwfl_report_segment. |
| 2054 | * libdwflP.h (struct Dwfl): New members lookup_elts, lookup_alloc, |
| 2055 | lookup_addr, lookup_module, lookup_segndx, replace removed members |
| 2056 | modules, nmodules. |
| 2057 | (struct Dwfl_Module): New member segment. |
| 2058 | * dwfl_end.c (dwfl_end): Free the new ones. Iterate via modulelist |
| 2059 | to each free module. |
| 2060 | * dwfl_module.c (dwfl_report_begin_add): Do nothing. |
| 2061 | (dwfl_report_begin): Don't call it. Truncate the segment table instead. |
| 2062 | (dwfl_report_module): Don't touch DWFL->nmodules. |
| 2063 | (dwfl_report_end): Don't touch DWFL->modules and DWFL->nmodules. |
| 2064 | (compare_modules): Function removed. |
| 2065 | * dwfl_getmodules.c: Rewritten. |
| 2066 | Add INTDEF. |
| 2067 | * libdwflP.h: Add INTDECLs. |
| 2068 | * dwfl_getdwarf.c: Rewritten to call dwfl_getmodules. |
| 2069 | * dwfl_addrmodule.c: Rewritten to just call dwfl_addrsegment. |
| 2070 | |
| 2071 | 2008-08-03 Roland McGrath <roland@redhat.com> |
| 2072 | |
| 2073 | * linux-kernel-modules.c: Include <fts.h> before <config.h>. |
| 2074 | |
| 2075 | 2008-07-17 Roland McGrath <roland@redhat.com> |
| 2076 | |
| 2077 | * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Set errno to |
| 2078 | zero if the failure was only ENOENT. |
| 2079 | |
| 2080 | 2008-06-03 Roland McGrath <roland@redhat.com> |
| 2081 | |
| 2082 | * dwfl_module_addrsym.c (dwfl_module_addrsym): Exclude undefined |
| 2083 | symbols. |
| 2084 | |
| 2085 | 2008-05-22 Petr Machata <pmachata@redhat.com> |
| 2086 | |
| 2087 | * dwfl_module_getdwarf.c (open_elf): Bias of ET_EXEC files is always 0. |
| 2088 | |
| 2089 | 2008-05-06 Roland McGrath <roland@frob.com> |
| 2090 | |
| 2091 | * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Use |
| 2092 | FTS_LOGICAL here too. |
| 2093 | (dwfl_linux_kernel_find_elf): Likewise. |
| 2094 | |
| 2095 | 2008-04-29 Roland McGrath <roland@redhat.com> |
| 2096 | |
| 2097 | * find-debuginfo.c (dwfl_standard_find_debuginfo): Try path search |
| 2098 | based on canonicalize_file_name if it differs from the supplied name. |
| 2099 | |
| 2100 | * linux-kernel-modules.c (check_module_notes): Use FTS_LOGICAL so |
| 2101 | we accept symlinks. |
| 2102 | |
| 2103 | 2008-04-27 Roland McGrath <roland@redhat.com> |
| 2104 | |
| 2105 | * linux-kernel-modules.c (report_kernel): Fix crash when |
| 2106 | dwfl_report_elf fails. |
| 2107 | |
| 2108 | 2008-04-05 Roland McGrath <roland@redhat.com> |
| 2109 | |
| 2110 | * linux-proc-maps.c (proc_maps_report): Don't leak LAST_FILE. |
| 2111 | |
| 2112 | * dwfl_module_getdwarf.c (find_file): Always free build_id_bits. |
| 2113 | Clear it after freeing. |
| 2114 | * dwfl_module_report_build_id.c (dwfl_module_report_build_id): Likewise. |
| 2115 | |
| 2116 | 2008-03-26 Roland McGrath <roland@redhat.com> |
| 2117 | |
| 2118 | * dwfl_module_getdwarf.c (load_symtab): Don't return success for |
| 2119 | SHT_DYNSYM, just set *SYMSCN like the comment says. |
| 2120 | |
| 2121 | * dwfl_end.c (dwfl_end): Iterate on modulelist chain, not modules array. |
| 2122 | |
| 2123 | * argp-std.c (parse_opt): On failure, call dwfl_end before argp_failure. |
| 2124 | |
| 2125 | 2008-03-19 Roland McGrath <roland@redhat.com> |
| 2126 | |
| 2127 | * dwfl_module_getsrc.c: Adjust address for module bias before search. |
| 2128 | |
| 2129 | 2008-03-01 Roland McGrath <roland@redhat.com> |
| 2130 | |
| 2131 | * libdwflP.h (__libdwfl_seterrno): Remove parameter name from |
| 2132 | prototype to avoid older compiler's complaint about reuse of the name. |
| 2133 | (__libdwfl_canon_error): Likewise. |
| 2134 | |
| 2135 | 2008-02-19 Roland McGrath <roland@redhat.com> |
| 2136 | |
| 2137 | * relocate.c (relocate_section): Check for an unhandled relocation |
| 2138 | type before resolving a reloc's symbol. Lift DWFL_E_BADRELTYPE -> |
| 2139 | DWFL_E_UNKNOWN_MACHINE check out of loops. |
| 2140 | |
| 2141 | * dwfl_module_getdwarf.c (load_dw): Skip relocation if |
| 2142 | DEBUGFILE->relocated is already set. |
| 2143 | |
| 2144 | 2008-01-26 Roland McGrath <roland@redhat.com> |
| 2145 | |
| 2146 | * dwfl_module_getdwarf.c (open_elf): Open FILE->name if it's non-null. |
| 2147 | |
| 2148 | * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Don't clear |
| 2149 | incoming *FILE_NAME at the start. |
| 2150 | |
| 2151 | 2008-01-08 Roland McGrath <roland@redhat.com> |
| 2152 | |
| 2153 | * Makefile.am (euinclude): Variable removed. |
| 2154 | (pkginclude_HEADERS): Set this instead of euinclude_HEADERS. |
| 2155 | |
| 2156 | 2007-10-23 Roland McGrath <roland@redhat.com> |
| 2157 | |
| 2158 | * linux-kernel-modules.c (report_kernel_archive): Reorder the kernel |
| 2159 | module to appear first. |
| 2160 | |
| 2161 | 2007-10-20 Roland McGrath <roland@redhat.com> |
| 2162 | |
| 2163 | * offline.c (process_archive_member): Take FD argument, pass it down |
| 2164 | to process_file. Return Elf_Cmd, not bool. |
| 2165 | Call elf_next here, always before elf_end. |
| 2166 | (process_archive): Update caller. Don't close FD here unless there |
| 2167 | are no member refs. |
| 2168 | |
| 2169 | * dwfl_module.c (free_file): Close fd only when elf_end returns zero. |
| 2170 | |
| 2171 | * libdwflP.h (struct dwfl_file): New bool member `relocated'. |
| 2172 | * dwfl_module_getdwarf.c (dwfl_module_getelf): For ET_REL, apply |
| 2173 | partial relocation to one or both files. |
| 2174 | (dwfl_module_getdwarf): For ET_REL, make sure extra sections' |
| 2175 | relocations have been applied to the debug file if dwfl_module_getelf |
| 2176 | has been used before. |
| 2177 | |
| 2178 | * relocate.c (resolve_symbol): New function. |
| 2179 | (relocate_section): Call it. |
| 2180 | |
| 2181 | * relocate.c (relocate_getsym): Handle null MOD->symfile. |
| 2182 | (relocate_section): Take new bool arg, PARTIAL. If true, |
| 2183 | no error for BADRELTYPE/RELUNDEF, instead just skip them |
| 2184 | and leave only those skipped relocs behind the reloc section. |
| 2185 | (__libdwfl_relocate_section): Take new arg, pass it down. |
| 2186 | (__libdwfl_relocate): Take new bool arg, DEBUG. If false, |
| 2187 | do partial relocation on all sections. |
| 2188 | * dwfl_module_getdwarf.c (load_dw): Update caller. |
| 2189 | * libdwflP.h: Update decls. |
| 2190 | * derelocate.c (dwfl_module_address_section): Pass new argument |
| 2191 | to __libdwfl_relocate_section, true. |
| 2192 | |
| 2193 | * derelocate.c (cache_sections): Don't cache reloc sections when |
| 2194 | section_address callback is null. |
| 2195 | |
| 2196 | 2007-10-19 Roland McGrath <roland@redhat.com> |
| 2197 | |
| 2198 | * relocate.c (relocate_section): Fix fencepost error in r_offset check. |
| 2199 | |
| 2200 | * derelocate.c (struct dwfl_relocation): Add member `relocs'. |
| 2201 | (struct secref): Likewise. |
| 2202 | (cache_sections): Cache the relocation section referring to each |
| 2203 | section we cache, if any. |
| 2204 | (dwfl_module_address_section): Use __libdwfl_relocate_section as |
| 2205 | necessary. |
| 2206 | |
| 2207 | * relocate.c (struct reloc_symtab_cache): New type. |
| 2208 | (relocate_getsym): Use it instead of four arguments. |
| 2209 | (__libdwfl_relocate): Update caller. |
| 2210 | (relocate_section): New function, broken out of ... |
| 2211 | (__libdwfl_relocate): ... here. |
| 2212 | (__libdwfl_relocate_section): New function. |
| 2213 | * libdwflP.h: Declare it. |
| 2214 | |
| 2215 | 2007-10-17 Roland McGrath <roland@redhat.com> |
| 2216 | |
| 2217 | * dwfl_module_getsym.c (dwfl_module_getsym): Apply MOD->symfile->bias |
| 2218 | to relocated st_value. |
| 2219 | |
| 2220 | * dwfl_report_elf.c (__libdwfl_report_elf): Align initial BASE for |
| 2221 | ET_REL to 0x100. |
| 2222 | |
| 2223 | 2007-10-16 Roland McGrath <roland@redhat.com> |
| 2224 | |
| 2225 | * dwfl_report_elf.c (__libdwfl_report_elf): Readjust BASE when a later |
| 2226 | section has larger alignment requirements not met by the original BASE, |
| 2227 | rather than padding more between sections. |
| 2228 | |
| 2229 | * dwfl_report_elf.c (__libdwfl_report_elf): Fix bias calculation. |
| 2230 | |
| 2231 | * dwfl_module_build_id.c (__libdwfl_find_build_id): Apply module bias |
| 2232 | to sh_addr value. |
| 2233 | |
| 2234 | * dwfl_report_elf.c (__libdwfl_report_elf): Don't be confused by BASE |
| 2235 | at zero in ET_REL case. Adjust BASE to necessary alignment. |
| 2236 | |
| 2237 | * dwfl_module_build_id.c (check_notes): Take -1, not 0, as stub value |
| 2238 | for DATA_VADDR. |
| 2239 | (__libdwfl_find_build_id): Update caller. |
| 2240 | |
| 2241 | * relocate.c (__libdwfl_relocate_value): Don't use sh_offset. |
| 2242 | * dwfl_report_elf.c (__libdwfl_report_elf): Likewise. |
| 2243 | * offline.c (dwfl_offline_section_address): Bail early if there is |
| 2244 | separate debug file. |
| 2245 | |
| 2246 | * relocate.c (__libdwfl_relocate): Don't return DWFL_E_NO_DWARF. |
| 2247 | |
| 2248 | 2007-10-09 Roland McGrath <roland@redhat.com> |
| 2249 | |
| 2250 | * dwfl_report_elf.c (__libdwfl_report_elf): Clear SHDR->sh_offset when |
| 2251 | caching SHDR->sh_addr = 0. |
| 2252 | * offline.c (dwfl_offline_section_address): Never called for sh_addr |
| 2253 | really at 0, don't check for it. Use MOD->debug directly, not symfile. |
| 2254 | |
| 2255 | * dwfl_module_getdwarf.c (load_symtab): Return success properly when |
| 2256 | we've found SHT_SYMTAB. |
| 2257 | |
| 2258 | * relocate.c (relocate_getsym): New function. |
| 2259 | (__libdwfl_relocate): Use it. |
| 2260 | (__libdwfl_relocate_value): Take new Elf * argument. Make SYMSHSTRNDX |
| 2261 | be a pointer instead of value; cache getshstrndx result there. |
| 2262 | * libdwflP.h: Update decl. |
| 2263 | * derelocate.c (cache_sections): Update caller. |
| 2264 | Always work on the main file, not the symfile. |
| 2265 | (dwfl_module_address_section): Likewise. |
| 2266 | * dwfl_module_getsym.c (dwfl_module_getsym): Update caller. |
| 2267 | |
| 2268 | 2007-10-07 Roland McGrath <roland@redhat.com> |
| 2269 | |
| 2270 | * offline.c (process_archive): Initialize MOD. |
| 2271 | |
| 2272 | * linux-kernel-modules.c (get_release): New function, broken out of ... |
| 2273 | (report_kernel): ... here. Call it. |
| 2274 | (try_kernel_name): Take new arg TRY_DEBUG, only try ".debug" if set. |
| 2275 | (find_kernel_elf): Update caller. |
| 2276 | (report_kernel_archive): New function. |
| 2277 | (dwfl_linux_kernel_report_offline): Call it. |
| 2278 | |
| 2279 | * offline.c (process_file): Take new arg PREDICATE, pass it down. |
| 2280 | (process_archive): Likewise. |
| 2281 | (process_archive_member): Likewise. When nonnull, let the predicate |
| 2282 | decide whether to use this member. |
| 2283 | (__libdwfl_report_offline): New function, broken out of ... |
| 2284 | (dwfl_report_offline): ... here. Call it. |
| 2285 | * libdwflP.h: Declare it. |
| 2286 | |
| 2287 | * offline.c (process_archive, process_archive_member): New functions. |
| 2288 | (process_elf, process_file): New functions, broken out of ... |
| 2289 | (dwfl_report_offline): ... here. Call process_file, which recurses on |
| 2290 | ELF_K_AR files. |
| 2291 | |
| 2292 | * dwfl_report_elf.c (__libdwfl_report_elf): New, broken out of ... |
| 2293 | (dwfl_report_elf): ... here. Call it. |
| 2294 | * libdwflP.h: Declare it. |
| 2295 | |
| 2296 | 2007-10-06 Roland McGrath <roland@redhat.com> |
| 2297 | |
| 2298 | * derelocate.c (dwfl_module_relocations): Don't call |
| 2299 | dwfl_module_getdwarf. |
| 2300 | |
| 2301 | * derelocate.c (find_section): Use __libdwfl_seterrno, not |
| 2302 | __libdw_seterrno. |
| 2303 | |
| 2304 | * relocate.c (__libdwfl_relocate_value): Abuse sh_offset, not |
| 2305 | SHF_ALLOC, to cache sh_addr resolved to 0. |
| 2306 | |
| 2307 | * dwfl_report_elf.c (dwfl_report_elf): When an ET_REL file has sh_addr |
| 2308 | values nonzero already, just use its existing layout. |
| 2309 | |
| 2310 | * relocate.c (__libdwfl_relocate): Clear size of reloc section in its |
| 2311 | in-core shdr after applying it. |
| 2312 | |
| 2313 | 2007-10-04 Ulrich Drepper <drepper@redhat.com> |
| 2314 | |
| 2315 | * linux-kernel-modules.c (dwfl_linux_kernel_report_kernel): Fake |
| 2316 | initialization of notes variable. |
| 2317 | |
| 2318 | 2007-10-04 Roland McGrath <roland@redhat.com> |
| 2319 | |
| 2320 | * linux-kernel-modules.c (intuit_kernel_bounds): Take new arg NOTES, |
| 2321 | fill in with vaddr of "__start_notes" symbol if found. |
| 2322 | (check_notes): New function. |
| 2323 | (check_kernel_notes): New function. |
| 2324 | (dwfl_linux_kernel_report_kernel): Call it. |
| 2325 | (check_module_notes): New function. |
| 2326 | (dwfl_linux_kernel_report_modules): Call it. |
| 2327 | |
| 2328 | * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): |
| 2329 | Try dwfl_build_id_find_elf first. |
| 2330 | |
| 2331 | * linux-kernel-modules.c (report_kernel): Don't leak FD if !REPORT. |
| 2332 | Set kernel module e_type to ET_DYN. |
| 2333 | |
| 2334 | 2007-10-03 Roland McGrath <roland@redhat.com> |
| 2335 | |
| 2336 | * find-debuginfo.c (validate): New function, broken out of ... |
| 2337 | (find_debuginfo_in_path): ... here. New function, broken out of ... |
| 2338 | (dwfl_standard_find_debuginfo): ... here. Call it, after trying |
| 2339 | dwfl_build_id_find_debuginfo first. |
| 2340 | |
| 2341 | * dwfl_build_id_find_elf.c: New file. |
| 2342 | * dwfl_build_id_find_debuginfo.c: New file. |
| 2343 | * Makefile.am (libdwfl_a_SOURCES): Add them. |
| 2344 | * libdwfl.h: Declare them. |
| 2345 | * libdwflP.h: Add INTDECLs. |
| 2346 | |
| 2347 | * dwfl_module_build_id.c: New file. |
| 2348 | * dwfl_module_report_build_id.c: New file. |
| 2349 | * Makefile.am (libdwfl_a_SOURCES): Add them. |
| 2350 | * libdwfl.h: Declare them. |
| 2351 | * libdwflP.h (struct Dwfl_Module): New members build_id_bits, |
| 2352 | build_id_len, build_id_vaddr. Declare __libdwfl_find_build_id. |
| 2353 | * dwfl_module.c (__libdwfl_module_free): Free MOD->build_id_bits. |
| 2354 | |
| 2355 | * dwfl_module_getdwarf.c (find_offsets): New function. |
| 2356 | (find_dynsym): New function, calls that. |
| 2357 | (find_symtab): Call it. |
| 2358 | |
| 2359 | 2007-09-11 Roland McGrath <roland@redhat.com> |
| 2360 | |
| 2361 | * dwfl_module_addrsym.c: Prefer a later global symbol at the same |
| 2362 | address if its st_size is smaller. |
| 2363 | |
| 2364 | 2007-08-13 Roland McGrath <roland@redhat.com> |
| 2365 | |
| 2366 | * dwfl_module_addrsym.c: Add dead initializer for stupid compiler. |
| 2367 | |
| 2368 | 2007-08-12 Roland McGrath <roland@redhat.com> |
| 2369 | |
| 2370 | * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Don't use |
| 2371 | FTS_LOGICAL. |
| 2372 | |
| 2373 | * elf-from-memory.c (elf_from_remote_memory): Don't reset LOADBASE on |
| 2374 | a second phdr if it happens to match EHDR_VMA exactly. |
| 2375 | |
| 2376 | 2007-08-08 Roland McGrath <roland@redhat.com> |
| 2377 | |
| 2378 | * dwfl_module_addrsym.c: Don't use STT_SECTION, STT_FILE symbols and |
| 2379 | those with no names. Rewrite best symbol algorithm not to assume a |
| 2380 | sorted table and to be smarter handling sizeless symbols. |
| 2381 | |
| 2382 | 2007-07-16 Roland McGrath <roland@redhat.com> |
| 2383 | |
| 2384 | * dwfl_module.c (dwfl_report_module): Increment DWFL->nmodules when |
| 2385 | reviving an existing module. |
| 2386 | |
| 2387 | 2007-06-08 Roland McGrath <roland@redhat.com> |
| 2388 | |
| 2389 | * libdwflP.h: Fix #ifndef for config.h to use PACKAGE_NAME. |
| 2390 | |
| 2391 | 2007-05-17 Roland McGrath <roland@redhat.com> |
| 2392 | |
| 2393 | * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Look at |
| 2394 | whole /lib/modules/VERSION tree, not just /lib/modules/VERSION/kernel. |
| 2395 | (dwfl_linux_kernel_find_elf): Likewise. |
| 2396 | |
| 2397 | * linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use |
| 2398 | getline and sscanf instead of fscanf. |
| 2399 | |
| 2400 | 2007-05-08 Roland McGrath <roland@redhat.com> |
| 2401 | |
| 2402 | * offline.c (dwfl_offline_section_address): Don't assume section |
| 2403 | numbers match between stripped and debuginfo files. Instead, assume |
| 2404 | only that the ordering among SHF_ALLOC sections matches. |
| 2405 | |
| 2406 | * linux-kernel-modules.c (report_kernel): Change RELEASE argument to |
| 2407 | pointer to string. |
| 2408 | (dwfl_linux_kernel_report_offline): Update caller. |
| 2409 | (dwfl_linux_kernel_report_kernel): Likewise. |
| 2410 | |
| 2411 | 2007-04-23 Roland McGrath <roland@redhat.com> |
| 2412 | |
| 2413 | * argp-std.c (options): Fix group title string. |
| 2414 | |
| 2415 | * argp-std.c (parse_opt): Handle ARGP_KEY_ERROR, free the Dwfl. |
| 2416 | Update via STATE->input every time we set STATE->hook, not only at |
| 2417 | ARGP_KEY_SUCCESS. |
| 2418 | |
| 2419 | * dwfl_module.c (free_file): Free FILE->name. |
| 2420 | |
| 2421 | 2007-04-16 Roland McGrath <roland@redhat.com> |
| 2422 | |
| 2423 | * derelocate.c (cache_sections): Apply bias to sh_addr. |
| 2424 | (compare_secrefs): Fix address comparison to avoid signed overflow. |
| 2425 | (find_section): New function, broken out of ... |
| 2426 | (dwfl_module_relocate_address): ... here, call it. |
| 2427 | (check_module): New function, broken out of ... |
| 2428 | (dwfl_module_relocate_address): ... here, call it. |
| 2429 | (dwfl_module_address_section): New function. |
| 2430 | * libdwfl.h: Declare it. |
| 2431 | |
| 2432 | 2007-03-26 Roland McGrath <roland@redhat.com> |
| 2433 | |
| 2434 | * dwfl_module.c (__libdwfl_module_free): Free MOD itself. |
| 2435 | |
| 2436 | 2007-03-18 Roland McGrath <roland@redhat.com> |
| 2437 | |
| 2438 | * dwfl_module_getdwarf.c (find_debuglink): New function, broken out of |
| 2439 | (find_debuginfo): ... here. Call it. |
| 2440 | Don't return error for libelf errors finding .gnu_debuglink section. |
| 2441 | |
| 2442 | 2007-03-12 Roland McGrath <roland@redhat.com> |
| 2443 | |
| 2444 | * dwfl_module.c (dwfl_report_begin_add): New function broken out of ... |
| 2445 | (dwfl_report_begin): ... here. Call it. |
| 2446 | * libdwfl.h: Declare it. |
| 2447 | * libdwflP.h: Add INTDECL. |
| 2448 | |
| 2449 | * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo. |
| 2450 | |
| 2451 | * offline.c: Comment typo fix. |
| 2452 | |
| 2453 | 2007-03-04 Roland McGrath <roland@redhat.com> |
| 2454 | |
| 2455 | * linux-kernel-modules.c (KERNEL_MODNAME): New macro for "kernel". |
| 2456 | (find_kernel_elf): New function, broken out of ... |
| 2457 | (report_kernel): ... here. Call it. |
| 2458 | (dwfl_linux_kernel_find_elf): Use it for module named KERNEL_MODNAME. |
| 2459 | (intuit_kernel_bounds): New function, grovel /proc/kallsyms to guess |
| 2460 | virtual address bounds of kernel from symbols rounded to page size. |
| 2461 | (dwfl_linux_kernel_report_kernel): Use that if it works, before |
| 2462 | resorting to report_kernel. |
| 2463 | |
| 2464 | * dwfl_module_getdwarf.c (open_elf): Set MOD->e_type to ET_DYN for an |
| 2465 | ET_EXEC file with nonzero bias. |
| 2466 | |
| 2467 | * dwfl_module_addrname.c (dwfl_module_addrname): Just call |
| 2468 | dwfl_module_addrsym. Guts moved to ... |
| 2469 | * dwfl_module_addrsym.c: ... here; new file. |
| 2470 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 2471 | * libdwfl.h: Declare dwfl_module_addrsym. |
| 2472 | * libdwflP.h: Add INTDECL. |
| 2473 | |
| 2474 | 2007-03-03 Roland McGrath <roland@redhat.com> |
| 2475 | |
| 2476 | * dwfl_module.c (free_file): New function, broken out of ... |
| 2477 | (__libdwfl_module_free): ... here. In it, close fd after elf_end. |
| 2478 | |
| 2479 | * dwfl_module_getdwarf.c (open_elf): Close fd and reset to -1 |
| 2480 | on libelf failure. |
| 2481 | |
| 2482 | 2007-03-02 Roland McGrath <roland@redhat.com> |
| 2483 | |
| 2484 | * linux-kernel-modules.c: Fix bogus error test for asprintf call. |
| 2485 | |
| 2486 | 2007-02-02 Roland McGrath <roland@redhat.com> |
| 2487 | |
| 2488 | * dwfl_addrmodule.c (dwfl_addrmodule): Match a module's high boundary |
| 2489 | address exactly if it's no other module's low boundary. |
| 2490 | |
| 2491 | * dwfl_module_addrname.c (dwfl_module_addrname): If no symbol's value |
| 2492 | and size cover the address, select the closest symbol with st_size==0 |
| 2493 | that lies in the same section. |
| 2494 | |
| 2495 | 2007-01-29 Roland McGrath <roland@redhat.com> |
| 2496 | |
| 2497 | * dwfl_version.c (dwfl_version): Return PACKAGE_VERSION, |
| 2498 | not PACKAGE_STRING. |
| 2499 | |
| 2500 | 2007-01-20 Roland McGrath <roland@redhat.com> |
| 2501 | |
| 2502 | * relocate.c (__libdwfl_relocate_value): Treat section_address of -1 |
| 2503 | as omitted, not 0. |
| 2504 | * libdwfl.h (Dwfl_Callbacks): Update comment. |
| 2505 | * derelocate.c (cache_sections): Don't ignore sh_addr == 0 sections. |
| 2506 | * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address): |
| 2507 | For ignored missing section, use -1 instead of 0. |
| 2508 | * offline.c (dwfl_offline_section_address): Expect a call for 0. |
| 2509 | |
| 2510 | 2007-01-19 Roland McGrath <roland@redhat.com> |
| 2511 | |
| 2512 | * argp-std.c (parse_opt): For -e, reset DWFL->offline_next_address to |
| 2513 | zero so a lone -e foo.so is shown without address bias. |
| 2514 | |
| 2515 | 2007-01-10 Roland McGrath <roland@redhat.com> |
| 2516 | |
| 2517 | * linux-kernel-modules.c (report_kernel): Check asprintf return value |
| 2518 | directly instead of via side effect, to silence warn_unused_result. |
| 2519 | (dwfl_linux_kernel_report_offline): Likewise. |
| 2520 | (dwfl_linux_kernel_find_elf): Likewise. |
| 2521 | (dwfl_linux_kernel_module_section_address): Likewise. |
| 2522 | * find-debuginfo.c (try_open): Likewise. |
| 2523 | * linux-proc-maps.c (find_sysinfo_ehdr): Likewise. |
| 2524 | (dwfl_linux_proc_report): Likewise. |
| 2525 | |
| 2526 | * libdwfl.h (dwfl_begin): Require nonnull argument. |
| 2527 | |
| 2528 | 2006-12-27 Roland McGrath <roland@redhat.com> |
| 2529 | |
| 2530 | * dwfl_module.c (compare_modules): Fix address comparison to avoid |
| 2531 | signed overflow. Patch by Frank Ch. Eigler <fche@redhat.com>. |
| 2532 | |
| 2533 | 2006-10-30 Roland McGrath <roland@redhat.com> |
| 2534 | |
| 2535 | * dwfl_module.c (dwfl_report_module): Comment typo fix. |
| 2536 | |
| 2537 | 2006-09-05 Roland McGrath <roland@redhat.com> |
| 2538 | |
| 2539 | * derelocate.c (cache_sections): Use alloca instead of variable-sized |
| 2540 | auto array, in function already using alloca. |
| 2541 | |
| 2542 | 2006-08-14 Roland McGrath <roland@redhat.com> |
| 2543 | |
| 2544 | * linux-kernel-modules.c (try_kernel_name): If the call to |
| 2545 | dwfl_standard_find_debuginfo produces no results, try it again |
| 2546 | with NULL as DEBUGLINK_FILE to try *FNAME with .debug suffix. |
| 2547 | |
| 2548 | * find-debuginfo.c (DEFAULT_DEBUGINFO_PATH): Macro moved ... |
| 2549 | * libdwflP.h: ... to here. |
| 2550 | * linux-kernel-modules.c (try_kernel_name): Skip manual open if it |
| 2551 | repeats the first thing dwfl_standard_find_debuginfo will try. |
| 2552 | |
| 2553 | * linux-kernel-modules.c (MODULE_SECT_NAME_LEN): New macro. |
| 2554 | (dwfl_linux_kernel_module_section_address): If a /sys file is missing |
| 2555 | and the section name is >= MODULE_SECT_NAME_LEN, try truncating the |
| 2556 | section name. |
| 2557 | |
| 2558 | 2006-07-12 Ulrich Drepper <drepper@redhat.com> |
| 2559 | |
| 2560 | * cu.c: Adjust for internal_function_def removal. |
| 2561 | * dwfl_error.c: Likewise. |
| 2562 | * dwfl_module.c: Likewise. |
| 2563 | * dwfl_module_getdwarf.c: Likewise. |
| 2564 | * lines.c: Likewise. |
| 2565 | * relocate.c: Likewise. |
| 2566 | |
| 2567 | 2006-07-11 Ulrich Drepper <drepper@redhat.com> |
| 2568 | |
| 2569 | * dwfl_module.c (compare_modules): Don't return GElf_Sxword value, |
| 2570 | it can overflow the return value type. |
| 2571 | Patch by Tim Moore <timoore@redhat.com>. |
| 2572 | |
| 2573 | 2006-06-28 Roland McGrath <roland@redhat.com> |
| 2574 | |
| 2575 | * libdwfl.h: Cosmetic changes. |
| 2576 | |
| 2577 | * dwfl_line_comp_dir.c: New file. |
| 2578 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 2579 | * libdwfl.h: Declare dwfl_line_comp_dir. |
| 2580 | |
| 2581 | * dwfl_lineinfo.c (dwfl_lineinfo): Remove stray extern in defn. |
| 2582 | |
| 2583 | * dwfl_linecu.c: New file. |
| 2584 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 2585 | * libdwfl.h: Declare dwfl_linecu. |
| 2586 | |
| 2587 | * libdwflP.h (dwfl_linecu_inline): Function renamed from dwfl_linecu. |
| 2588 | (dwfl_linecu): Define as macro. |
| 2589 | |
| 2590 | * relocate.c (__libdwfl_relocate): Use dwfl_module_getsym. |
| 2591 | |
| 2592 | * dwfl_module_getdwarf.c (dwfl_module_getsymtab): New function. |
| 2593 | (dwfl_module_addrname): Function moved ... |
| 2594 | * dwfl_module_addrname.c: ... here, new file. |
| 2595 | * dwfl_module_getsym.c: New file. |
| 2596 | * Makefile.am (libdwfl_a_SOURCES): Add them. |
| 2597 | * libdwfl.h: Declare dwfl_module_getsymtab, dwfl_module_getsym. |
| 2598 | * libdwflP.h: Add INTDECLs. |
| 2599 | |
| 2600 | 2006-06-27 Roland McGrath <roland@redhat.com> |
| 2601 | |
| 2602 | * dwfl_module.c (dwfl_report_end): Whitespace fix. |
| 2603 | |
| 2604 | 2006-06-13 Roland McGrath <roland@redhat.com> |
| 2605 | |
| 2606 | * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo. |
| 2607 | Use __libdwfl_seterrno for elf_memory failure. |
| 2608 | |
| 2609 | 2006-05-22 Roland McGrath <roland@redhat.com> |
| 2610 | |
| 2611 | * dwfl_module_return_value_location.c |
| 2612 | (dwfl_module_return_value_location): Use __libdwfl_module_getebl. |
| 2613 | |
| 2614 | 2006-05-27 Ulrich Drepper <drepper@redhat.com> |
| 2615 | |
| 2616 | * libdwfl.h: Add extern "C". |
| 2617 | |
| 2618 | 2006-05-22 Ulrich Drepper <drepper@redhat.com> |
| 2619 | |
| 2620 | * cu.c (addrarange): Handle files without aranges information. |
| 2621 | |
| 2622 | 2006-05-16 Ulrich Drepper <drepper@redhat.com> |
| 2623 | |
| 2624 | * dwfl_addrmodule.c (dwfl_addrmodule): Also return NULL of |
| 2625 | ->modules is NULL. |
| 2626 | |
| 2627 | 2006-02-26 Roland McGrath <roland@redhat.com> |
| 2628 | |
| 2629 | * dwfl_version.c: New file. |
| 2630 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 2631 | * libdwfl.h: Declare dwfl_version. |
| 2632 | |
| 2633 | * offline.c (dwfl_report_offline): Account for dwfl_report_elf having |
| 2634 | aligned up from DWFL->offline_next_address when checking for overlap. |
| 2635 | |
| 2636 | 2005-12-22 Roland McGrath <roland@redhat.com> |
| 2637 | |
| 2638 | * argp-std.c (parse_opt): Call dwfl_end in failure cases. |
| 2639 | |
| 2640 | * linux-proc-maps.c (proc_maps_report): New function, broken out of ... |
| 2641 | (dwfl_linux_proc_report): ... here. Call it. |
| 2642 | (dwfl_linux_proc_maps_report): New function. |
| 2643 | * libdwfl.h: Declare it. |
| 2644 | * libdwflP.h: Add INTDECL. |
| 2645 | * argp-std.c (options, parse_opt): Grok -M/--linux-process-map. |
| 2646 | |
| 2647 | * dwfl_nextcu.c (dwfl_nextcu): Don't fail when dwfl_module_getdwarf |
| 2648 | failed with DWFL_E_NO_DWARF. |
| 2649 | |
| 2650 | 2005-11-26 Roland McGrath <roland@redhat.com> |
| 2651 | |
| 2652 | * dwfl_end.c (dwfl_end): Free the DWFL itself. |
| 2653 | |
| 2654 | 2005-11-25 Roland McGrath <roland@redhat.com> |
| 2655 | |
| 2656 | * dwfl_module_getdwarf.c (__libdwfl_module_getebl): New function. |
| 2657 | (load_dw): Use it. |
| 2658 | * dwfl_module_register_names.c (dwfl_module_register_names): Likewise. |
| 2659 | * libdwflP.h: Declare it. |
| 2660 | |
| 2661 | * dwfl_module_register_names.c: New file. |
| 2662 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 2663 | * libdwfl.h: Declare dwfl_module_register_names. |
| 2664 | |
| 2665 | 2005-11-21 Roland McGrath <roland@redhat.com> |
| 2666 | |
| 2667 | * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address): |
| 2668 | Don't leak malloc'd file name. |
| 2669 | If a /sys/.../sections file is missing and starts with ".init", |
| 2670 | try the variant with "_init" too; catches PPC64 kernel braindamage. |
| 2671 | |
| 2672 | 2005-11-15 Roland McGrath <roland@redhat.com> |
| 2673 | |
| 2674 | * libdwfl.h: Comment fixes. |
| 2675 | |
| 2676 | * dwfl_module_return_value_location.c: Add unlikely for error case. |
| 2677 | |
| 2678 | 2005-11-13 Roland McGrath <roland@redhat.com> |
| 2679 | |
| 2680 | * dwfl_return_value_location.c: New file. |
| 2681 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 2682 | * libdwfl.h: Declare dwfl_module_return_value_location. |
| 2683 | * libdwflP.h (DWFL_ERRORS): Add DWFL_E_WEIRD_TYPE. |
| 2684 | |
| 2685 | 2005-10-20 Roland McGrath <roland@redhat.com> |
| 2686 | |
| 2687 | * libdwflP.h (DWFL_ERRORS): New error UNKNOWN_MACHINE. |
| 2688 | * relocate.c (__libdwfl_relocate): Return DWFL_E_UNKNOWN_MACHINE |
| 2689 | instead of DWFL_E_BADRELTYPE if ebl_get_elfmachine yields EM_NONE. |
| 2690 | |
| 2691 | 2005-10-01 Roland McGrath <roland@redhat.com> |
| 2692 | |
| 2693 | * linux-kernel-modules.c (report_kernel): Return ENOENT if we fail |
| 2694 | with errno 0. |
| 2695 | |
| 2696 | 2005-09-19 Roland McGrath <roland@redhat.com> |
| 2697 | |
| 2698 | * linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use |
| 2699 | PRIx64 instead of PRIi64, lest addresses with high bits set overflow |
| 2700 | the signed integer reading; they will just have to be in hexadecimal. |
| 2701 | (dwfl_linux_kernel_module_section_address): Likewise. |
| 2702 | |
| 2703 | 2005-08-28 Ulrich Drepper <drepper@redhat.com> |
| 2704 | |
| 2705 | * Makefile.am (%.os): Use COMPILE.os. |
| 2706 | (COMPILE.os): Filter out gconv options. |
| 2707 | |
| 2708 | 2005-08-25 Roland McGrath <roland@redhat.com> |
| 2709 | |
| 2710 | * cu.c (__libdwfl_nextcu): Return success when dwarf_nextcu hits end. |
| 2711 | * dwfl_nextcu.c (dwfl_nextcu): Skip modules with no dwarf info. |
| 2712 | |
| 2713 | 2005-08-24 Roland McGrath <roland@redhat.com> |
| 2714 | |
| 2715 | * dwfl_lineinfo.c (dwfl_lineinfo): Add bias, don't subtract it. |
| 2716 | |
| 2717 | * argp-std.c [_MUDFLAP] (__libdwfl_argp_mudflap_options): New function, |
| 2718 | magic initializer to set -heur-stack-bound option. |
| 2719 | |
| 2720 | 2005-08-22 Roland McGrath <roland@redhat.com> |
| 2721 | |
| 2722 | * dwfl_validate_address.c: New file. |
| 2723 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 2724 | * libdwfl.h: Declare dwfl_validate_address. |
| 2725 | |
| 2726 | * derelocate.c (dwfl_module_relocate_address): Add INTDEF. |
| 2727 | * libdwflP.h: Add INTDECL. |
| 2728 | |
| 2729 | * dwfl_module_getdwarf.c (find_symtab): Use elf_getdata instead of |
| 2730 | elf_rawdata for symbol-related sections. |
| 2731 | |
| 2732 | * offline.c (dwfl_report_offline): Move offline_next_address outside |
| 2733 | module's range, in case it's an ET_EXEC using fixed segment locations. |
| 2734 | * libdwfl.h: Update comment. |
| 2735 | |
| 2736 | * dwfl_report_elf.c (dwfl_report_elf): Align BASE to first segment's |
| 2737 | required alignment. |
| 2738 | |
| 2739 | 2005-08-20 Roland McGrath <roland@redhat.com> |
| 2740 | |
| 2741 | * linux-kernel-modules.c (report_kernel): Take new argument PREDICATE, |
| 2742 | function to choose whether to report. |
| 2743 | (dwfl_linux_kernel_report_offline): Likewise. |
| 2744 | * libdwfl.h: Update decl. |
| 2745 | * argp-std.c (parse_opt): Update caller. |
| 2746 | |
| 2747 | * dwfl_getsrclines.c: New file. |
| 2748 | * dwfl_onesrcline.c: New file. |
| 2749 | * Makefile.am (libdwfl_a_SOURCES): Add them. |
| 2750 | * libdwfl.h: Declare dwfl_getsrclines, dwfl_onesrcline. |
| 2751 | |
| 2752 | * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't leak |
| 2753 | MODULESDIR[0]. Call fts_close on failure. |
| 2754 | |
| 2755 | * dwfl_module_getdwarf.c (load_dw): Take dwfl_file * instead of Elf *. |
| 2756 | Close ET_REL file descriptors after relocation. |
| 2757 | (find_dw): Update caller. |
| 2758 | * offline.c (dwfl_report_offline): Get the file into memory and close |
| 2759 | the file descriptor. |
| 2760 | |
| 2761 | * dwfl_module_getdwarf.c (find_debuginfo): Do nothing when |
| 2762 | MOD->debug.elf is already set. |
| 2763 | |
| 2764 | * find-debuginfo.c (try_open): Use TEMP_FAILURE_RETRY. |
| 2765 | (dwfl_standard_find_debuginfo): Fail on errors not ENOENT or ENOTDIR. |
| 2766 | |
| 2767 | * argp-std.c (options, parse_opt): Grok -K/--offline-kernel, use |
| 2768 | dwfl_linux_kernel_report_offline with offline_callbacks. |
| 2769 | |
| 2770 | * linux-kernel-modules.c (report_kernel): New function, broken out of |
| 2771 | ... |
| 2772 | (dwfl_linux_kernel_report_kernel): ... here. Use it. |
| 2773 | (dwfl_linux_kernel_report_offline): New function. |
| 2774 | * libdwfl.h: Declare it. |
| 2775 | * libdwflP.h: Add INTDECL. |
| 2776 | |
| 2777 | 2005-08-19 Roland McGrath <roland@redhat.com> |
| 2778 | |
| 2779 | Use standard debuginfo search path to look for vmlinux. |
| 2780 | * find-debuginfo.c (dwfl_standard_find_debuginfo): Don't check CRC if |
| 2781 | passed zero. |
| 2782 | * linux-kernel-modules.c (try_kernel_name): New function, broken out |
| 2783 | of ... |
| 2784 | (dwfl_linux_kernel_report_kernel): ... here. Use it. |
| 2785 | |
| 2786 | * argp-std.c (offline_callbacks): New variable. |
| 2787 | (parse_opt): Use it for -e. Allow multiple -e options. |
| 2788 | |
| 2789 | * offline.c: New file. |
| 2790 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 2791 | * libdwfl.h: Declare dwfl_offline_section_address, dwfl_report_offline. |
| 2792 | * libdwflP.h: Add INTDECLs. |
| 2793 | (OFFLINE_REDZONE): New macro. |
| 2794 | (struct Dwfl): New member `offline_next_address'. |
| 2795 | * dwfl_begin.c (dwfl_begin): Initialize it. |
| 2796 | * dwfl_module.c (dwfl_report_begin): Likewise. |
| 2797 | |
| 2798 | * dwfl_report_elf.c (dwfl_report_elf): Accept all types. When ET_REL, |
| 2799 | do a nominal absolute section layout starting at BASE. |
| 2800 | * libdwfl.h: Update comment. |
| 2801 | |
| 2802 | 2005-08-18 Roland McGrath <roland@redhat.com> |
| 2803 | |
| 2804 | * dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Do |
| 2805 | dwfl_module_getdwarf if necessary. |
| 2806 | |
| 2807 | * dwfl_report_elf.c (dwfl_report_elf): Permit ET_REL with BASE==0. |
| 2808 | * libdwfl.h: Update comment. |
| 2809 | |
| 2810 | * derelocate.c: New file. |
| 2811 | * Makefile.am (libdwfl_a_SOURCES): Add it. |
| 2812 | |
| 2813 | * libdwflP.h (struct Dwfl_Module): isrel -> e_type. |
| 2814 | * dwfl_report_elf.c (dwfl_report_elf): Initialize it. |
| 2815 | * dwfl_module_getdwarf.c (open_elf): Update initialization. |
| 2816 | (load_dw, dwfl_module_addrname): Update uses. |
| 2817 | * relocate.c (__libdwfl_relocate): Likewise. |
| 2818 | |
| 2819 | 2005-08-04 Roland McGrath <roland@redhat.com> |
| 2820 | |
| 2821 | * libdwfl.h (Dwfl_Callbacks.section_address): Take additional |
| 2822 | arguments SHNDX, SHDR. |
| 2823 | (dwfl_linux_kernel_module_section_address): Update prototype. |
| 2824 | * relocate.c (__libdwfl_relocate_value): Update caller. |
| 2825 | * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address): |
| 2826 | Take the new arguments. |
| 2827 | |
| 2828 | 2005-08-10 Roland McGrath <roland@redhat.com> |
| 2829 | |
| 2830 | * relocate.c (__libdwfl_relocate): Take argument DEBUGFILE, |
| 2831 | use it instead of MOD->debug.file. |
| 2832 | * libdwflP.h: Update decl. |
| 2833 | * dwfl_module_getdwarf.c (load_dw): Update caller. |
| 2834 | Fixes bug #165598. |
| 2835 | |
| 2836 | 2005-08-09 Roland McGrath <roland@redhat.com> |
| 2837 | |
| 2838 | * libdwflP.h: Include ../libdw/libdwP.h for its INTDECLs. |
| 2839 | * cu.c: Use INTUSE on dwarf_* calls. |
| 2840 | * dwfl_error.c: Likewise. |
| 2841 | * dwfl_module.c: Likewise. |
| 2842 | * dwfl_module_getdwarf.c: Likewise. |
| 2843 | * dwfl_module_getsrc_file.c: Likewise. |
| 2844 | * lines.c: Likewise. |
| 2845 | |
| 2846 | 2005-08-07 Roland McGrath <roland@redhat.com> |
| 2847 | |
| 2848 | * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): When module |
| 2849 | names contain '_' or '-', look for files named either "foo-bar.ko" |
| 2850 | or "foo_bar.ko". |
| 2851 | |
| 2852 | 2005-07-29 Roland McGrath <roland@redhat.com> |
| 2853 | |
| 2854 | * loc2c.c: File removed. |
| 2855 | * loc2c.h: File removed. |
| 2856 | * loc2c-runtime.h: File removed. |
| 2857 | * test2.c: File removed. |
| 2858 | * Makefile.am (EXTRA_DIST): Variable removed. |
| 2859 | (noinst_HEADERS): Remove loc2c.h from here. |
| 2860 | |
| 2861 | 2005-07-28 Ulrich Drepper <drepper@redhat.com> |
| 2862 | |
| 2863 | * libdwfl.h: Add a few missing extern for function prototypes. |
| 2864 | |
| 2865 | * libdwfl_crc32.c: New file. |
| 2866 | * libdwfl_crc32_file.c: New file. |
| 2867 | * libdwflP.h: Declare the new functions. |
| 2868 | * Makefile.am (libdwfl_a_SOURCES): Add libdwfl_crc32.c and |
| 2869 | libdwfl_crc32_file.c. |
| 2870 | * libdwfl/find-debuginfo.c (check_crc): Use __libdwfl_crc32_file |
| 2871 | instead of crc32_file. |
| 2872 | |
| 2873 | 2005-07-28 Roland McGrath <roland@redhat.com> |
| 2874 | |
| 2875 | * ptest.c: Moved to ../tests/dwflmodtest.c. |
| 2876 | |
| 2877 | * Makefile.am (noinst_PROGRAMS): Variable removed. |
| 2878 | (libdwfl_so_SOURCES, libdwfl_LIBS, libdwfl_so_LDADD): Likewise. |
| 2879 | (EXTRA_DIST, ptest_LDADD, test2_LDADD): Likewise. |
| 2880 | (libdwfl): Don't use libdwfl.so any more. |
| 2881 | (libdwfl.so, install, uninstall): Targets removed. |
| 2882 | (test2_SOURCES): Define EXTRA_DIST instead of this. |
| 2883 | * libdwfl.map: File removed. |
| 2884 | |
| 2885 | * libdwfl.h: Use "" for libdw.h #include. |
| 2886 | |
| 2887 | 2005-07-27 Roland McGrath <roland@redhat.com> |
| 2888 | |
| 2889 | * libdwfl.map: Add dwfl_getmodules. |
| 2890 | |
| 2891 | 2005-07-23 Ulrich Drepper <drepper@redhat.com> |
| 2892 | |
| 2893 | * Makefile.am: Fix rules to allow building with mudflap. |
| 2894 | |
| 2895 | 2005-07-21 Roland McGrath <roland@redhat.com> |
| 2896 | |
| 2897 | * Makefile.am (noinst_HEADERS): Add loc2c.c. |
| 2898 | |
| 2899 | * test2.c (main): Check sscanf result to quiet warning. |
| 2900 | |
| 2901 | 2005-07-20 Roland McGrath <roland@redhat.com> |
| 2902 | |
| 2903 | * libdwfl-branch merged, creating this direcotry. |