12021-10-20 John M Mellor-Crummey <johnmc@rice.edu> 2 3 * dwarf_linecontext.c: New file. 4 * dwarf_linefunctionname.c: Likewise. 5 * Makefile.am (libdw_a_SOURCES): Add dwarf_linecontext.c and 6 dwarf_linefunctionname.c 7 * dwarf.h: Add DW_LNE_NVIDIA_inlined_call and 8 DW_LNE_NVIDIA_set_function_name. 9 * dwarf_getsrclines.c (struct line_state): Add context and 10 function_name fields. 11 (add_new_line): Set context and function_name. 12 (MAX_STACK_LINES): Reduce to MAX_STACK_ALLOC / 2. 13 (read_srclines): Initialize context and function_name. Try to 14 read debug_str_offset if available. Handle 15 DW_LNE_NVIDIA_inlined_call and DW_LNE_NVIDIA_set_function_name. 16 * libdw.h (dwarf_linecontext): New declaration. 17 (dwarf_linefunctionname): Likewise. 18 * libdw.map (ELFUTILS_0.186): New section. 19 202021-11-08 Mark Wielaard <mark@klomp.org> 21 22 * dwarf_begin_elf.c (scn_dwarf_type): New function. 23 (check_section): Check result->type. 24 (global_read): First check type. 25 (scngrp_read): Likewise. 26 * libdw/libdwP.h (enum dwarf_type): New enumeration. 27 (struct Dwarf): New field type. 28 292021-02-14 Alexander Miller <alex.miller@gmx.de> 30 31 * dwarf_aggregate_size.c (dwarf_aggregate_size): Move NEW_VERSION 32 before definition. Replace INTDEF with NEW_INTDEF. 33 * dwarf_srclang.c (dwarf_srclang): Likewise. 34 * dwarf_arrayorder.c (dwarf_arrayorder): Move NEW_VERSION. 35 * dwarf_bitoffset.c (dwarf_bitoffset): Likewise. 36 * dwarf_bitsize.c (dwarf_bitsize): Likewise. 37 * dwarf_bytesize.c (dwarf_bytesize): Likewise. 38 * dwarf_decl_column.c (dwarf_decl_column): Likewise. 39 402021-10-18 Mark Wielaard <mark@klomp.org> 41 42 * dwarf_aggregate_size.c (get_type): Don't pass NULL to 43 dwarf_peel_type. 44 452021-10-06 Mark Wielaard <mark@klomp.org> 46 47 * dwarf_aggregate_size.c (array_size): Check signedness of child DIE 48 type. Use dwarf_formsdata or dwarf_formudata to get the lower and 49 upper bounds. 50 512021-09-08 Mark Wielaard <mark@klomp.org> 52 53 * dwarf_begin_elf.c (valid_p): Identify ELF class and use this to set 54 address_size of the fake CUs. Also set offset_size and DWARF version. 55 562021-09-06 Dmitry V. Levin <ldv@altlinux.org> 57 58 * dwarf_begin_elf.c (valid_p): Remove casts of malloc return values. 59 (dwarf_begin_elf): Remove cast of calloc return value. 60 * dwarf_getpubnames.c (get_offsets): Remove casts of realloc return 61 values. 62 * dwarf_getsrclines.c (read_srclines): Remove cast of malloc return 63 value. 64 652021-04-19 Martin Liska <mliska@suse.cz> 66 67 * dwarf_begin_elf.c (check_section): Use startswith. 68 692021-05-01 Mark Wielaard <mark@klomp.org> 70 71 * libdw_form.c (__libdw_form_val_compute_len): Check indirect 72 form is not DW_FORM_indirect or DW_FORM_implicit_const. 73 742021-04-23 Omar Sandoval <osandov@fb.com> 75 76 * dwarf_child.c (__libdw_find_attr): Handle DW_FORM_indirect. 77 * dwarf_getattrs.c (dwarf_getattrs): Handle DW_FORM_indirect. 78 792021-02-12 Mark Wielaard <mark@klomp.org> 80 81 * dwarf_getlocation.c (attr_ok): For DWARF version 4 or higher 82 block forms are not expression locations. 83 (is_constant_offset): DW_FORM_implicit_const is also a constant. 84 852020-12-20 Dmitry V. Levin <ldv@altlinux.org> 86 87 * .gitignore: New file. 88 892020-12-16 Dmitry V. Levin <ldv@altlinux.org> 90 91 * libdwP.h (_): Remove. 92 932020-12-12 Dmitry V. Levin <ldv@altlinux.org> 94 95 * dwarf.h: Fix spelling typo in comment. 96 * dwarf_begin_elf.c (dwarf_begin_elf): Likewise. 97 * dwarf_getlocation.c (attr_ok, __libdw_intern_expression): Likewise. 98 * dwarf_getsrclines.c (read_srclines): Likewise. 99 * libdw.h: Fix spelling typos in comments. 100 * libdwP.h: Likewise. 101 1022020-12-09 Dmitry V. Levin <ldv@altlinux.org> 103 104 * Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA. 105 (libdw_so_SOURCES): Remove. 106 (MOSTLYCLEANFILES): Add libdw.so. 107 1082020-11-30 Dmitry V. Levin <ldv@altlinux.org> 109 110 * Makefile.am (libdw.so$(EXEEXT)): Drop $(EXEEXT) suffix. 111 1122020-11-01 Érico N. Rolim <erico.erc@gmail.com> 113 114 * Makefile.am (libdw_so_LDLIBS): Add fts_LIBS. 115 1162020-10-28 Tom Tromey <tom@tromey.com> 117 118 PR26773 119 * dwarf_getlocation.c (store_implicit_value): Use 120 __libdw_get_uleb128_unchecked. 121 * memory-access.h (get_sleb128_step): Assume unsigned type for 122 'var'. 123 (__libdw_get_sleb128, __libdw_get_sleb128_unchecked): Work in 124 unsigned type. Handle final byte. 125 1262020-10-19 Mark Wielaard <mark@klomp.org> 127 128 * dwarf_frame_register.c (dwarf_frame_register): Declare ops_mem 129 as array of (at least) 3 elements. 130 * libdw.h (dwarf_frame_register): Add extra explanation of ops_mem 131 argument. 132 1332020-10-23 Tom Tromey <tom@tromey.com> 134 135 * memory-access.h (read_3ubyte_unaligned_inc): Call 136 read_3ubyte_unaligned. 137 1382020-09-03 Mark Wielaard <mark@klomp.org> 139 140 * dwarf.h: Add DW_CFA_AARCH64_negate_ra_state. 141 * cfi.h (struct Dwarf_CFI_s): Add e_machine field. 142 * cfi.c (execute_cfi): Recognize, but ignore 143 DW_CFA_AARCH64_negate_ra_state on aarch64. 144 * dwarf_getcfi.c (dwarf_getcfi): Set cfi e_machine. 145 * dwarf_getcfi_elf.c (allocate_cfi): Take ehdr as argument and set 146 cfi e_machine. 147 (getcfi_gnu_eh_frame): Pass ehdr to allocate_cfi. 148 (getcfi_scn_eh_frame): Likewise. 149 1502020-09-03 Mark Wielaard <mark@klomp.org> 151 152 * libdw.map (ELFUTILS_0.126): Remove local wildcard. 153 (ELFUTILS_0.127): Likewise. 154 (ELFUTILS_0.130): Likewise. 155 (ELFUTILS_0.136): Likewise. 156 (ELFUTILS_0.138): Likewise. 157 1582020-08-25 Mark Wielaard <mark@klomp.org> 159 160 * dwarf_getlocation.c (check_constant_offset): Rename to... 161 (is_constant_offset): .. this. 162 1632020-06-28 Mark Wielaard <mark@klomp.org> 164 165 * linux-kernel-modules.c (intuit_kernel_bounds): Check read_address 166 returns an increasing address when searching for end. 167 1682020-06-16 Mark Wielaard <mark@klomp.org> 169 170 * cfi.c (execute_cfi): Add missing FALLTHROUGH. 171 1722020-05-08 Mark Wielaard <mark@klomp.org> 173 174 * libdw_visit_scopes.c (walk_children): Don't recurse into imported 175 DW_TAG_compile_units. 176 1772020-05-08 Mark Wielaard <mark@klomp.org> 178 179 * dwarf_decl_file.c (dwarf_decl_file): Use attr CU instead of DIE 180 CU to resolve file name. 181 * dwarf_ranges.c(dwarf_ranges): Document which CU we use when. 182 * libdw.h (dwarf_attr_integrate): Extend documentation. 183 1842020-04-25 Mark Wielaard <mark@klomp.org> 185 186 * libdw_alloc.c (__libdw_alloc_tail): Call Dwarf oom_handler() 187 when malloc fails. 188 1892020-04-17 Mark Wielaard <mark@klomp.org> 190 191 * dwarf_begin_elf.c (check_section): Handle .gnu.debuglto_ prefix. 192 1932019-10-28 Aaron Merey <amerey@redhat.com> 194 195 * Makefile.am (libdw_so_LDLIBS): Add -ldl for libdebuginfod.so dlopen. 196 1972019-11-10 Mark Wielaard <mark@klomp.org> 198 199 * libdwP.h (libdw_unalloc): New define. 200 (libdw_typed_unalloc): Likewise. 201 (__libdw_thread_tail): New function declaration. 202 * libdw_alloc.c (__libdw_thread_tail): New function. 203 * dwarf_getabbrev.c (__libdw_getabbrev): Call libdw_typed_unalloc 204 when reading invalid data or when hash collission detected. 205 2062019-10-28 Jonathon Anderson <jma14@rice.edu> 207 208 * libdw_alloc.c: Added __libdw_alloc_tail. 209 (__libdw_allocate): Switch to use the mem_tails array. 210 * libdwP.h (Dwarf): Likewise. 211 * dwarf_begin_elf.c (dwarf_begin_elf): Support for above. 212 * dwarf_end.c (dwarf_end): Likewise. 213 * atomics.h: Add support for thread_local. 214 2152019-10-28 Mark Wielaard <mark@klomp.org> 216 217 * dwarf_sig8_hash.h: Include libdw.h. Remove COMPARE. Include 218 dynamicsizehash_concurrent.h. 219 * dwarf_sig8_hash.c: Include dynamicsizehash_concurrent.c. 220 * dwarf_formref_die.c (dwarf_formref_die): Drop NULL argument to 221 Dwarf_Sig8_Hash_find. 222 2232019-08-26 Srđan Milaković <sm108@rice.edu@rice.edu> 224 225 * dwarf_abbrev_hash.{c,h}: Use the *_concurrent hash table. 226 2272019-11-01 Jonathon Anderson <jma14@rice.edu> 228 229 * dwarf_begin_elf.c (valid_p): Switch calloc for malloc for fake CUs. 230 Add explicit initialization of some fields. 231 * dwarf_end.c (cu_free): Add clause to limit freeing of CU internals. 232 2332019-08-26 Jonathon Anderson <jma14@rice.edu> 234 235 * libdw_alloc.c (__libdw_allocate): Added thread-safe stack allocator. 236 * libdwP.h (Dwarf): Likewise. 237 * dwarf_begin_elf.c (dwarf_begin_elf): Support for above. 238 * dwarf_end.c (dwarf_end): Likewise. 239 * Makefile.am: Use -pthread to provide rwlocks. 240 2412019-07-05 Omar Sandoval <osandov@fb.com> 242 243 * Makefile.am (libdw_so_LIBS): Replace libebl.a with libebl_pic.a. 244 Move libebl_pic.a to the beginning so that libdw symbols are resolved. 245 (libdw_so_LDLIBS): Remove -ldl. 246 (libdw.so): Remove -rpath. 247 (libdw_a_LIBADD): Add libebl, libebl_backends, and libcpu objects. 248 2492019-08-25 Jonathon Anderson <jma14@rice.edu> 250 251 * dwarf_getcfi.c (dwarf_getcfi): Set default_same_value to false. 252 2532019-08-12 Mark Wielaard <mark@klomp.org> 254 255 * libdw.map (ELFUTILS_0.177): Add new version of dwelf_elf_begin. 256 2572019-06-28 Mark Wielaard <mark@klomp.org> 258 259 * libdw.map (ELFUTILS_0.177): New section. Add 260 dwelf_elf_e_machine_string. 261 2622019-05-16 Mark Wielaard <mark@klomp.org> 263 264 * dwarf.h: Add DW_AT_GNU_numerator, DW_AT_GNU_denominator and 265 DW_AT_GNU_bias. 266 2672019-04-28 Mark Wielaard <mark@klomp.org> 268 269 * dwarf_siblingof.c (dwarf_siblingof): Don't initialize addr. 270 2712019-04-28 Mark Wielaard <mark@klomp.org> 272 273 * dwarf_getlocation.c (dwarf_getlocation_addr): Call 274 check_constant_offset with llbufs and listlens directly. 275 2762019-04-27 Mark Wielaard <mark@klomp.org> 277 278 * dwarf_getlocation.c (store_implicit_value): Check dbg isn't 279 NULL. 280 2812019-02-02 Mark Wielaard <mark@klomp.org> 282 283 * dwarf_nextcu.c (__libdw_next_unit): Define bytes_end. 284 Check there are enough bytes to read extended length, version 285 and unit. 286 2872019-01-20 Mark Wielaard <mark@klomp.org> 288 289 * dwarf_getsrclines.c (read_srclines): Check terminating NUL byte 290 for dir and file lists. 291 2922018-10-23 Mark Wielaard <mark@klomp.org> 293 294 * dwarf_child.c (__libdw_find_attr): Initialize readp to NULL. 295 * dwarf_getattrs.c (dwarf_getattrs): Initialize die_addr to NULL. 296 2972018-10-20 Mark Wielaard <mark@klomp.org> 298 299 * libdw.map (ELFUTILS_0.175): New section. Add dwelf_elf_begin. 300 3012018-10-29 Milian Wolff <milian.wolff@kdab.com> 302 303 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type != SHT_NOBITS. 304 3052018-09-13 Mark Wielaard <mark@klomp.org> 306 307 * dwarf_begin_elf.c (check_section): Drop ehdr argument, add and 308 use shstrndx argument. 309 (global_read): Likewise. 310 (scngrp_read): Likewise. 311 (dwarf_begin_elf): Call elf_getshdrstrndx. Pass shstrndx to 312 global_read or scngrp_read. 313 3142018-08-18 Mark Wielaard <mark@klomp.org> 315 316 * dwarf_getabbrev.c (__libdw_getabbrev): Continue until both name 317 and form are zero. 318 * dwarf_hasattr.c (dwarf_hasattr): Stop when both name and form 319 are zero. 320 3212018-08-18 Mark Wielaard <mark@klomp.org> 322 323 * dwarf_getaranges.c (dwarf_getaranges.c): Make sure there is enough 324 data to read the address and segment size. 325 3262018-07-04 Ross Burton <ross.burton@intel.com> 327 328 * libdw_alloc.c: Remove error.h include. 329 3302018-06-28 Mark Wielaard <mark@klomp.org> 331 332 * dwarf_next_cfi.c (dwarf_next_cfi): Check whether length is zero. 333 3342018-06-27 Mark Wielaard <mark@klomp.org> 335 336 * dwarf_begin_elf.c (check_section): Allow a single .debug_frame 337 section. 338 3392018-06-26 Mark Wielaard <mark@klomp.org> 340 341 * libdw.h (dwarf_getscn_info): Remove. 342 * libdw.map (ELFUTILS_0.122): Remove dwarf_getscn_info. 343 3442018-06-25 Mark Wielaard <mark@klomp.org> 345 346 * Makefile.am (libdw_a_SOURCES): Add dwarf_next_lines.c. 347 * libdw.h (dwarf_next_lines): New function declaration. 348 * libdw.map (ELFUTILS_0.173): New section. 349 * dwarf_next_lines.c: New files. 350 * dwarf_begin_elf.c (check_section): Don't error out when elf 351 decompression fails. 352 (valid_p): Allow just a single .debug_line section. 353 * dwarf_getsrclines.c (read_srclines): Keep files relative if comp_dir 354 is missing. 355 3562018-06-22 Mark Wielaard <mark@klomp.org> 357 358 * dwarf_nextcu.c (__libdw_next_unit): Set next_off to -1 when it would 359 wrap around. 360 3612018-06-18 Mark Wielaard <mark@klomp.org> 362 363 * dwarf_aggregate_size.c (array_size): New depth argument. Use 364 aggregate_size instead of dwarf_aggregate_size and pass depth. 365 (aggregate_size): New depth argument. Check depth isn't bigger 366 than MAX_DEPTH (256). Pass depth to recursive calls. 367 (dwarf_aggregate_size): ass zero as depth to aggregate_size. 368 3692018-06-18 Mark Wielaard <mark@klomp.org> 370 371 * dwarf_peel_type.c (dwarf_peel_type): Limit modifier chain to 64. 372 3732018-06-18 Mark Wielaard <mark@klomp.org> 374 375 * dwarf_aggregate_size.c (aggregate_size): Check die is not NULL. 376 3772018-06-17 Luiz Angelo Daros de Luca <luizluca@gmail.com> 378 379 * dwarf_getsrclines.c (read_srclines): Intialize filelist early. 380 3812018-06-15 Mark Wielaard <mark@klomp.org> 382 383 * dwarf_getlocation.c (check_constant_offset): Clarify DW_FORM_data16 384 isn't really a constant. 385 (dwarf_getlocation): Don't handle DW_FORM_data16 as block. 386 (dwarf_getlocation_addr): Likewise. 387 (dwarf_getlocations): Likewise. 388 3892018-06-12 Mark Wielaard <mark@klomp.org> 390 391 * memory-access.h (read_3ubyte_unaligned_inc): New define. 392 3932018-06-12 Mark Wielaard <mark@klomp.org> 394 395 * libdw.h (__libdw_dieabbrev): Set die->abbrev to DWARF_END_ABBREV 396 on failure. 397 3982018-06-10 Mark Wielaard <mark@klomp.org> 399 400 * dwarf_attr_integrate.c (dwarf_attr_integrate): Stop after 16 DIE 401 ref chains. 402 * dwarf_hasattr_integrate.c (dwarf_hasattr_integrate): Likewise. 403 4042018-06-08 Mark Wielaard <mark@klomp.org> 405 406 * dwarf_getabbrev.c (dwarf_getabbrev): Check die and offset. 407 4082018-06-08 Mark Wielaard <mark@klomp.org> 409 410 * dwarf_get_units.c (dwarf_get_units): Handle existing error, no 411 dwarf. 412 4132018-06-08 Mark Wielaard <mark@klomp.org> 414 415 * dwarf_getlocation.c (store_implicit_value): Return error when 416 seeing bad DWARF or when tsearch runs out of memory. 417 (__libdw_intern_expression): Report error when store_implicit_value 418 reported an error. 419 4202018-06-08 Mark Wielaard <mark@klomp.org> 421 422 * dwarf_getsrclines.c (read_srclines): Sanity check ndirs and nfiles. 423 4242018-06-08 Mark Wielaard <mark@klomp.org> 425 426 * dwarf_getlocation_attr.c (addr_valp): Set error and return NULL 427 when there is no .debug_addr section. 428 (dwarf_getlocation_attr): If addr_valp returns NULL, then return -1. 429 4302018-06-07 Mark Wielaard <mark@klomp.org> 431 432 * libdw_findcu.c (__libdw_intern_next_unit): Report DWARF_E_VERSION, 433 not DWARF_E_INVALID_DWARF on unknown version. Set address_size and 434 offset_size to 8 when unknown. 435 4362018-06-06 Mark Wielaard <mark@klomp.org> 437 438 * libdwP.h (__libdw_dieabbrev): Check DIE addr falls in cu. 439 4402018-06-06 Mark Wielaard <mark@klomp.org> 441 442 * dwarf_getlocation_die.c (dwarf_getlocation_die): Check offset 443 falls inside cu data. 444 4452018-06-05 Mark Wielaard <mark@klomp.org> 446 447 * dwarf_getsrclines.c (read_srclines): Explicitly set diridx to -1 448 in case dwarf_formudata fails. 449 4502018-06-05 Mark Wielaard <mark@klomp.org> 451 452 * dwarf_getaranges (dwarf_getaranges): Free new_arange if 453 __libdw_findcu fails. 454 4552018-06-05 Mark Wielaard <mark@klomp.org> 456 457 * dwarf_getsrclines.c (read_srclines): Define dirarray early and 458 check whether or not it is equal to dirstack on exit/out before 459 cleanup. 460 4612018-06-05 Mark Wielaard <mark@klomp.org> 462 463 * dwarf_getalt.c (find_debug_altlink): id_path array should be 2 464 larger to contain MAX_BUILD_ID_BYTES. 465 4662018-05-31 Mark Wielaard <mark@klomp.org> 467 468 * libdw_find_split_unit.c (try_split_file): New function extracted 469 from... 470 (__libdw_find_split_unit): ... here. Try both the relative and 471 absolute paths to find a .dwo file. 472 4732018-05-30 Mark Wielaard <mark@klomp.org> 474 475 * libdw/dwarf_getsrclines.c (read_srclines): Change ndir and 476 ndirlist to size_t. Add check to see ndirlist doesn't overflow. 477 4782018-05-31 Mark Wielaard <mark@klomp.org> 479 480 * dwarf_dieoffset.c: Check die->cu != NULL. Return -1, not ~0ul 481 on failure. 482 4832018-05-29 Mark Wielaard <mark@klomp.org> 484 485 * dwarf_cuoffset.c (dwarf_cuoffset): Check die->cu is not NULL. 486 * dwarf_die_addr_die.c (dwarf_die_addr_die): Also search split 487 Dwarfs. 488 * libdwP.h (struct Dwarf): Add split_tree field. 489 (__libdw_find_split_dbg_addr): New internal function definition. 490 (__libdw_finddbg_cb): Likewise. 491 * libdw_find_split_unit.c (__libdw_find_split_unit): Insert split 492 Dwarf into skeleton dbg split_tree. 493 * libdw_findcu.c (__libdw_finddbg_cb): New function. 494 (__libdw_find_split_dbg_addr): Likewise. 495 * dwarf_end (dwarf_end): Destroy split_tree. 496 4972018-05-29 Mark Wielaard <mark@klomp.org> 498 499 * dwarf.h: Add GNU DebugFission list entry encodings 500 DW_LLE_GNU_end_of_list_entry, 501 DW_LLE_GNU_base_address_selection_entry, 502 DW_LLE_GNU_start_end_entry and DW_LLE_GNU_start_length_entry. 503 * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Handle 504 GNU DebugFission list entries. 505 5062018-05-28 Mark Wielaard <mark@klomp.org> 507 508 * libdw_find_split_unit.c (__libdw_find_split_unit): End split_dwarf 509 only after we tried every unit id in it. 510 5112018-04-07 Mark Wielaard <mark@klomp.org> 512 513 * libdwP.h (struct Dwarf_CU): Add locs_base. 514 (__libdw_cu_locs_base): New static inline function. 515 * libdw_findcu.c (__libdw_intern_next_unit): Initialize locs_base. 516 * dwarf_begin_elf.c (valid_p): Create fake_loclists_cu if necessary. 517 * dwarf_end.c (dwarf_end): Clean up fake_loclists_cu. 518 * dwarf_getlocation.c (initial_offset): Handle .debug_loclists. 519 (getlocations_addr): Likewise. 520 (dwarf_getlocation_addr): Likewise. 521 * dwarf_getlocation_attr.c (attr_form_cu): Use fake_loclists_cu for 522 DWARF5. 523 (initial_offset): Handle DW_FORM_loclistx. 524 * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Handle 525 .debug_loclists. 526 * libdwP.h (struct Dwarf): Add fake_loclists_cu. 527 5282018-04-12 Mark Wielaard <mark@klomp.org> 529 530 * dwarf.h: Add DWARF5 location list entry DW_LLE encodings. 531 * begin_elf.c (dwarf_scnnames): Add IDX_debug_loclists. 532 * dwarf_error.c (errmsgs): Remove DWARF_E_NO_LOCLIST. And replace 533 with DWARF_E_NO_DEBUG_LOC, DWARF_E_NO_DEBUG_LOCLISTS and 534 DWARF_E_NO_LOC_VALUE. 535 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_loclists_base 536 and DW_FORM_loclistx. 537 * dwarf_getlocation.c (attr_ok): Use DWARF_E_NO_LOC_VALUE. 538 (initial_offset): Use DWARF_E_NO_DEBUG_LOC. 539 * libdwP.h: Add IDX_debug_rnglists. Remove DWARF_E_NO_LOCLIST. 540 Add DWARF_E_NO_DEBUG_LOC, DWARF_E_NO_DEBUG_LOCLISTS and 541 DWARF_E_NO_LOC_VALUE. 542 5432018-05-25 Mark Wielaard <mark@klomp.org> 544 545 * libdw_find_split_unit.c (__libdw_find_split_unit): Extract linking 546 skeleton and split compile units code into... 547 * libdwP (__libdw_link_skel_split): ...this new function. 548 5492018-04-06 Mark Wielaard <mark@klomp.org> 550 551 * dwarf_formaddr.c (__libdw_addrx): New function, extracted from... 552 (dwarf_formaddr): here. Use __libdw_addrx. 553 * dwarf_getlocation.c (getlocations_addr): Pass cu to 554 __libdw_read_begin_end_pair_inc. 555 * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Take cu as 556 argument. Handle .debug_rnglists. 557 (initial_offset): Handle .debug_rnglists and DW_FORM_rnglistx. 558 (dwarf_ranges): Likewise. Check cu isn't NULL before use. Pass cu to 559 __libdw_read_begin_end_pair_inc. 560 * libdwP.h (__libdw_read_begin_end_pair_inc): Take cu as argument. 561 (__libdw_cu_ranges_base): Handle DW_AT_rnglists_base. 562 (__libdw_addrx): New function definition. 563 5642018-04-11 Mark Wielaard <mark@klomp.org> 565 566 * dwarf.h: Add DWARF5 range list entry DW_RLE encodings. 567 * begin_elf.c (dwarf_scnnames): Add IDX_debug_rnglists. 568 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_RNGLISTS. 569 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_rnglists_base 570 and DW_FORM_rnglistx. 571 * dwarf_getscopes.c (pc_match): Also check for 572 DWARF_E_NO_DEBUG_RNGLISTS. 573 * libdwP.h: Add IDX_debug_rnglists. 574 5752018-05-25 Mark Wielaard <mark@klomp.org> 576 577 * dwarf_getlocation_attr.c (__libdw_cu_addr_base): Cast offset to 578 uintptr_t before returning as pointer. 579 5802018-05-22 Mark Wielaard <mark@klomp.org> 581 582 * dwarf_getlocation.c (__libdw_cu_base_address): Treat errors of 583 getting lowpc or entrypc the same as missing base address (zero). 584 * dwarf_highpc (dwarf_highpc): Handle any address form. Always set 585 error when attribute could not be found. 586 5872018-05-21 Mark Wielaard <mark@klomp.org> 588 589 * dwarf_begin_elf.c (valid_p): Add a fake_addr_cu to the result. 590 * dwarf_end.c (cu_free): Disconnect the fake_addr_cu from the split 591 dwarf if shared with skeleton. 592 (dwarf_end): release fake_addr_cu. 593 * dwarf_formaddr.c (__libdw_cu_addr_base): Move to... 594 * libdwP.h (__libdw_cu_addr_base): ... here. 595 (struct Dwarf): Add fake_addr_cu field. 596 * dwarf_formudata.c (dwarf_formudata): Handle 597 DW_FORM_GNU_addr_index and DW_FORM_addrx[1234]. 598 * dwarf_getlocation_attr.c (addr_valp): New static function. 599 (dwarf_getlocation_attr): Create attribute for values of 600 DW_OP_GNU_const_index, DW_OP_constx and DW_OP_GNU_addr_index and 601 DW_OP_addrx. 602 * libdw_find_split_unit.c (__libdw_find_split_unit): Connect 603 IDX_debug_addr sectiondata and fake_addr_cu between split and 604 skeleton. 605 6062018-05-20 Mark Wielaard <mark@klomp.org> 607 608 * dwarf_cu_info.c: New file. 609 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_info.c. 610 * libdw.h (dwarf_cu_info): New function declaration. 611 * libdw.map (ELFUTILS_0.171): Add dwarf_cu_info. 612 6132018-05-24 Mark Wielaard <mark@klomp.org> 614 615 * dwarf_ranges.c (dwarf_ranges): Check for NULL cu. 616 * libdw_findcu.c (__libdw_intern_next_unit): Initialize ranges_base. 617 6182018-05-18 Mark Wielaard <mark@klomp.org> 619 620 * dwarf_formudata.c (__libdw_formptr): Handle the special case 621 of IDX_debug_ranges for DW_UT_split_compile with version < 5. 622 * dwarf_highpc.c (dwarf_highpc): Use dwarf_lowpc, check for 623 split compile cudie. 624 * dwarf_lowpc.c (dwarf_lowpc): Check for split compile cudie. 625 * dwarf_ranges.c (dwarf_ranges): Switch cu and sectiondata for 626 split compile units. 627 * libdwP.h (struct Dwarf_CU): Add ranges_base field. 628 (__libdw_cu_ranges_base): New static inline function. 629 6302018-05-18 Mark Wielaard <mark@klomp.org> 631 632 * libdw_findcu.c (__libdw_intern_next_unit): Init files to NULL. 633 * dwarf_getsrclines.c (dwarf_getsrclines): Handle split units by 634 taking the line table from the skeleton. 635 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Handle split units by 636 only taking the files from .debug_line offset zero (if it exists), 637 otherwise fall back to the skeleton. 638 6392018-05-17 Mark Wielaard <mark@klomp.org> 640 641 * dwarf_begin_elf.c (__libdw_debugdir): New function. 642 (valid_p): Call __libdw_debugdir. 643 * dwarf_end.c (dwarf_end.c): Free debugdir. 644 * dwarf_getalt.c (__libdw_filepath): Extract __libdw_debugdir logic. 645 take debugdir as argument instead of fd. 646 (find_debug_altlink): Call __libdw_filepath with debugdir. 647 * libdwP.h (struct Dwarf): Add debugdir field. 648 (__libdw_debugdir): New function prototype. 649 (__libdw_filepath): Adjust prototype to take a const char * instead of 650 an int. 651 * libdw_find_split_unit.c (__libdw_find_split_unit): Call 652 __libdw_filepath with debugdir. 653 6542018-05-17 Mark Wielaard <mark@klomp.org> 655 656 * dwarf_attr_integrate.c (dwarf_attr_integrate): Handle split_compile 657 unit DIE, search skeleton_compile unit DIE. 658 * dwarf_hasattr_integrate.c (dwarf_hasattr_integrate): Likewise. 659 * libdwP.h (is_cudie): Check cu is not NULL. 660 6612018-05-19 Mark Wielaard <mark@klomp.org> 662 663 * libdwP.h (__libdw_find_split_unit): Mark as internal_function. 664 6652018-05-15 Mark Wielaard <mark@klomp.org> 666 667 * Makefile.am (libdw_a_SOURCES): Add libdw_find_split_unit.c. 668 * dwarf_end.c (cu_free): Free split Dwarf. 669 * dwarf_get_units.c (dwarf_get_units): Handle DW_UT_skeleton by 670 calling __libdw_find_split_unit. 671 * libdwP.h (struct Dwarf_CU): Add split Dwarf_CU field. 672 (__libdw_find_split_unit): New function prototype. 673 (str_offsets_base_off): Use cu Dwarf if dbg is NULL. 674 (filepath): Rename to ... 675 (__libdw_filepath): This. Which is the actual function name in 676 dwarf_getalt.c. 677 (libdw_find_split_unit.c): New file. 678 * libdw_findcu.c (__libdw_intern_next_unit): Initialize split to -1. 679 6802018-05-15 Mark Wielaard <mark@klomp.org> 681 682 * libdwP.h (__libdw_first_die_from_cu_start): Adjust commented out 683 asserts. 684 * libdw_findcu.c (__libdw_intern_next_unit): For version 4 DWARF if 685 the cudie has a DW_AT_GNU_dwi_id set the unit_id8 and unit_type to 686 DW_UT_skeleton or DW_UT_split_compile based on whether the cudie has 687 child DIEs and a DW_AT_GNU_dwo_name attribute. 688 6892018-05-14 Mark Wielaard <mark@klomp.org> 690 691 * dwarf.h: Add GNU Debug Fission extensions. DW_AT_GNU_dwo_name, 692 DW_AT_GNU_dwo_id, DW_AT_GNU_ranges_base, DW_AT_GNU_addr_base, 693 DW_AT_GNU_pubnames, DW_AT_GNU_pubtypes. DW_FORM_GNU_addr_index, 694 DW_FORM_GNU_str_index. DW_OP_GNU_addr_index, DW_OP_GNU_const_index. 695 * dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_GNU_addr_index 696 as DW_FORM_addrx. 697 (__libdw_cu_addr_base): Check for both DW_AT_GNU_addr_base and 698 DW_AT_addr_base. 699 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_str_index 700 as DW_FORM_strx. 701 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_addr_base 702 as addrptr. Recognize DW_AT_GNU_ranges_base as rangelistptr. 703 * dwarf_getlocation.c (__libdw_intern_expression): Handle 704 DW_OP_GNU_addr_index as DW_OP_addrx and DW_OP_GNU_const_index as 705 DW_OP_constx. 706 * libdw_form.c (__libdw_form_val_compute_len): Handle 707 DW_FORM_GNU_addr_index and DW_FORM_GNU_str_index taking an uleb128. 708 7092018-05-12 Mark Wielaard <mark@klomp.org> 710 711 * dwarf_begin_elf.c (check_section): Also recognize .dwo section 712 name variants. 713 7142018-05-11 Mark Wielaard <mark@klomp.org> 715 716 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_macros as macptr. 717 * dwarf_getmacros.c (get_table_for_offset): Add DW_MACRO_define_sup, 718 DW_MACRO_undef_sup, DW_MACRO_import_sup, DW_MACRO_define_strx and 719 DW_MACRO_undef_strx. Add str_offsets_base_off to fake CU. Deal with 720 DW_AT_macros. Use libdw_valid_user_form. 721 7222018-05-09 Mark Wielaard <mark@klomp.org> 723 724 * dwarf_formstring.c (__libdw_cu_str_off_base): Moved to... 725 * libdwP.h (__libdw_cu_str_off_base): ...here. Make static inline. 726 (str_offsets_base_off): New internal function that also parses 727 .debug_str_offsets header if necessary. 728 7292018-05-11 Mark Wielaard <mark@klomp.org> 730 731 * dwarf_siblingof.c (dwarf_siblingof): Don't reference cu till it is 732 known the Dwarf_Die is came from is valid. 733 * libdwP.h (__libdw_dieabbrev): Check cu is not NULL. 734 7352018-05-08 Mark Wielaard <mark@klomp.org> 736 737 * dwarf_formref.c (__libdw_formref): Explicitly don't handle 738 DW_FORM_ref_sup4 and DW_FORM_ref_sup8. 739 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_ref_sup4 740 and DW_FORM_ref_sup8. 741 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strp_sup 742 as DW_FORM_GNU_strp_alt. 743 7442018-05-05 Mark Wielaard <mark@klomp.org> 745 746 * dwarf.h: Add DWARF line content descriptions. 747 * libdwP.h (libdw_valid_user_form): New static function. 748 * dwarf_getsrclines.c (read_srclines): Check and parse version 5 749 DWARF header, dir and file tables separately from older versions 750 where different. 751 7522018-04-24 Mark Wielaard <mark@klomp.org> 753 754 * dwarf_begin_elf.c (dwarf_scnnames): Add ".debug_line_str". 755 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_STR and 756 DWARF_E_NO_DEBUG_LINE_STR. 757 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_line_strp. 758 Get data from either .debug_str or .debug_line_str. 759 * libdwP.h: Add IDX_debug_line_str, DWARF_E_NO_DEBUG_STR and 760 DWARF_E_NO_DEBUG_LINE_STR. 761 7622018-04-03 Mark Wielaard <mark@klomp.org> 763 764 * dwarf_formudata.c (__libdw_formptr): Take and return const 765 unsigned char pointers. 766 * dwarf_getlocation.c (attr_base_address): Rename to... 767 (__libdw_cu_base_address): this. Take Dwarf_CU, check and set 768 base_address. 769 (initial_offset_base): Renamed to... 770 (initial_offset): this. Only provide offset. 771 (getlocations_addr): Move data size check and 772 address base addition into __libdw_read_begin_end_pair_inc. Use 773 __libdw_cu_base_address and initial_offset. Drop Elf_Data NULL 774 check (already done by initial_offset, through __libdw_formptr). 775 (dwarf_getlocations): Use __libdw_cu_base_address and initial_offset. 776 Drop Elf_Data NULL check. 777 * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Change argument 778 type of readp to Add readend argument. Check data size. Include base 779 in begin and end result. 780 (initial_offset): New static function. 781 (dwarf_ranges): Don't check Elf_Data being NULL (already done by 782 initial_offset, through __libdw_formptr). Use __libdw_cu_base_address 783 and initial_offset. Remove base check and addition (already done by 784 __libdw_read_begin_end_pair_inc. 785 * libdwP.h (Dwarf_CU): Add base_address field. 786 (__libdw_read_begin_end_pair_inc): Change argument type of readp to 787 const. Add readend argument. 788 (__libdw_formptr): Take and return const unsigned char pointers. 789 * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU 790 base_address. 791 7922018-04-04 Mark Wielaard <mark@klomp.org> 793 794 * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU 795 addr_base and str_off_base. 796 7972018-03-23 Mark Wielaard <mark@klomp.org> 798 799 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_str_offsets, 800 increase size. 801 * dwarf_error.c (errmsgs): Add DWARF_E_NO_STR_OFFSETS. 802 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strx[1234]. 803 (__libdw_cu_str_off_base): New function. 804 * dwarf_formudata.c (dwarf_formudata): Handle IDX_debug_str_offsets 805 as stroffsetsptr. 806 * libdwP.h: Add IDX_debug_str_offsets and DWARF_E_NO_STR_OFFSETS. 807 (struct Dwarf_CU): Add str_off_base field. 808 (__libdw_cu_str_off_base): New function declaration. 809 8102018-03-22 Mark Wielaard <mark@klomp.org> 811 812 * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_addr. 813 * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_ADDR. 814 * dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_addrx[1234]. 815 (__libdw_cu_addr_base): New function. 816 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_addr_base as 817 addrptr. 818 * libdwP.h: Add IDX_debug_addr and DWARF_E_NO_DEBUG_ADDR. 819 (struct Dwarf_CU): Add addr_base field. 820 (__libdw_cu_addr_base): New function definition. 821 * memory-access.h (file_byte_order): New static function. 822 (read_3ubyte_unaligned): New inline function. 823 8242018-03-29 Mark Wielaard <mark@klomp.org> 825 826 * libdw.h (dwarf_decl_file): Extend documentation. 827 (dwarf_linesrc): Likewise. 828 (dwarf_filesrc): Likewise. 829 8302018-03-06 Mark Wielaard <mark@klomp.org> 831 832 * dwarf.h: Add DW_OP_implicit_pointer, DW_OP_addrx, DW_OP_constx, 833 DW_OP_entry_value, DW_OP_const_type, DW_OP_regval_type, 834 DW_OP_deref_type, DW_OP_xderef_type, DW_OP_convert and 835 DW_OP_reinterpret. 836 * dwarf_getlocation.c (__libdw_intern_expression): Handle 837 DW_OP_convert, DW_OP_reinterpret, DW_OP_addrx, DW_OP_constx, 838 DW_OP_regval_type, DW_OP_entry_value, DW_OP_implicit_pointer, 839 DW_OP_deref_type, DW_OP_xderef_type and DW_OP_const_type. 840 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Handle 841 DW_OP_entry_value, DW_OP_const_type and DW_OP_implicit_pointer. 842 * dwarf_getlocation_die.c (dwarf_getlocation_die): Handle 843 DW_OP_implicit_pointer, DW_OP_convert, DW_OP_reinterpret, 844 DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type and 845 DW_OP_xderef_type. 846 * dwarf_getlocation_implicit_pointer.c 847 (dwarf_getlocation_implicit_pointer): Handle DW_OP_implicit_pointer. 848 8492018-03-01 Mark Wielaard <mark@klomp.org> 850 851 * dwarf.h: Add DW_AT_GNU_locviews and DW_AT_GNU_entry_view. 852 * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_GNU_locviews 853 as a loclistptr. 854 8552018-02-09 Mark Wielaard <mark@klomp.org> 856 857 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_data16 as a 858 16 byte block. 859 8602018-02-09 Mark Wielaard <mark@klomp.org> 861 862 * dwarf_child.c (__libdw_find_attr): Handle DW_FORM_implicit_const. 863 * dwarf_formsdata.c (dwarf_formsdata): Likewise. 864 * dwarf_formudata.c (dwarf_formudata): Likewise. 865 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise. 866 * dwarf_getattrs.c (dwarf_getattrs): Likewise. 867 * dwarf_hasattr.c (dwarf_hasattr): Likewise. 868 * dwarf_getabbrevattr.c (dwarf_getabbrevattr_data): New function 869 that will also return any data associated with the abbrev. Which 870 currently is only for DW_FORM_implicit_const. Based on... 871 (dwarf_getabbrevattr): ... this function. Which now just calls 872 dwarf_getabbrevattr_data. 873 * libdw.h (dwarf_getabbrevattr_data): Declare new function. 874 * libdw.map (ELFUTILS_0.170): Add dwarf_getabbrevattr_data. 875 * libdwP.h (dwarf_getabbrevattr_data): INTDECL. 876 * memory-access.h (__libdw_get_sleb128_unchecked): New inlined 877 function based on __libdw_get_uleb128_unchecked. 878 8792018-02-08 Mark Wielaard <mark@klomp.org> 880 881 * dwarf.h: Add DWARF5 DW_FORMs. 882 * libdwP.h (__libdw_form_val_compute_len): Handle fix length 883 DW_FORM_implicit_const, DW_FORM_addrx[1234], DW_FORM_strx[1234], 884 DW_FORM_ref_sup[48] and DW_FORM_data16. 885 * libdw_form.c (__libdw_form_val_compute_len): DW_FORM_strp_sup 886 and DW_FORM_line_strp are offset_size. DW_FORM_addrx, DW_FORM_strx, 887 DW_FORM_loclistx and DW_FORM_rnglistx are uleb128. 888 8892018-01-30 Mark Wielaard <mark@klomp.org> 890 891 * Makefile.am (libdw_a_SOURCES): Add dwarf_get_units.c. 892 * dwarf_get_units.c: New file. 893 * libdw.h (dwarf_get_units): New function declaration. 894 * libdw.map (ELFUTILS_0.170): Add dwarf_get_units. 895 8962018-01-29 Mark Wielaard <mark@klomp.org> 897 898 * dwarf.h (DW_UT_*): Add DWARF Unit Header Types. 899 * dwarf_cu_die.c (dwarf_cu_die): Rename arguments. type_signaturep 900 is now called unit_idp. type_offsetp is now called subdie_offsetp. 901 * dwarf_formref_die.c (dwarf_formref_die): Scan both .debug_info 902 and .debug_types sections for type units when type signature ref 903 not found. 904 * dwarf_getaranges.c (dwarf_getaranges): Use __libdw_findcu and 905 __libdw_first_die_off_from_cu instead of trying by hand. 906 * dwarf_getlocation_die.c (dwarf_getlocation_die): Use ISV4TU 907 instead of checking type_offset by hand. 908 * dwarf_getlocation_implicit_pointer.c 909 (dwarf_getlocation_implicit_pointer): Likewise. 910 * dwarf_nextcu.c (dwarf_next_unit): Call __libdw_next_unit. 911 (__libdw_next_unit): New function based on dwarf_next_unit with 912 DWARF5 header support. 913 * libdwP.h (struct Dwarf_CU): Renamed type_offset to subdie_offset 914 and type_sig8 to unit_id8. 915 (ISV4TU): New macro to determine whether a CU is a version 4 type 916 unit (which comes from the .debug_types section). 917 (DIE_OFFSET_FROM_CU_OFFSET): Replaced macro by real function... 918 (__libdw_first_die_from_cu_start): ... that also handles DWARF5 919 unit headers. 920 (__libdw_first_die_off_from_cu): New function that calls the above 921 using the CU fields. 922 (CUDIE): Use __libdw_first_die_off_from_cu. 923 (SUBDIE): New macro that provides the DIE for a CU using the 924 subdie_offset. 925 (__libdw_next_unit): New internal function declaration. 926 * libdw_findcu.c (__libdw_intern_next_unit): Use __libdw_next_unit. 927 Accept DWARF version 5 headers. Setup unit_type. 928 (__libdw_findcu): Rename debug_types argument to v4_debug_types 929 argument (to indicate that we are looking in the .debug_types 930 section). Support finding the exact offset (unit header start). 931 9322018-01-25 Mark Wielaard <mark@klomp.org> 933 934 * Makefile.am (libdw_a_SOURCES): Add dwarf_die_addr_die.c. 935 * dwarf_die_addr_die.c: New file. 936 * libdw.h (dwarf_die_addr_die): New function declaration. 937 * libdw.map (ELFUTILS_0.171): New section with dwarf_die_addr_die. 938 * libdwP.h (__libdw_findcu_addr): New internal function declaration. 939 * libdw_findcu.c (__libdw_findcu_addr): New internal function. 940 9412018-02-09 Joshua Watt <JPEWhacker@gmail.com> 942 943 * cfi.c (execute_cfi): Use FALLTHROUGH macro instead of comment. 944 * dwarf_frame_register.c (dwarf_frame_register): Likewise. 945 9462018-01-22 Mark Wielaard <mark@klomp.org> 947 948 * Makefile.am (AM_CPPFLAGS): Add -I libdwelf. 949 * dwarf_begin_elf.c (dwarf_begin_elf): Initialize Dwarf alt_fd to -1. 950 * dwarf_end.c (dwarf_end): Call dwarf_end and close on the alt_dwarf 951 and alt_fd if we allocated them. 952 * dwarf_fromref_die.c (dwarf_formref_die): Call dwarf_getalt. 953 * dwarf_formstring.c (dwarf_formstring): Likewise. 954 * dwarf_getalt.c (__libdw_filepath): New internal function. 955 (find_debug_altlink): New static function. 956 (dwarf_getalt): Check Dwarf alt_dwarf and call find_debug_altlink. 957 Cache result. 958 * dwarf_setalt.c (dwarf_setalt): Clean up Dwarf alt_dwarf and alt_fd 959 if we allocated. 960 * libdw.h (dwarf_getalt): Extend documentation. 961 (dwarf_setalt): Likewise. 962 * libdwP.h (struct Dwarf): Add alt_fd field. 963 (filepath): Declare new internal function. 964 9652018-01-14 Petr Machata <pmachata@gmail.com> 966 967 * dwarf_formsdata.c (dwarf_formsdata): 968 <DW_FORM_data1>: Cast to signed char. 969 <DW_FORM_data2,4,8>: Use read_*sbyte_unaligned instead of 970 read_*ubyte_unaligned. 971 9722017-12-26 Mark Wielaard <mark@klomp.org> 973 974 * libdwP.h (struct Dwarf_Abbrev): Pack struct. Remove attrcnt, 975 use bitfields for has_children and code. 976 * dwarf_getabbrev.c (__libdw_getabbrev): Don't count attrs. 977 * dwarf_getattrcnt.c (dwarf_getattrcnt): Count attrs. 978 9792017-12-26 Mark Wielaard <mark@klomp.org> 980 981 * memory-access.h (__libdw_get_uleb128_unchecked): New function. 982 (get_uleb128_unchecked): New define. 983 * dwarf_child.c (__libdw_find_attr): Use get_uleb128_unchecked to 984 read attr name and form. 985 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise. 986 * dwarf_getattrs.c (dwarf_getattrs): Likewise. 987 * dwarf_hasattr.c (dwarf_hasattr): Likewise. 988 9892017-12-28 Mark Wielaard <mark@klomp.org> 990 991 * dwarf_offdie.c (__libdw_offdie): Check sectiondata exists. 992 9932017-05-09 Ulf Hermann <ulf.hermann@qt.io> 994 Mark Wielaard <mark@klomp.org> 995 996 * libdwP.h (__libdw_in_section): Fix check for the upper border of 997 the range. 998 (__libdw_offset_in_section): Likewise. 999 10002017-12-20 Mark Wielaard <mark@klomp.org> 1001 1002 * libdwP.h (struct Dwarf_CU): Add sec_idx field. 1003 (cu_sec_idx): Return cu->sec_idx. 1004 * libdw_findcu.c (__libdw_intern_next_unit): Set cu sec_idx to 1005 IDX_debug_info or IDX_debug_types. 1006 * dwarf_begin_elf.c (valid_p): Set fake_loc_cu->sec_idx to 1007 IDX_debug_loc. 1008 * dwarf_getmacros.c (read_macros): Set fake_cu->sec_idx to 1009 IDX_debug_macro or IDX_debug_macinfo. 1010 10112017-12-12 Mark Wielaard <mark@klomp.org> 1012 1013 * dwarf_aggregate_size.c (dwarf_aggregate_size): Don't peel the 1014 given DIE. Reserve memory for a new DIE first. 1015 10162017-12-11 Dima Kogan <dima@secretsauce.net> 1017 1018 * dwarf_aggregate_size.c (array_size): Handle multi-dimensional 1019 arrays properly. 1020 10212017-11-03 Mark Wielaard <mark@klomp.org> 1022 1023 * dwarf_getlocation.c (__libdw_intern_expression): Handle 1024 DW_OP_GNU_variable_value. 1025 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Likewise. 1026 * dwarf_getlocation_die.c (dwarf_getlocation_die): Likewise. 1027 10282017-11-03 Mark Wielaard <mark@klomp.org> 1029 1030 * dwarf_getlocation.c (attr_ok): Always accept DW_FORM_exprloc. 1031 Update list of acceptable attribute codes based on DWARF5. 1032 10332017-11-03 Mark Wielaard <mark@klomp.org> 1034 1035 * dwarf.h: Add DW_OP_GNU_variable_value. 1036 10372017-10-03 Mark Wielaard <mark@klomp.org> 1038 1039 * libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p. 1040 10412017-08-18 Ulf Hermann <ulf.hermann@qt.io> 1042 1043 * memory-access.h: Use attribute_packed. 1044 10452017-02-27 Ulf Hermann <ulf.hermann@qt.io> 1046 1047 * libdwP.h: Use attribute_hidden. 1048 * libdw_alloc.c: Likewise. 1049 10502017-02-27 Ulf Hermann <ulf.hermann@qt.io> 1051 1052 * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS. 1053 10542017-07-26 Mark Wielaard <mark@klomp.org> 1055 1056 * dwarf.h: Add DW_MACRO_* and compat defines for DW_MACRO_GNU_*. 1057 * dwarf_getmacros.c (get_table_for_offset): Accept either version 1058 4 or 5. Use DW_MACRO names instead of DW_MACRO_GNU names. 1059 (read_macros): Use table version for fake_cu. 1060 10612017-07-26 Mark Wielaard <mark@klomp.org> 1062 1063 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_immutable_type, 1064 DW_TAG_packed_type and DW_TAG_shared_type. 1065 * libdw.h (dwarf_peel_type): Extend documentation. 1066 10672017-07-26 Mark Wielaard <mark@klomp.org> 1068 1069 * dwarf.h: Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and 1070 DW_DEFAULTED_out_of_class. 1071 10722017-07-26 Mark Wielaard <mark@klomp.org> 1073 1074 * dwarf.h: Add DW_CC_pass_by_reference and DW_CC_pass_by_reference. 1075 10762017-07-26 Mark Wielaard <mark@klomp.org> 1077 1078 * dwarf_default_lower_bound.c: New file. 1079 * Makefile.am (libdw_a_SOURCES): Add dwarf_default_lower_bound.c. 1080 * dwarf_aggregate_size.c (array_size): Use dwarf_default_lower_bound. 1081 * dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_LANGUAGE. 1082 * libdw.h: Add dwarf_default_lower_bound. 1083 * libdw.map (ELFUTILS_0.170): Add dwarf_default_lower_bound. 1084 * libdwP.h: Add DWARF_E_UNKNOWN_LANGUAGE and 1085 dwarf_default_lower_bound INTDECL. 1086 10872017-07-26 Mark Wielaard <mark@klomp.org> 1088 1089 * dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3, 1090 DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift, 1091 DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS. 1092 * dwarf_aggregate_size.c (array_size): Add lower bound for 1093 DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL, 1094 DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift, 1095 DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3, 1096 DW_LANG_Julia and DW_LANG_BLISS. 1097 10982017-07-26 Mark Wielaard <mark@klomp.org> 1099 1100 * dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII. 1101 11022017-07-25 Mark Wielaard <mark@klomp.org> 1103 1104 * dwarf.h: Add DW_TAG_coarray_type, DW_TAG_generic_subrange, 1105 DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter, 1106 DW_TAG_skeleton_unit, DW_TAG_immutable_type. Add reserved comments 1107 for currently unused numbers. 1108 11092017-07-25 Mark Wielaard <mark@klomp.org> 1110 1111 * dwarf.h (DWARF attributes enum): Remove DW_AT_subscr_data, 1112 DW_AT_element_list and DW_AT_member. Add DWARF5 attribute constants. 1113 (DW_AT_subscr_data, DW_AT_element_list, DW_AT_member): New defines. 1114 11152017-07-21 Mark Wielaard <mark@klomp.org> 1116 1117 * dwarf_line_file.c: New file. 1118 * Makefile.am (libdw_a_SOURCES): Add dwarf_line_file.c. 1119 * libdw.h (dwarf_line_file): New function declaration. 1120 * libdw.map (ELFUTILS_0.170): New. Add dwarf_line_file. 1121 11222017-02-17 Ulf Hermann <ulf.hermann@qt.io> 1123 1124 * Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is 1125 made of, libdw_so_DEPS for libraries it depends on (including 1126 libeu.a), libdw_so_LDLIBS to specify libraries libdw links against. 1127 (libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of 1128 library dependencies, use libdw_so_LIBS rather than relying on the 1129 order of dependencies specified, add -z,relro. 1130 11312017-04-20 Ulf Hermann <ulf.hermann@qt.io> 1132 1133 * libdw.h: Remove attribute macro declarations and use 1134 __noreturn_attribute__ as defined in libelf.h. 1135 11362017-04-20 Ulf Hermann <ulf.hermann@qt.io> 1137 1138 * dwarf_begin_elf.c: Include endian.h. 1139 11402017-03-30 Mark Wielaard <mjw@redhat.com> 1141 1142 * dwarf_peel_type.c (dwarf_peel_type): Call dwarf_attr_integrate on 1143 result. 1144 11452016-10-22 Mark Wielaard <mjw@redhat.com> 1146 1147 * dwarf.h: Correct spelling of DW_LANG_PLI. Add compatibility define. 1148 * dwarf_aggregate_size.c (array_size): Use correct spelling of 1149 DW_LANG_PLI. 1150 11512016-11-02 Mark Wielaard <mjw@redhat.com> 1152 1153 * cfi.c (execute_cfi): Add fallthrough comments. 1154 * encoded-value.h (encoded_value_size): Add explicit return instead 1155 of relying on fallthrough. 1156 * dwfl_report_elf.c (__libdwfl_elf_address_range): Add fallthrough 1157 comment. 1158 11592016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> 1160 1161 * dwarf_getpubnames.c: Remove sys/param.h include, add system.h. 1162 * libdw_alloc.c: Likewise. 1163 11642016-07-08 Mark Wielaard <mjw@redhat.com> 1165 1166 * libdw.map (ELFUTILS_0.167): New. Add dwelf_strtab_init, 1167 dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize, 1168 dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free. 1169 11702016-02-13 Mark Wielaard <mjw@redhat.com> 1171 1172 * dwarf_getsrclines.c (read_srclines): Calculate ndirs first, then 1173 assign to ndirlist. 1174 11752015-12-18 Mark Wielaard <mjw@redhat.com> 1176 1177 * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask. 1178 (__libdw_free_zdata): Remove. 1179 * dwarf_begin_elf.c (inflate_section): Remove. 1180 (check_section): Remove __libdw_free_zdata calls. Use elf_compress 1181 and elf_compress_gnu to decompress if necessary. 1182 (valid_p): Remove __libdw_free_zdata calls. 1183 (scngrp_read): Use elf_compress if section is compressed. Remove 1184 __libdw_free_zdata calls. 1185 * dwarf_end.c (__libdw_free_zdata): Remove. 1186 (dwarf_end): Don't call __libdw_free_zdata. 1187 11882015-10-28 Mark Wielaard <mjw@redhat.com> 1189 1190 * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size. 1191 11922015-12-02 Mark Wielaard <mjw@redhat.com> 1193 1194 * fde.c (intern_fde): Don't leak duplicate FDEs. 1195 11962015-12-01 Mark Wielaard <mjw@redhat.com> 1197 1198 * fde.c (intern_fde): Don't intern an fde that doesn't cover a 1199 valid code range. 1200 12012015-12-01 Mark Wielaard <mjw@redhat.com> 1202 1203 * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists. 1204 12052015-10-14 Chih-Hung Hsieh <chh@google.com> 1206 1207 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive 1208 functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope. 1209 12102015-10-14 Chih-Hung Hsieh <chh@google.com> 1211 1212 * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested 1213 function 'walk_children' to file scope; inline 'recurse' at its call 1214 site. 1215 12162015-10-19 Mark Wielaard <mjw@redhat.com> 1217 1218 * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend 1219 if necessary. 1220 12212015-10-16 Dmitry V. Levin <ldv@altlinux.org> 1222 1223 * dwarf_getsrclines.c (read_srclines): Initialize state early. 1224 12252015-10-13 Chih-Hung Hsieh <chh@google.com> 1226 1227 * dwarf_getsrclines.c (read_srclines): Move nested functions 1228 'advance_pc' and 'add_new_line' to file scope and keep many 1229 local state variables within one structure. 1230 12312015-10-13 Chih-Hung Hsieh <chh@google.com> 1232 1233 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested 1234 function 'file_matches' to file scope. 1235 12362015-10-16 Mark Wielaard <mjw@redhat.com> 1237 1238 * Makefile.am (libdw.so): Add -lz. 1239 12402015-10-14 Chih-Hung Hsieh <chh@google.com> 1241 1242 * cfi.c (execute_cfi): Move nested functions 'enough_registers' 1243 and 'require_cfa_offset' to file scope. 1244 12452015-10-09 Josh Stone <jistone@redhat.com> 1246 1247 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat 1248 and fstat. 1249 12502015-10-05 Josh Stone <jistone@redhat.com> 1251 1252 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers. 1253 12542015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com> 1255 1256 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid 1257 relocation overflows in some platforms. 1258 12592015-09-23 Mark Wielaard <mjw@redhat.com> 1260 1261 * dwarf_error.c (__libdw_seterrno): Mark as internal_function. 1262 * dwarf_formref.c (__libdw_formref): Likewise. 1263 * libdw_findcu.c (__libdw_findcu): Likewise. 1264 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. 1265 12662015-09-22 Mark Wielaard <mjw@redhat.com> 1267 1268 * *.c: Remove old-style function definitions. 1269 12702015-09-15 Mark Wielaard <mjw@redhat.com> 1271 1272 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer. 1273 12742015-09-09 Chih-Hung Hsieh <chh@google.com> 1275 1276 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove 1277 redundant NULL tests on parameters declared with __nonnull_attribute__. 1278 * dwarf_siblingof.c (dwarf_siblingof): Likewise. 1279 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. 1280 12812015-09-04 Chih-Hung Hsieh <chh@google.com> 1282 Mark Wielaard <mjw@redhat.com> 1283 1284 * dwarf_getlocation.c (getlocations_addr): Replace K&R function 1285 definition with ansi-C definition and add const qualifier to 1286 locs argument. 1287 12882015-09-04 Chih-Hung Hsieh <chh@google.com> 1289 1290 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function 1291 definition with ansi-C definitions. 1292 (__libdw_findcu): Likewise. 1293 12942015-08-25 Mark Wielaard <mjw@redhat.com> 1295 1296 * dwarf.h: Add DW_LANG_Haskell. 1297 12982015-06-18 Mark Wielaard <mjw@redhat.com> 1299 1300 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough 1301 to hold a Dwarf. 1302 13032015-06-18 Mark Wielaard <mjw@redhat.com> 1304 1305 * dwarf_getpubnames.c (get_offsets): Always free mem on error. 1306 13072015-06-18 Mark Wielaard <mjw@redhat.com> 1308 1309 * dwarf_getmacros.c (get_macinfo_table): Return NULL when 1310 dwarf_formudata reports an error. 1311 (get_table_for_offset): Likewise. 1312 13132015-06-08 Mark Wielaard <mjw@redhat.com> 1314 1315 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early. 1316 13172015-06-06 Mark Wielaard <mjw@redhat.com> 1318 1319 * dwarf_getsrclines.c (read_srclines): Initialize filelist early. 1320 13212015-05-27 Mark Wielaard <mjw@redhat.com> 1322 1323 * encoded-value.h (read_encoded_value): Check data d_size contains 1324 at least enough data to hold a pointer for DW_EH_PE_indirect. 1325 13262015-05-22 Mark Wielaard <mjw@redhat.com> 1327 1328 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines 1329 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with 1330 MAX_STACK_DIRS. Calculate number of dirs needed first, then 1331 create dirarray directly, without needing the next field. Free 1332 not stack allocated lines and files at the end. 1333 13342015-05-19 Mark Wielaard <mjw@redhat.com> 1335 1336 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack 1337 allocated array to hold locs. Allocate locs bigger than the array 1338 with malloc and free them when done. 1339 13402015-05-11 Jonathan Lebon <jlebon@redhat.com> 1341 1342 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator. 1343 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message. 1344 * dwarf_begin_elf.c (inflate_section): New static function, lifted 1345 from... 1346 (check_section): ... here. Call inflate_section, set libdw errno to 1347 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated. 1348 13492015-05-11 Jonathan Lebon <jlebon@redhat.com> 1350 1351 * dwarf_begin_elf.c (check_section): Add compressed flag. Always 1352 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB. 1353 13542015-05-06 Mark Wielaard <mjw@redhat.com> 1355 1356 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and 1357 check the line number. 1358 13592015-05-05 Mark Wielaard <mjw@redhat.com> 1360 1361 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data 1362 left before reading values. 1363 13642015-05-04 Anthony G. Basile <blueness@gentoo.org> 1365 1366 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link 1367 command. 1368 13692015-04-22 Mark Wielaard <mjw@redhat.com> 1370 1371 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument. 1372 (__libdw_max_len_uleb128): New function. 1373 (__libdw_max_len_sleb128): Likewise. 1374 (__libdw_get_uleb128): Use __libdw_max_len_uleb128. 1375 (__libdw_get_sleb128): Use __libdw_max_len_sleb128. 1376 13772015-04-21 Mark Wielaard <mjw@redhat.com> 1378 1379 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically 1380 when there are more than 8. 1381 13822015-04-01 Petr Machata <pmachata@redhat.com> 1383 1384 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator. 1385 (is_cudie): New function. 1386 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE. 1387 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead 1388 of white-listing valid tags. 1389 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise. 1390 13912015-03-18 Petr Machata <pmachata@redhat.com> 1392 1393 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h. 1394 (EXTRA_DIST): Remove known-dwarf.h. 1395 13962015-02-09 Mark Wielaard <mjw@redhat.com> 1397 1398 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08. 1399 * dwarf_aggregate_size.c (array_size): Recognize array lower bound 1400 for new Fortran language codes is 1. 1401 14022015-02-09 Mark Wielaard <mjw@redhat.com> 1403 1404 * dwarf.h: Add DW_TAG_atomic_type. 1405 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type. 1406 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type. 1407 14082015-02-11 Josh Stone <jistone@redhat.com> 1409 1410 * encoded-value.h (read_encoded_value): Initialize value. 1411 14122015-02-11 Petr Machata <pmachata@redhat.com> 1413 1414 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither 1415 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember 1416 the fact in *BASEP and bail out later if it hasn't been updated by 1417 __libdw_read_begin_end_pair_inc. 1418 14192014-12-24 Mark Wielaard <mjw@redhat.com> 1420 1421 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record 1422 smaller than or equal to addr, rather than returning immediately on 1423 a match. 1424 14252015-01-07 Mark Wielaard <mjw@redhat.com> 1426 1427 * cfi.h (struct Dwarf_CFI_s): Add search_table_len. 1428 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough 1429 room in the search table for all entries. Store search_table_len. 1430 (getcfi_scn_eh_frame): Likewise. 1431 * encoded-value.h (encoded_value_size): Don't abort, return zero. 1432 (__libdw_cfi_read_address_inc): Check there is enough room to read 1433 values. Pass other byte order to read functions. 1434 (read_encoded_value): Check encoded_value_size. Don't abort, but 1435 set libdw errno and report failure. Check there is enough room to 1436 read values. 1437 * fde.c (binary_search_fde): Check encoded value size. Add hdr 1438 data buf and size to dummy_cfi. 1439 14402015-01-04 Mark Wielaard <mjw@redhat.com> 1441 1442 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute 1443 is after current DIE. 1444 14452015-01-04 Mark Wielaard <mjw@redhat.com> 1446 1447 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof 1448 (dwarf_frame_register). 1449 14502015-01-02 Mark Wielaard <mjw@redhat.com> 1451 1452 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check. 1453 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL. 1454 (getcfi_scn_eh_frame): Check d_buf is not NULL. 1455 14562015-01-02 Mark Wielaard <mjw@redhat.com> 1457 1458 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not 1459 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For 1460 DW_OP_addr if dbg is NULL then read argument directly. 1461 14622015-01-14 Jason P. Leasure <jpleasu@super.org> 1463 1464 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset 1465 plus cu->start. 1466 14672014-12-27 Mark Wielaard <mjw@redhat.com> 1468 1469 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset 1470 still falls inside CU data. 1471 14722015-01-11 Mark Wielaard <mjw@redhat.com> 1473 1474 * dwarf_func_inline.c (dwarf_func_inline_instances): Call 1475 __libdw_visit_scopes with NULL imports. 1476 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise. 1477 * dwarf_getscopes.c (pc_record): Likewise. 1478 (dwarf_getscopes): Likewise. 1479 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise. 1480 * libdwP.h (__libdw_visit_scopes): Add imports argument. 1481 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new 1482 function imports_contains. Push and pop imports around walk_children 1483 when processing DW_TAG_imported_unit. 1484 14852014-12-18 Ulrich Drepper <drepper@gmail.com> 1486 1487 * Makefile.am: Suppress output of textrel_check command. 1488 14892014-12-16 Mark Wielaard <mjw@redhat.com> 1490 1491 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under 1492 DW_LNE_define_file. 1493 14942014-12-16 Mark Wielaard <mjw@redhat.com> 1495 1496 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough 1497 space to read die offset. 1498 14992014-12-16 Mark Wielaard <mjw@redhat.com> 1500 1501 * dwarf_getsrclines.c (read_srclines): Correct overflow check for 1502 unit_length. 1503 15042014-12-15 Mark Wielaard <mjw@redhat.com> 1505 1506 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside 1507 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero. 1508 (dwarf_getpubnames): Make sure section data contains string zero 1509 terminator. 1510 15112014-12-16 Mark Wielaard <mjw@redhat.com> 1512 1513 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help 1514 the compiler optimize for the common single-byte case. 1515 15162014-12-15 Josh Stone <jistone@redhat.com> 1517 1518 * memory-access.h (__libdw_max_len_leb128): New. 1519 (__libdw_get_uleb128): Use __libdw_max_len_leb128. 1520 (__libdw_get_sleb128): Likewise. 1521 15222014-12-14 Mark Wielaard <mjw@redhat.com> 1523 1524 * cfi.c (execute_cfi): Add program bounds checks. 1525 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks. 1526 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp. 1527 * dwarf_formref.c (__libdw_formref): Add datap bounds checks. 1528 * dwarf_formsdata.c (dwarf_formsdata): Likewise. 1529 * dwarf_formudata.c (dwarf_formudata): Likewise. 1530 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128 1531 with end of data buf. 1532 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks. 1533 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128 1534 call gets enough data. 1535 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp. 1536 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128 1537 with enough data. 1538 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with 1539 end_data. 1540 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check. 1541 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call 1542 get_uleb128 with lineendp. 1543 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call 1544 get_uleb128 with endp. 1545 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call 1546 get_uleb128/get_sleb128 with limit. 1547 * encoded-value.h (read_encoded_value): Assume get_uleb128 and 1548 get_sleb128 get called with enough data. 1549 * fde.c (intern_fde): Call get_uleb128 with instructions_end. 1550 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp. 1551 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with 1552 endp. 1553 * memory-access.h (__libdw_get_uleb128): Take an extra endp. 1554 Don't call get_uleb128_step if out of data. 1555 (__libdw_get_sleb128): Likewise for get_sleb128_step. 1556 15572014-12-12 Mark Wielaard <mjw@redhat.com> 1558 1559 * libdwP.h (struct Dwarf): Add fake_loc_cu. 1560 (cu_data): Removed. 1561 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx. 1562 (__libdw_form_val_compute_len): Drop dbg and endp arguments. 1563 (__libdw_form_val_len): Likewise. 1564 * libdw_form.c (__libdw_form_val_compute_len): Likewise. 1565 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use 1566 the already found data buffer directly. 1567 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu. 1568 * dwarf_end.c (dwarf_end): Free fake_loc_cu. 1569 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with 1570 just cu. 1571 * dwarf_getattrs.c (dwarf_getattrs): Likewise. 1572 * dwarf_formblock.c (dwarf_formblock): Add bounds checking. 1573 * dwarf_getlocation_attr.c (attr_form_cu): New function. 1574 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu. 1575 (getlocation): Handle empty blocks immediately. 1576 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var. 1577 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu. 1578 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with 1579 one argument. 1580 * dwarf_getmacros.c (read_macros): Also setup startp and endp for 1581 fake_cu. Call __libdw_form_val_len with just fake_cu. 1582 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get 1583 datap and size directly from cu startp and endp. 1584 15852014-12-11 Mark Wielaard <mjw@redhat.com> 1586 1587 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset. 1588 15892014-12-13 Mark Wielaard <mjw@redhat.com> 1590 1591 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr 1592 difference doesn't wrap around before returning as int. 1593 15942014-12-11 Josh Stone <jistone@redhat.com> 1595 1596 * dwarf_getsrclines.c (struct linelist): Add sequence. 1597 (compare_lines): Take linelists, and break ties by sequence. 1598 (read_srclines): Use linelists for sorting. 1599 (read_srclines::add_new_line): Set sequence. 1600 16012014-12-10 Josh Stone <jistone@redhat.com> 1602 1603 * libdwP.h (Dwarf_CU): Add startp and endp boundaries. 1604 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp. 1605 * dwarf_child.c (dwarf_child): Use cu->endp. 1606 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp. 1607 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp. 1608 * dwarf_siblingof.c (dwarf_siblingof): Use both. 1609 16102014-12-10 Josh Stone <jistone@redhat.com> 1611 1612 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence. 1613 16142014-12-10 Josh Stone <jistone@redhat.com> 1615 1616 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function. 1617 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it. 1618 * dwarf_getattrs.c (dwarf_getattrs): Likewise. 1619 * dwarf_haschildren.c (dwarf_haschildren): Likewise. 1620 * dwarf_tag.c (dwarf_tag): Likewise. 1621 16222014-12-04 Mark Wielaard <mjw@redhat.com> 1623 1624 * libdwP.h (__libdw_form_val_compute_len): Add endp argument. 1625 (__libdw_form_val_len): Likewise and check len doesn't overflow. 1626 * libdw_form.c (__libdw_form_val_compute_len): Likewise. 1627 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len 1628 with endp. 1629 * dwarf_getattrs.c (dwarf_getattrs): Likewise. 1630 * dwarf_getmacros.c (read_macros): Likewise and check for errors. 1631 16322014-12-02 Petr Machata <pmachata@redhat.com> 1633 1634 * dwarf_getmacros.c (token_from_offset, offset_from_token): New 1635 helper functions. 1636 (do_dwarf_getmacros_die): Merge into dwarf_getmacros. 1637 * libdw.h (DWARF_GETMACROS_START): New macro. 1638 16392014-11-27 Mark Wielaard <mjw@redhat.com> 1640 1641 * Makefile.am (libdw.so): Use textrel_check. 1642 16432014-11-27 Mark Wielaard <mjw@redhat.com> 1644 1645 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize 1646 search_table_entries and search_table_encoding. 1647 16482014-11-24 Mark Wielaard <mjw@redhat.com> 1649 1650 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero 1651 before usage. 1652 16532014-11-23 Mark Wielaard <mjw@redhat.com> 1654 1655 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value. 1656 * dwarf_hasattr.c (dwarf_hasattr): Likewise. 1657 * dwarf_siblingof.c (dwarf_siblingof): Likewise. 1658 16592014-11-23 Mark Wielaard <mjw@redhat.com> 1660 1661 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF. 1662 Set libdw errno and return NULL. 1663 16642014-11-24 Mark Wielaard <mjw@redhat.com> 1665 1666 * dwarf.h (DW_LANG_C_plus_plus_11): Added. 1667 (DW_LANG_C11): Likewise. 1668 (DW_LANG_C_plus_plus_14): Likewise. 1669 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11, 1670 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go 1671 lower bound. 1672 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for 1673 DW_LANG_C11. 1674 16752014-11-26 Mark Wielaard <mjw@redhat.com> 1676 1677 * dwarf.h (DW_AT_noreturn): Added. 1678 16792014-11-11 Mark Wielaard <mjw@redhat.com> 1680 1681 * dwarf_getsrclines.c (read_srclines): Do address_size comparison 1682 explicitly as uint8_t. 1683 (__libdw_getsrclines): Add internal_function to declaration. 1684 16852014-09-10 Petr Machata <pmachata@redhat.com> 1686 1687 * dwarf_macro_getparamcnt.c: New file. 1688 * dwarf_macro_param.c: New file. 1689 * dwarf_macro_getsrcfiles.c: New file. 1690 * Makefile.am (libdw_a_SOURCES): Add the new files. 1691 * libdwP.h (struct files_lines_s): New structure. 1692 (DWARF_E_INVALID_OPCODE): New enumerator. 1693 (struct Dwarf): New fields macro_ops, files_lines. 1694 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for 1695 keeping macro opcode prototypes in. 1696 (Dwarf_Macro_s): Redefine from scratch. 1697 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New 1698 internal interfaces. 1699 * dwarf_error.c (errmsgs): Add a message for 1700 DWARF_E_INVALID_OPCODE. 1701 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and 1702 files_lines. 1703 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt) 1704 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public 1705 interfaces. 1706 * dwarf_getmacros.c (dwarf_getmacros_off): New function, 1707 (get_offset_from, macro_op_compare, build_table) 1708 (init_macinfo_table, get_macinfo_table, get_table_for_offset) 1709 (cache_op_table, read_macros, gnu_macros_getmacros_off) 1710 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper 1711 functions. 1712 (dwarf_getmacros): Adjust to dispatch to the new interfaces. 1713 * dwarf_getsrclines.c (read_srclines): New function with guts 1714 taken from dwarf_getsrclines. 1715 (__libdw_getsrclines): Likewise. 1716 (__libdw_getcompdir, files_lines_compare): New functions. 1717 (dwarf_getsrclines): Make it dispatch to the new interfaces. 1718 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to 1719 the new interfaces. 1720 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise. 1721 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off, 1722 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param. 1723 17242014-10-06 Mark Wielaard <mjw@redhat.com> 1725 1726 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c. 1727 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type. 1728 (aggregate_size): Likewise. Add old and new version. 1729 * dwarf_peel_type.c: New file. 1730 * libdw.h (dwarf_peel_type): New function declaration. 1731 * libdwP.h (dwarf_peel_type): New internal declaration. 1732 * libdw.map (ELFUTILS_0.161): New section. 1733 17342014-10-15 Petr Machata <pmachata@redhat.com> 1735 1736 * libdwP.h (struct Dwarf_Files_s.cu): Drop field. 1737 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it. 1738 17392014-10-05 Mark Wielaard <mjw@redhat.com> 1740 1741 * dwarf.h: Add DW_AT_GNU_deleted. 1742 17432014-10-02 Mark Wielaard <mjw@redhat.com> 1744 1745 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size 1746 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or 1747 DW_TAG_rvalue_reference_type. 1748 17492014-09-12 Petr Machata <pmachata@redhat.com> 1750 1751 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and 1752 8-byte quantities. Consequently, rename to... 1753 (read_addr_unaligned_inc): ... this. 1754 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop. 1755 (read_sbyte_unaligned): Drop. 1756 17572014-09-10 Petr Machata <pmachata@redhat.com> 1758 1759 * dwarf_getlocation.c (attr_ok): Also accept 1760 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value, 1761 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered. 1762 17632014-08-15 Mark Wielaard <mjw@redhat.com> 1764 1765 * dwarf_cu_die.c: New file. 1766 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c. 1767 * libdw.h (dwarf_cu_die): New function declaration. 1768 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die. 1769 17702014-08-15 Mark Wielaard <mjw@redhat.com> 1771 1772 * dwarf_cu_getdwarf.c: New file. 1773 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c. 1774 * libdw.h (Dwarf_CU): New typedef. 1775 (dwarf_cu_getdwarf): New function declaration. 1776 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf. 1777 17782014-06-18 Mark Wielaard <mjw@redhat.com> 1779 1780 * dwarf.h: Remove DW_TAG_mutable_type. 1781 17822014-05-02 Mark Wielaard <mjw@redhat.com> 1783 1784 * libdwP.h (__check_build_id): Removed now unused. 1785 17862014-05-01 Mark Wielaard <mjw@redhat.com> 1787 1788 * libdwP.h (struct Dwarf): Remove free_alt. 1789 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf. 1790 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt. 1791 17922014-04-30 Mark Wielaard <mjw@redhat.com> 1793 1794 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id. 1795 17962014-04-15 Florian Weimer <fweimer@redhat.com> 1797 1798 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink) 1799 (open_debugaltlink): Move to libdwfl. 1800 (check_section): Do not locate alternate debuginfo. 1801 18022014-04-24 Florian Weimer <fweimer@redhat.com> 1803 1804 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink. 1805 18062014-04-22 Florian Weimer <fweimer@redhat.com> 1807 1808 * dwarf_getalt.c, dwarf_setalt.c: New files. 1809 * Makefile.am (libdw_a_SOURCES): Add them. 1810 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations. 1811 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function 1812 declarations. 1813 * libdw.map (ELFUTILS_0.159): Export the two new functions. 1814 18152014-04-15 Florian Weimer <fweimer@redhat.com> 1816 1817 * libdwP.h (enum IDX_gnu_debugaltlink): New. 1818 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add 1819 .gnu_debugaltlink. 1820 (check_section): Obtain .gnu_debugaltlink section from the 1821 setiondata array. 1822 18232014-04-11 Mark Wielaard <mjw@redhat.com> 1824 1825 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink. 1826 * Makefile.am (libdw.so): Depend on libdwelf_pic.a. 1827 (libdwelf_objects): New variable. 1828 (libdw_a_LIBADD): Add libdwelf objects. 1829 18302014-04-22 Mark Wielaard <mjw@redhat.com> 1831 1832 * memory-access.h (get_sleb128_step): Remove undefined behavior 1833 of left shifting a signed value. Replace it with a multiplication. 1834 18352014-04-13 Mark Wielaard <mjw@redhat.com> 1836 1837 * Makefile.am: Remove !MUDFLAP conditions. 1838 18392014-04-09 Mark Wielaard <mjw@redhat.com> 1840 1841 * dwarf_begin_elf.c (check_section): Check for unsigned overflow 1842 before calling malloc to uncompress data. 1843 18442014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com> 1845 1846 Fix abort() on missing section headers. 1847 * dwarf_begin_elf.c (check_section): Replace abort call by goto err. 1848 New label err to return NULL. 1849 18502014-02-05 Josh Stone <jistone@redhat.com> 1851 1852 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned. 1853 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as 1854 unsigned. Change the range assert to DWARF_E_INVALID_DWARF. 1855 18562013-12-30 Mark Wielaard <mjw@redhat.com> 1857 1858 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and 1859 dwfl_linux_proc_attach. 1860 18612013-12-20 Mark Wielaard <mjw@redhat.com> 1862 1863 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames. 1864 18652013-12-18 Mark Wielaard <mjw@redhat.com> 1866 1867 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and 1868 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and 1869 dwfl_module_getsym_info. 1870 18712013-12-16 Mark Wielaard <mjw@redhat.com> 1872 1873 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global. 1874 18752013-12-10 Josh Stone <jistone@redhat.com> 1876 1877 * memory-access.h (get_uleb128_rest_return): Removed. 1878 (get_sleb128_rest_return): Removed. 1879 (get_uleb128_step): Make this a self-contained block. 1880 (get_sleb128_step): Ditto, and use a bitfield to extend signs. 1881 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128. 1882 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128. 1883 (__libdw_get_uleb128): Simplify and inline for all callers. 1884 (__libdw_get_sleb128): Ditto. 1885 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128. 1886 * memory-access.c: Delete file. 1887 * Makefile.am (libdw_a_SOURCES): Remove it. 1888 (DEFS): Remove the now unused -DIS_LIBDW. 1889 18902013-12-09 Josh Stone <jistone@redhat.com> 1891 1892 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from 1893 __libdw_form_val_len, now handling only non-constant form lengths. 1894 * libdwP.h (__libdw_form_val_len): New inlined function. 1895 18962013-12-09 Mark Wielaard <mjw@redhat.com> 1897 1898 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty 1899 location expressions. 1900 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no 1901 location found, return empty location expression. 1902 * dwarf_getlocation_implicit_pointer.c 1903 (dwarf_getlocation_implicit_pointer): Likewise. 1904 (__libdw_empty_loc_attr): New internal function. 1905 * libdwP.h (__libdw_empty_loc_attr): Define. 1906 19072013-11-27 Mark Wielaard <mjw@redhat.com> 1908 1909 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and 1910 dwfl_module_getsym_elf. 1911 19122013-11-26 Mark Wielaard <mjw@redhat.com> 1913 1914 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid, 1915 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread, 1916 dwfl_thread_state_registers, dwfl_thread_state_register_pc, 1917 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ... 1918 (ELFUTILS_0.158): ... here. 1919 19202013-11-09 Mark Wielaard <mjw@redhat.com> 1921 1922 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and 1923 check that it is zero. 1924 19252013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com> 1926 1927 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific. 1928 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid, 1929 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread, 1930 dwfl_thread_state_registers, dwfl_thread_state_register_pc, 1931 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc. 1932 19332013-11-01 Michael Forney <mforney@mforney.org> 1934 1935 * Makefile.am (libdwfl_objects): New definition. 1936 (libdw_a_LIBADD): Use libdwfl_objects. 1937 19382013-11-01 Michael Forney <mforney@mforney.org> 1939 1940 * Makefile.am: Use READELF. 1941 19422013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com> 1943 1944 * libdw.map (ELFUTILS_0.158): New. 1945 19462013-10-10 Mark Wielaard <mjw@redhat.com> 1947 1948 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to 1949 start_addr and rename last_offset to last_addr. Now both void *. 1950 (tree_visitor): Use start_add and die_addr instead of start_offset 1951 and die_offset. 1952 (dwarf_getfuncs): Use last_addr instead of last_offset. 1953 19542013-10-06 Mark Wielaard <mjw@redhat.com> 1955 1956 * cfi.c (execute_cfi): Make sure DW_CFA_expression and 1957 DW_CFA_val_expression are not used with abi_cfi. 1958 19592013-10-03 Josh Stone <jistone@redhat.com> 1960 1961 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here. 1962 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits 1963 a unit, make sure to always hash the sig8 here, so none are missed. 1964 19652013-09-29 Mark Wielaard <mjw@redhat.com> 1966 1967 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to 1968 uintptr_t before casting to char *. 1969 (__libdw_intern_expression): Cast data to uintptr_t before casting 1970 to Dwarf_Word. 1971 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast 1972 op->number2 to uintptr_t before casting to char *. 1973 19742013-09-24 Josh Stone <jistone@redhat.com> 1975 1976 * libdw_visit_scopes.c (classify_die): Removed. 1977 (may_have_scopes): New function to replace classify_die. There's no 1978 need for full classification; just find tags that may contain scopes. 1979 (__libdw_visit_scopes): Use a direct tag comparison for imported 1980 units, and use may_have_scopes to test if recursion is needed. 1981 19822013-09-20 Mark Wielaard <mjw@redhat.com> 1983 1984 * dwarf_getfuncs.c (visitor_info): New struct. 1985 (tree_visitor): New function. 1986 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor. 1987 * libdw.h (dwarf_getfuncs): Expand function documentation. 1988 19892013-09-12 Mark Wielaard <mjw@redhat.com> 1990 1991 * fde.c (intern_fde): Free fde and set libdw errno when start 1992 or end could not be read. 1993 19942013-08-24 Mark Wielaard <mjw@redhat.com> 1995 1996 * dwarf_getlocation.c (store_implicit_value): Don't take data 1997 as argument, get block data from op number2. Return false when 1998 block data length and op number don't match up. 1999 (__libdw_intern_expression): Store start of block for 2000 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of 2001 relative data offset. Also store block start (including length) 2002 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value. 2003 * dwarf_getlocation_attr.c: New file. 2004 * dwarf_getlocation_die.c: Likewise. 2005 * libdw.h (dwarf_getlocation_die): New function definition. 2006 (dwarf_getlocation_attr): Likewise. 2007 * libdwP.h: Declare internal dwarf_getlocation_die. 2008 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and 2009 dwarf_getlocation_attr. 2010 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and 2011 dwarf_getlocation_attr.c. 2012 20132013-08-23 Mark Wielaard <mjw@redhat.com> 2014 2015 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment. 2016 (attr_base_address): New function. 2017 (initial_offset_base): New function. 2018 (getlocations_addr): New function. Taken from... 2019 (dwarf_getlocation_addr): here. Use new initial_offset_base and 2020 getlocations_addr. 2021 (dwarf_getlocations): New function. 2022 * libdw.h (dwarf_getlocations): New function definition. 2023 * libdw.map (ELFUTILS_0.157): New. 2024 20252013-07-02 Mark Wielaard <mjw@redhat.com> 2026 2027 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation 2028 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in 2029 NEW_LINE macro. Free malloced line records if any at the end. 2030 20312013-07-02 Mark Wielaard <mjw@redhat.com> 2032 2033 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS. 2034 20352013-06-26 Mark Wielaard <mjw@redhat.com> 2036 2037 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root 2038 DIEs without children. Return an error whenever dwarf_child or 2039 dwarf_siblingof return an error. Don't call recurse and increase 2040 the depth for an imported unit. Walk the children of an imported 2041 unit as if they are logical children of the parent root DIE. 2042 20432013-05-03 Mark Wielaard <mjw@redhat.com> 2044 2045 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence 2046 when nlinelist > 0. 2047 20482013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com> 2049 2050 * libdw.map (ELFUTILS_0.156): New. 2051 20522013-04-24 Mark Wielaard <mjw@redhat.com> 2053 2054 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. 2055 20562013-04-10 Mark Wielaard <mjw@redhat.com> 2057 2058 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only 2059 equal to address size when we have a DW_FORM_ref_addr for DWARF 2060 version 2. 2061 20622013-03-25 Mark Wielaard <mjw@redhat.com> 2063 2064 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as 2065 end_sequence. 2066 20672013-03-12 Mark Wielaard <mjw@redhat.com> 2068 2069 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit. 2070 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise. 2071 20722013-02-15 Mark Wielaard <mjw@redhat.com> 2073 2074 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata, 2075 not dbg->sectiondata. 2076 20772013-01-07 Roland McGrath <roland@hack.frob.com> 2078 2079 * memory-access.h 2080 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro. 2081 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function. 2082 20832012-12-18 Mark Wielaard <mjw@redhat.com> 2084 2085 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid. 2086 (check_section): Likewise on error. 2087 (scngrp_read): Likewise. 2088 (dwarf_begin_elf): Likewise. 2089 20902012-10-09 Petr Machata <pmachata@redhat.com> 2091 2092 * dwarf_getlocation.c (__libdw_intern_expression): Handle 2093 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret, 2094 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value, 2095 DW_OP_GNU_deref_type, DW_OP_GNU_const_type. 2096 20972012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com> 2098 2099 * cfi.c: New include system.h. 2100 (execute_cfi) (enough_registers): Clear new memory after realloc. 2101 21022012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com> 2103 2104 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return 2105 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for 2106 searched PC. 2107 21082012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com> 2109 2110 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new 2111 loclist element DW_OP_call_frame_cfa before decoding the opcodes. 2112 Remove the later DW_OP_call_frame_cfa push to RESULT. 2113 21142012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com> 2115 2116 Code cleanup. 2117 * fde.c (binary_search_fde): Remove always true <address >= start> 2118 conditional. Move L initialization upwards. 2119 21202012-08-24 Mark Wielaard <mjw@redhat.com> 2121 2122 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files 2123 when ENABLE_DWZ is defined. 2124 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is 2125 defined. 2126 21272012-08-16 Mark Wielaard <mjw@redhat.com> 2128 2129 * Makefile.am (EXTRA_DIST): Add known-dwarf.h. 2130 * dwarf.h (DW_LANG_Go): Update comment. 2131 (DW_LANG_Mips_Assembler): Likewise. 2132 21332012-06-27 Mark Wielaard <mjw@redhat.com> 2134 2135 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt. 2136 * dwarf_begin.c (dwarf_begin): Add INTDEF. 2137 * dwarf_begin_elf.c (__check_build_id): New internal_function. 2138 (try_debugaltlink): New function. 2139 (open_debugaltlink): Likewise. 2140 (check_section): Try open_debugaltlink for .gnu_debugaltlink. 2141 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if 2142 necessary. 2143 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK. 2144 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt 2145 is an error here. 2146 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt. 2147 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt. 2148 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset 2149 calls. 2150 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call. 2151 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK. 2152 (struct Dwarf): Add alt_dwarf and free_alt fields. 2153 (__libdw_read_offset): Add dbg_ret argument, use to check with 2154 __libdw_offset_in_section. 2155 (__check_build_id): New function declaration. 2156 (dwarf_begin): Define as INTDECL. 2157 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt 2158 and DW_FORM_GNU_strp_alt. 2159 21602012-07-19 Mark Wielaard <mjw@redhat.com> 2161 2162 * dwarf.h: Add DW_OP_GNU_parameter_ref. 2163 21642012-07-24 Mark Wielaard <mjw@redhat.com> 2165 2166 * dwarf.h: Correct spelling of DW_LANG_ObjC. 2167 * dwarf_aggregate_size.c (array_size): Use correct spelling of 2168 DW_LANG_ObjC. 2169 21702012-07-24 Mark Wielaard <mjw@redhat.com> 2171 2172 * dwarf.h: Add DW_ATE_UTF. 2173 21742012-06-27 Mark Wielaard <mjw@redhat.com> 2175 2176 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings. 2177 21782012-06-26 Mark Wielaard <mjw@redhat.com> 2179 2180 * libdwP.h: Add IDX_debug_macro. 2181 * dwarf.h: Add DW_AT_GNU_macros. 2182 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro. 2183 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros. 2184 21852012-04-27 Mark Wielaard <mjw@redhat.com> 2186 2187 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being 2188 a constant offset from DW_AT_low_pc. 2189 21902012-03-19 Tom Tromey <tromey@redhat.com> 2191 2192 * libdw_findcu.c (findcu_cb): Move earlier. 2193 (__libdw_intern_next_unit): Add new CU to search tree here... 2194 (__libdw_findcu): ... not here. 2195 21962012-01-31 Mark Wielaard <mjw@redhat.com> 2197 2198 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset. 2199 22002011-11-31 Mark Wielaard <mjw@redhat.com> 2201 2202 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk. 2203 22042011-07-14 Mark Wielaard <mjw@redhat.com> 2205 2206 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info. 2207 22082011-05-16 Jakub Jelinek <jakub@redhat.com> 2209 2210 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type, 2211 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret): 2212 New. 2213 22142011-04-26 Mark Wielaard <mjw@redhat.com> 2215 2216 * dwarf_child (dwarf_child): Sanity check end of section against 2217 cu_data () of die->cu. 2218 22192011-03-22 Mark Wielaard <mjw@redhat.com> 2220 2221 * dwarf.h: Add DW_TAG_GNU_call_site, 2222 DW_TAG_GNU_call_site_parameter, 2223 DW_AT_GNU_call_site_value, 2224 DW_AT_GNU_call_site_data_value, 2225 DW_AT_GNU_call_site_target, 2226 DW_AT_GNU_call_site_target_clobbered, 2227 DW_AT_GNU_tail_call, 2228 DW_AT_GNU_all_tail_call_sites, 2229 DW_AT_GNU_all_call_sites, 2230 DW_AT_GNU_all_source_call_sites, 2231 and DW_OP_GNU_entry_value. 2232 22332011-03-10 Petr Machata <pmachata@redhat.com> 2234 2235 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for 2236 abbreviation with code 0. 2237 22382011-03-09 Petr Machata <pmachata@redhat.com> 2239 2240 * libdw/dwarf_child.c (dwarf_child): Check for section overrun. 2241 22422011-02-23 Roland McGrath <roland@redhat.com> 2243 2244 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask. 2245 Declare __libdw_free_zdata. 2246 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function. 2247 (dwarf_end): Call it. 2248 2249 * dwarf_begin_elf.c (valid_p): Likewise. 2250 (check_section, scngrp_read): Likewise. 2251 (check_section) [USE_ZLIB]: Grok .z* flavors of sections. 2252 22532010-10-13 Roland McGrath <roland@redhat.com> 2254 2255 * dwarf.h: Add DW_LANG_Go. 2256 22572010-10-05 Roland McGrath <roland@redhat.com> 2258 2259 * dwarf_getaranges.c: Use malloc rather than alloca, 2260 since the total number of elements can be quite huge. 2261 22622010-07-26 Roland McGrath <roland@redhat.com> 2263 2264 * dwarf_getlocation_implicit_pointer.c: New file. 2265 * Makefile.am (libdw_a_SOURCES): Add it. 2266 * libdw.map (ELFUTILS_0.149): New set. 2267 Add dwarf_getlocation_implicit_pointer. 2268 * libdw.h: Declare it. 2269 2270 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global. 2271 (dwarf_offdie, dwarf_offdie_types): Update callers. 2272 * libdwP.h: Declare it. 2273 2274 * dwarf.h: Add DW_OP_GNU_implicit_pointer. 2275 * dwarf_getlocation.c (__libdw_intern_expression): Handle it. 2276 22772010-08-24 Roland McGrath <roland@redhat.com> 2278 2279 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line. 2280 22812010-07-27 Roland McGrath <roland@redhat.com> 2282 2283 * dwarf_formref_die.c: Fix sig8 hash insertion. 2284 22852010-06-23 Roland McGrath <roland@redhat.com> 2286 2287 * cfi.c (dwarf_cfi_validate_fde): Function removed. 2288 * libdw.h: Remove it. 2289 * libdw.map: Likewise. 2290 22912010-06-22 Roland McGrath <roland@redhat.com> 2292 2293 * dwarf_getlocation.c (check_constant_offset): data[48] are constant. 2294 2295 * dwarf_getsrclines.c: Fix signed comparison warning in extended 2296 opcode parsing. 2297 22982010-06-21 Roland McGrath <roland@redhat.com> 2299 2300 * dwarf.h: Add DW_TAG_GNU_* constants. 2301 2302 * memory-access.h (get_sleb128_rest_return): Fix sign extension for 2303 10-byte case. 2304 23052010-06-20 Roland McGrath <roland@redhat.com> 2306 2307 * libdw_findcu.c (__libdw_findcu): Take new flag argument, 2308 to search TUs instead of CUs. 2309 * libdwP.h: Update decl. 2310 (struct Dwarf): New member tu_tree. 2311 * dwarf_end.c (dwarf_end): Clean up tu_tree. 2312 * dwarf_offdie.c (do_offdie): New function, broken out of ... 2313 (dwarf_offdie): ... here. 2314 (dwarf_offdie_types): New function. 2315 * libdw.h: Declare it. 2316 * libdw.map (ELFUTILS_0.148): Add it. 2317 2318 * libdwP.h (CUDIE): Use cu_data. 2319 * dwarf_formblock.c: Likewise. 2320 * dwarf_formref_die.c: Likewise. 2321 * dwarf_diecu.c: Use CUDIE macro. 2322 * dwarf_formaddr.c: Use cu_sec_idx. 2323 23242010-06-16 Roland McGrath <roland@redhat.com> 2325 2326 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so 2327 we don't repeat a CU lookup we've already done. Handle 2328 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit. 2329 2330 * libdw_findcu.c (__libdw_intern_next_unit): New function, 2331 broken out of ... 2332 (__libdw_findcu): ... here. Call it. 2333 * libdwP.h: Declare it. 2334 (struct Dwarf): New member next_tu_offset. 2335 2336 * dwarf_sig8_hash.c: New file. 2337 * dwarf_sig8_hash.h: New file. 2338 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them. 2339 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before 2340 defining NO_UNDEF. 2341 * libdwP.h (struct Dwarf): New member sig8_hash. 2342 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it. 2343 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it. 2344 2345 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ... 2346 (dwarf_nextcu): ... here. Call it. 2347 * libdw.h: Declare it. 2348 * libdwP.h: Add INTDECL. 2349 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu. 2350 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit. 2351 2352 * libdwP.h (cu_sec_idx, cu_data): New functions. 2353 Use .debug_types when CU is a TU. 2354 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info. 2355 * dwarf_siblingof.c: Likewise. 2356 * dwarf_formstring.c: Likewise. 2357 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise. 2358 * dwarf_getlocation.c (dwarf_getlocation): Likewise. 2359 (dwarf_getlocation_addr): Likewise. 2360 2361 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8. 2362 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute 2363 .debug_types header size instead of .debug_info header size. 2364 (CUDIE): Use it. 2365 * dwarf_diecu.c: Update caller. 2366 * dwarf_getaranges.c: Likewise. 2367 * dwarf_nextcu.c: Likewise. 2368 * libdw_findcu.c (__libdw_findcu): Initialize new members. 2369 2370 * fde.c (fde_by_offset): Renamed to ... 2371 (__libdw_fde_by_offset): ... this, made global and internal_function. 2372 Don't take ADDRESS argument. 2373 (__libdw_find_fde): Update caller. Do address sanity check here. 2374 * cfi.h: Declare __libdw_fde_by_offset. 2375 * cfi.c (dwarf_cfi_validate_fde): New function. 2376 * libdw.h: Declare it. 2377 * libdw.map (ELFUTILS_0.148): Add it. 2378 2379 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to 2380 either DW_EH_PE_udata8 or DW_EH_PE_udata4. 2381 2382 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect. 2383 Don't assume DW_EH_PE_aligned refers to native address size. 2384 2385 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the 2386 address. 2387 23882010-06-17 Roland McGrath <roland@redhat.com> 2389 2390 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and 2391 op_index. 2392 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts 2393 into an inner inline function. Set new fields. Check all fields for 2394 overflow when setting. 2395 * dwarf_lineisa.c: New file. 2396 * dwarf_linediscriminator.c: New file. 2397 * dwarf_lineop_index.c: New file. 2398 * Makefile.am (libdw_a_SOURCES): Add them. 2399 * libdw.map (ELFUTILS_0.148): Add them. 2400 * libdw.h: Declare them. 2401 24022010-06-16 Roland McGrath <roland@redhat.com> 2403 2404 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding. 2405 2406 * fde.c (fde_by_offset): Renamed to ... 2407 (__libdw_fde_by_offset): ... this, made global and internal_function. 2408 Don't take ADDRESS argument. 2409 (__libdw_find_fde): Update caller. Do address sanity check here. 2410 * cfi.h: Declare __libdw_fde_by_offset. 2411 * cfi.c (dwarf_cfi_validate_fde): New function. 2412 * libdw.h: Declare it. 2413 * libdw.map (ELFUTILS_0.148): Add it. 2414 2415 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to 2416 either DW_EH_PE_udata8 or DW_EH_PE_udata4. 2417 2418 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect. 2419 Don't assume DW_EH_PE_aligned refers to native address size. 2420 2421 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the 2422 address. 2423 24242010-06-15 Roland McGrath <roland@redhat.com> 2425 2426 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like 2427 DW_FORM_ref_addr. 2428 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way 2429 here, since we don't support it yet. 2430 2431 * dwarf_next_cfi.c: Handle version 4 format. 2432 2433 * dwarf_getsrclines.c: Handle version 4 format. 2434 24352010-06-01 Roland McGrath <roland@redhat.com> 2436 2437 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types. 2438 * dwarf_begin_elf.c (dwarf_scnnames): Likewise. 2439 2440 * libdwP.h (CIE_VERSION): Remove unused macro. 2441 2442 * dwarf_getsrclines.c: Fix version field test. 2443 * libdwP.h (DWARF_VERSION): Remove useless macro. 2444 2445 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling. 2446 2447 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc. 2448 2449 * libdw_findcu.c (__libdw_findcu): Accept version 4. 2450 24512010-05-31 Mark Wielaard <mjw@redhat.com> 2452 2453 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to .. 2454 * libdw.h (dwarf_cfi_cie_p): ... here. 2455 24562010-05-31 Mark Wielaard <mjw@redhat.com> 2457 2458 * dwarf.h: Fix DW_LANG_Python constant. 2459 24602010-05-28 Eduardo Santiago <santiago@redhat.com> 2461 2462 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first 2463 thing. 2464 24652010-05-27 Roland McGrath <roland@redhat.com> 2466 2467 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name, 2468 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator. 2469 24702010-05-08 Roland McGrath <roland@redhat.com> 2471 2472 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument 2473 REF_SIZE. Use that to handle DW_OP_call_ref correctly. 2474 (getlocation): Update caller. 2475 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise. 2476 * dwarf_frame_register.c (dwarf_frame_register): Likewise. 2477 * libdwP.h: Update decl. 2478 24792010-04-26 Roland McGrath <roland@redhat.com> 2480 2481 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule. 2482 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for 2483 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force. 2484 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid. 2485 2486 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP. 2487 Prepend DW_OP_call_frame_cfa if true. 2488 (getlocation): Update caller. 2489 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise. 2490 * dwarf_frame_register.c (dwarf_frame_register): Likewise. 2491 * libdwP.h: Update decl. 2492 24932010-04-22 Roland McGrath <roland@redhat.com> 2494 2495 * cfi.c (execute_cfi): Never return without cleanup. 2496 Free FS on failure. 2497 (cie_cache_initial_state): Adjust caller to expect that free. 2498 (__libdw_frame_at_address): Likewise. 2499 25002010-03-10 Roland McGrath <roland@redhat.com> 2501 2502 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report. 2503 25042010-02-15 Roland McGrath <roland@redhat.com> 2505 2506 * Makefile.am: Use config/eu.am for common stuff. 2507 25082010-02-02 Mark Wielaard <mjw@redhat.com> 2509 2510 * fde.c (intern_fde): Fix length check for sized_augmentation_data. 2511 25122010-01-07 Roland McGrath <roland@redhat.com> 2513 2514 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum. 2515 25162010-01-05 Roland McGrath <roland@redhat.com> 2517 2518 * dwarf_aggregate_size.c: New file. 2519 * Makefile.am (libdw_a_SOURCES): Add it. 2520 * libdw.h: Declare it. 2521 * libdwP.h: Add INTDECL. 2522 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size. 2523 2524 * dwarf_srclang.c: Add INTDEF. 2525 * libdwP.h: Add INTDECL. 2526 2527 * dwarf.h: Add some more DW_AT_GNU_* types from gcc. 2528 2529 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name. 2530 25312009-11-21 Roland McGrath <roland@redhat.com> 2532 2533 * dwarf_getlocation.c (check_constant_offset): Return 1 for all 2534 non-constant forms. 2535 25362009-10-15 Roland McGrath <roland@redhat.com> 2537 2538 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset, 2539 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8. 2540 25412009-09-17 Roland McGrath <roland@redhat.com> 2542 2543 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP 2544 argument a pointer to const. 2545 * libdw.h: Update decl. 2546 25472009-09-10 Roland McGrath <roland@redhat.com> 2548 2549 * dwarf_getlocation.c (store_implicit_value): New function. 2550 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value. 2551 (dwarf_getlocation_implicit_value): New function. 2552 * libdw.h: Declare it. 2553 * libdw.map (ELFUTILS_0.143): Add it. 2554 25552009-09-09 Mark Wielaard <mjw@redhat.com> 2556 2557 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl. 2558 25592009-08-21 Josh Stone <jistone@redhat.com> 2560 2561 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too. 2562 25632009-08-10 Roland McGrath <roland@redhat.com> 2564 2565 * dwarf_getscopevar.c: Use dwarf_diename. 2566 25672009-08-09 Roland McGrath <roland@redhat.com> 2568 2569 * libdw.map (ELFUTILS_0.143): New version set, 2570 inherits from ELFUTILS_0.142. 2571 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an 2572 alias in the ELFUTILS_0.122 version set and the default in the new set. 2573 * dwarf_srclang.c: Likewise. 2574 * dwarf_decl_file.c: Likewise. 2575 * dwarf_decl_line.c: Likewise. 2576 * dwarf_decl_column.c: Likewise. 2577 * dwarf_bytesize.c: Likewise. 2578 * dwarf_bitsize.c: Likewise. 2579 * dwarf_bitoffset.c: Likewise. 2580 25812009-08-07 Roland McGrath <roland@redhat.com> 2582 2583 * dwarf_arrayorder.c: Use dwarf_attr_integrate. 2584 * dwarf_srclang.c: Likewise. 2585 * dwarf_decl_file.c: Likewise. 2586 * dwarf_decl_line.c (__libdw_attr_intval): Likewise. 2587 * dwarf_bytesize.c: Likewise. 2588 * dwarf_bitsize.c: Likewise. 2589 * dwarf_bitoffset.c: Likewise. 2590 25912009-07-22 Roland McGrath <roland@redhat.com> 2592 2593 * dwarf_frame_cfa.c: Change calling convention. 2594 * libdw.h: Update decl. 2595 2596 * dwarf_frame_register.c: Change calling/return-value convention for 2597 value-only results and undefined/same_value. 2598 * libdw.h: Update decl. 2599 2600 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool 2601 argument, append DW_OP_stack_value if set. Don't take NOPS argument, 2602 return that value instead. 2603 (getlocation): Update caller. 2604 * dwarf_frame_cfa.c: Likewise. 2605 * libdwP.h: Update decl. 2606 26072009-07-21 Roland McGrath <roland@redhat.com> 2608 2609 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list. 2610 Fix loop iteration after skipping a bogus or useless CU. 2611 2612 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless 2613 absence, not DWARF_E_NO_DEBUG_LINE. 2614 26152009-07-20 Roland McGrath <roland@redhat.com> 2616 2617 * dwarf_getlocation.c (__libdw_intern_expression): 2618 Handle DW_OP_stack_value. 2619 26202009-07-16 Roland McGrath <roland@redhat.com> 2621 2622 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset, 2623 reject others when CU's version > 3. 2624 2625 * dwarf_formflag.c: Handle DW_FORM_flag_present. 2626 2627 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft. 2628 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type. 2629 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset, 2630 and DW_AT_const_expr. 2631 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present, 2632 and DW_FORM_ref_sig8. 2633 26342009-07-15 Roland McGrath <roland@redhat.com> 2635 2636 * dwarf_getlocation.c: Grok DW_OP_form_tls_address, 2637 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece. 2638 26392009-07-13 Roland McGrath <roland@redhat.com> 2640 2641 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa. 2642 26432009-07-08 Roland McGrath <roland@redhat.com> 2644 2645 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi, 2646 dwfl_module_eh_cfi. 2647 2648 * libdwP.h (struct Dwarf): Add member `cfi'. 2649 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it. 2650 * dwarf_getcfi.c: New file. 2651 * dwarf_getcfi_elf.c: New file. 2652 * dwarf_cfi_end.c: New file. 2653 * dwarf_cfi_addrframe.c: New file. 2654 * dwarf_frame_cfa.c: New file. 2655 * dwarf_frame_register.c: New file. 2656 * dwarf_frame_return_address_register.c: New file. 2657 * Makefile.am (libdw_a_SOURCES): Add them. 2658 * unwind.h: Declare those functions. 2659 * libdw.map (ELFUTILS_0.142): Export them. 2660 2661 * dwarf_getlocation.c (__libdw_intern_expression): New function, 2662 broken out of ... 2663 (getlocation): ... here, call it. 2664 * libdwP.h: Declare it. 2665 2666 * cie.c: New file. 2667 * fde.c: New file. 2668 * frame-cache.c: New file. 2669 * cfi.c: New file. 2670 * cfi.h: New file. 2671 * encoded-value.h: New file. 2672 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them. 2673 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum. 2674 * dwarf_error.c (errmsgs): Add element for it. 2675 2676 * dwarf_next_cfi.c: New file. 2677 * Makefile.am (libdw_a_SOURCES): Add it. 2678 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types. 2679 Declare dwarf_next_cfi. 2680 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136. 2681 Add dwarf_next_cfi. 2682 2683 * memory-access.h [! ALLOW_UNALIGNED] 2684 (read_2ubyte_unaligned): Renamed to ... 2685 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *. 2686 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order. 2687 (read_2sbyte_unaligned): Likewise. 2688 (read_4ubyte_unaligned): Likewise. 2689 (read_4sbyte_unaligned): Likewise. 2690 (read_8ubyte_unaligned): Likewise. 2691 (read_8sbyte_unaligned): Likewise. 2692 2693 * libdwP.h (IDX_eh_frame): Remove it. 2694 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element. 2695 26962009-07-08 Roland McGrath <roland@redhat.com> 2697 2698 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better. 2699 2700 * dwarf_getlocation.c (check_constant_offset): New function. 2701 (dwarf_getlocation, dwarf_getlocation_addr): Call it to 2702 handle DW_AT_data_member_location of data[48] as constant offset. 2703 27042009-06-18 Roland McGrath <roland@redhat.com> 2705 2706 * libdwP.h (__libdw_read_address_inc): Constify. 2707 (__libdw_read_offset_inc): Likewise. 2708 * dwarf_getaranges.c: Likewise. 2709 * dwarf_getlocation.c: Likewise. 2710 * dwarf_getsrclines.c: Likewise. 2711 * dwarf_nextcu.c: Likewise. 2712 27132009-05-05 Petr Machata <pmachata@redhat.com> 2714 2715 * libdwP.h (__libdw_formptr): Declare new function. 2716 * dwarf_formudata.c: Implement it here. 2717 * dwarf_getlocation.c (dwarf_getlocation_addr): 2718 Call it instead of hand-rolled offset handling code. 2719 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise. 2720 * dwarf_ranges.c (dwarf_ranges): Likewise. 2721 27222009-05-04 Petr Machata <pmachata@redhat.com> 2723 2724 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function. 2725 * dwarf_ranges.c: Implement it here. 2726 (dwarf_ranges): Call it. 2727 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here. 2728 27292009-04-23 Petr Machata <pmachata@redhat.com> 2730 2731 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead 2732 of read_*ubyte_unaligned. 2733 * dwarf_formref_die.c (dwarf_formref_die): Likewise. 2734 * dwarf_formstring.c (dwarf_formstring): Likewise. 2735 * dwarf_formudate.c (dwarf_formudata): Likewise. 2736 * dwarf_getaranges.c (dwarf_getaranges): Likewise. 2737 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise. 2738 * dwarf_getpubnames.c (get_offsets): Likewise. 2739 * dwarf_nextcu.c (dwarf_nextcu): Likewise. 2740 27412009-04-23 Petr Machata <pmachata@redhat.com> 2742 2743 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc, 2744 __libdw_read_addr, __libdw_read_off): Add four new internal 2745 functions. 2746 27472009-05-07 Roland McGrath <roland@redhat.com> 2748 2749 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in 2750 return value and OFFSET argument, not CU-relative. Only fetch the 2751 attribute data when called with OFFSET of 0. 2752 27532009-05-07 Petr Machata <pmachata@redhat.com> 2754 2755 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in 2756 DW_AT_macro_info attribute of CU DIE. 2757 27582009-04-15 Roland McGrath <roland@redhat.com> 2759 2760 * dwarf.h (DW_CIE_ID): Removed. 2761 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it. 2762 27632009-04-01 Roland McGrath <roland@redhat.com> 2764 2765 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended. 2766 27672009-01-28 Roland McGrath <roland@redhat.com> 2768 2769 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s 2770 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef. 2771 2772 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field. 2773 27742009-01-26 Roland McGrath <roland@redhat.com> 2775 2776 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all. 2777 27782009-01-25 Roland McGrath <roland@redhat.com> 2779 2780 * dwarf_getattrs.c: Correctly skip attribute values when restarting. 2781 27822009-01-23 Roland McGrath <roland@redhat.com> 2783 2784 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back. 2785 Put these rules under if MAINTAINER_MODE. 2786 27872009-01-22 Roland McGrath <roland@redhat.com> 2788 2789 * dwarf.h: Add DW_OP_GNU_encoded_addr. 2790 27912009-01-21 Roland McGrath <roland@redhat.com> 2792 2793 * Makefile.am (CLEANFILES): Renamed to ... 2794 (MOSTLYCLEANFILES): ... here. 2795 (CLEANFILES): New variable, add known-dwarf.h. 2796 27972009-01-17 Roland McGrath <roland@redhat.com> 2798 2799 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir). 2800 Make it unconditional. 2801 (BUILT_SOURCES): Updated. 2802 2803 * dwarf.h: Add description comments for DW_LANG_* values. 2804 2805 * Makefile.am [MAINTAINER_MODE] 2806 ($(srcdir)/known-dwarf.h): New target. 2807 (BUILT_SOURCES): Add it. 2808 2809 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit. 2810 28112009-01-10 Ulrich Drepper <drepper@redhat.com> 2812 2813 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code. 2814 28152009-01-08 Roland McGrath <roland@redhat.com> 2816 2817 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in. 2818 28192008-01-06 Roland McGrath <roland@redhat.com> 2820 2821 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool. 2822 Reorder members. 2823 * dwarf_haschildren.c: Return -1 for error case, not 0. 2824 2825 * Makefile.am (libdw.so): Link in $(zip_LIBS). 2826 28272009-01-06 Ulrich Drepper <drepper@redhat.com> 2828 2829 * dwarf.h: Add definition for unwind and call frame information. 2830 2831 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned, 2832 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc. 2833 28342008-08-15 Roland McGrath <roland@redhat.com> 2835 2836 * libdw.map (ELFUTILS_0.136): New version set, inherits from 2837 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment. 2838 28392008-01-21 Ulrich Drepper <drepper@redhat.com> 2840 2841 * dwarf_child.c: Minor optimizations. 2842 * dwarf_getattrs.c: Likewise. 2843 * dwarf_getpubnames.c: Likewise. 2844 * dwarf_siblingof.c: Likewise. 2845 * dwarf_tag.c: Likewise. 2846 28472008-01-18 Ulrich Drepper <drepper@redhat.com> 2848 2849 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match 2850 of DWARF_VERSION comparison, just fail if the file's version is newer. 2851 28522008-01-17 Nick Clifton <nickc@redhat.com> 2853 2854 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define. 2855 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define. 2856 (DWARF3_LENGTH_64_BIT): New define. 2857 * dwarf_getaranges (dwarf_getaranges): Use the new definitions. 2858 * dwarf_getpubnames: Include dwarf.h. 2859 (get_offsets): Use the new definitions. 2860 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions. 2861 * dwarf_nextcu.c: Include dwarf.h. Correct comment. 2862 (dwarf_nextcu): Use the new definitions. 2863 2864 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro. 2865 * dwarf_diecu.c (dwarf_diecu): Use the new macro. 2866 * dwarf_getaranges (dwarf_getaranges): Use the new macro. 2867 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro. 2868 2869 * dwarf_getpubnames (get_offsets): Replace assertion with test and 2870 error return. 2871 2872 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE. 2873 2874 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer. 2875 Set the address in the return structure to the address of the next 2876 non-sibling die, if there is no sibling and the return pointer is 2877 not the same as the die pointer. 2878 * libdw.h: Expand the description of the dwarf_siblingof prototype. 2879 2880 * dwarf_child.c: Fix typo in comment. 2881 2882 * libdwP.h (DWARF_VERSION): Change to 3. 2883 2884 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do 2885 not have a initialised valp pointer. 2886 2887 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when 2888 the end of the attributes is reached. When the callback fails, 2889 return the address of the failing attribute, not the address of 2890 its successor. 2891 * libdw.h: Expand the description of the dwarf_getattrs prototype. 2892 2893 * dwarf_child.c (__libdw_find_attr): Use the new definition. 2894 (dwarf_child): Likewise. 2895 * dwarf_tag.c (__libdw_findabbrev): Likewise. 2896 (dwarf_tag): Likewise. 2897 28982008-01-08 Roland McGrath <roland@redhat.com> 2899 2900 * Makefile.am (euinclude): Variable removed. 2901 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS. 2902 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir). 2903 29042007-10-17 Roland McGrath <roland@redhat.com> 2905 2906 * libdw.h (__deprecated_attribute__): New macro. 2907 (dwarf_formref): Mark it deprecated. 2908 * dwarf_formref.c (__libdw_formref): New function, broken out of ... 2909 (dwarf_formref): ... here. Call it. Remove INTDEF. 2910 * libdwP.h: Remove INTDECL. 2911 Declare __libdw_formref. 2912 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead. 2913 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here. 2914 2915 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result, 2916 needs to check CU->version. 2917 2918 * libdwP.h (struct Dwarf_CU): New member `version'. 2919 * libdw_findcu.c (__libdw_findcu): Initialize it. 2920 2921 * dwarf_child.c: Return 1 for null entry as first child. 2922 29232007-10-05 Roland McGrath <roland@redhat.com> 2924 2925 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections. 2926 2927 * libdw.h (__extern_inline): Rename to __libdw_extern_inline. 2928 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses. 2929 29302007-10-03 Roland McGrath <roland@redhat.com> 2931 2932 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf 2933 and dwfl_build_id_find_debuginfo. 2934 2935 * libdw.map (ELFUTILS_0.130): New version set, inherits from 2936 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id. 2937 29382007-10-02 Roland McGrath <roland@redhat.com> 2939 2940 * libdw_visit_scopes.c (classify_die): Return walk for class_type and 2941 structure_type. 2942 29432007-08-07 Roland McGrath <roland@redhat.com> 2944 2945 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when 2946 error code is DWARF_E_NOERROR (0). 2947 2948 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune. 2949 Fix typo in __libdw_visit_scopes argument. 2950 2951 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return, 2952 swallow DWARF_E_NO_DEBUG_RANGES but not other errors. 2953 29542007-07-03 Roland McGrath <roland@redhat.com> 2955 2956 * libdw.h (__extern_inline): New macro. 2957 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it. 2958 29592007-04-16 Roland McGrath <roland@redhat.com> 2960 2961 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section. 2962 29632007-04-05 Roland McGrath <roland@redhat.com> 2964 2965 * dwarf_getsrcdirs.c: New file. 2966 * Makefile.am (libdw_a_SOURCES): Add it. 2967 * libdw.h: Declare dwarf_getsrcdirs. 2968 * libdw.map (ELFUTILS_0.127): Add it. 2969 2970 * libdwP.h (struct Dwarf_Files_s): New member ndirs. 2971 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to 2972 zero before we use it to check for DWARF_E_INVALID_DIR_IDX. 2973 Save DIRARRAY in the Dwarf_Files. 2974 2975 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN 2976 address to check for all-ones base address entry. Check directly. 2977 Reported by Sébastien Dugué <sebastien.dugue@bull.net>. 2978 29792007-03-25 Roland McGrath <roland@redhat.com> 2980 2981 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void. 2982 Return NULL when freeing RESULT on error. 2983 (global_read, scngrp_read): Check return value from check_section, 2984 break out of loop after it has freed RESULT. 2985 (valid_p): Handle null argument. 2986 29872007-03-12 Roland McGrath <roland@redhat.com> 2988 2989 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add. 2990 29912007-03-04 Roland McGrath <roland@redhat.com> 2992 2993 * libdw.map (ELFUTILS_0.127): New version set, inherits from 2994 ELFUTILS_0.126. Add dwfl_module_addrsym. 2995 29962007-02-10 Roland McGrath <roland@redhat.com> 2997 2998 * dwarf.h (DW_OP_fbreg): Comment fix. 2999 30002007-02-03 Roland McGrath <roland@redhat.com> 3001 3002 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf. 3003 * libdw.map (ELFUTILS_0.126): New version set, inherits from 3004 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly 3005 exported in the past. 3006 30072006-12-17 Roland McGrath <roland@redhat.com> 3008 3009 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base 3010 address when the CU is missing attributes due to buggy GCC. 3011 30122006-08-29 Roland McGrath <roland@redhat.com> 3013 3014 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION). 3015 3016 * libdw.h (dwarf_diecu): Add __nonnull_attribute__. 3017 (dwarf_child): Don't list arg 1 in __nonnull_attribute__. 3018 3019 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure 3020 result is aligned. Adjust NEWP->remaining here for this allocation. 3021 * libdwP.h: Update decl. 3022 (libdw_alloc): Update caller. 3023 30242006-07-12 Ulrich Drepper <drepper@redhat.com> 3025 3026 * dwarf_child.c: Adjust for internal_function_def removal. 3027 * dwarf_getabbrev.c: Likewise. 3028 * dwarf_tag.c: Likewise. 3029 * libdw_form.c: Likewise. 3030 * memory-access.c: Likewise. 3031 30322006-06-28 Roland McGrath <roland@redhat.com> 3033 3034 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir. 3035 3036 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and 3037 dwfl_module_getsym. 3038 30392006-05-27 Ulrich Drepper <drepper@redhat.com> 3040 3041 * libdw.h: Add extern "C". 3042 30432006-05-22 Ulrich Drepper <drepper@redhat.com> 3044 3045 * dwarf_getaranges.c (dwarf_getaranges): Handle files without 3046 aranges information. 3047 30482006-05-21 Ulrich Drepper <drepper@redhat.com> 3049 3050 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs, 3051 dwarf_haschildren. 3052 30532006-02-28 Roland McGrath <roland@redhat.com> 3054 3055 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*, 3056 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_* 3057 values from DWARF 3.0. 3058 30592006-02-22 Roland McGrath <roland@redhat.com> 3060 3061 * libdw.map: Bump to 0.120; export dwfl_version. 3062 30632005-12-22 Roland McGrath <roland@redhat.com> 3064 3065 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report. 3066 30672005-12-12 Roland McGrath <roland@redhat.com> 3068 3069 * dwarf_ranges.c: Copy CU base address-finding code from 3070 dwarf_getlocation. 3071 30722005-12-09 Roland McGrath <roland@redhat.com> 3073 3074 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys. 3075 Delay CU base lookup until it's needed. 3076 If CU base lookup fails with no error, flag invalid DWARF. 3077 30782005-11-25 Roland McGrath <roland@redhat.com> 3079 3080 * libdw.map: Bump to 0.118; export dwfl_module_register_names. 3081 30822005-11-15 Roland McGrath <roland@redhat.com> 3083 3084 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic. 3085 30862005-11-13 Roland McGrath <roland@redhat.com> 3087 3088 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location. 3089 30902005-10-27 Roland McGrath <roland@redhat.com> 3091 3092 * dwarf_entry_breakpoints.c (search_range): Fix binary search code; 3093 don't match end_sequence markers. 3094 3095 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers 3096 before normal records at the same address. 3097 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence 3098 marker. 3099 31002005-10-26 Roland McGrath <roland@redhat.com> 3101 3102 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func. 3103 * dwarf_func_file.c: Renamed to ... 3104 * dwarf_decl_file.c: ... here. 3105 * dwarf_func_col.c: Renamed to ... 3106 * dwarf_decl_column.c: ... here. 3107 * dwarf_func_line.c: Renamed to ... 3108 * dwarf_decl_line.c: ... here. 3109 (dwarf_func_line): Renamed to ... 3110 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument. 3111 (__libdw_func_intval): Renamed __libdw_attr_intval. 3112 * dwarf_func_name.c: File removed. 3113 * dwarf_func_lowpc.c: File removed. 3114 * dwarf_func_highpc.c: File removed. 3115 * dwarf_func_entrypc.c: File removed. 3116 * dwarf_func_die.c: File removed. 3117 * Makefile.am (libdw_a_SOURCES): Updated. 3118 * libdw.h: Update decls. 3119 (Dwarf_Func): Type removed. 3120 * libdwP.h: Update decls. 3121 (struct Dwarf_Func_s): Type removed. 3122 * libdw.map: Updated. 3123 3124 * libdwP.h (CUDIE): New macro. 3125 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it. 3126 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise. 3127 * dwarf_ranges.c (dwarf_ranges): Likewise. 3128 3129 * dwarf_getloclist.c: Renamed to ... 3130 * dwarf_getlocation.c: ... here. 3131 (getloclist): Renamed to getlocation. 3132 (dwarf_getloclist): Renamed to dwarf_getlocation. 3133 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr. 3134 * Makefile.am (libdw_a_SOURCES): Updated. 3135 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation. 3136 (dwarf_addrloclists): Renamed dwarf_getlocation_addr. 3137 (Dwarf_Loc): Renamed Dwarf_Op. 3138 * libdwP.h (struct loc_s): Update use. 3139 * libdw.map: Update map. 3140 3141 * dwarf_entry_breakpoints.c: Use the second line record within the 3142 function, regardless of its source location data. 3143 31442005-10-25 Roland McGrath <roland@redhat.com> 3145 3146 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too. 3147 3148 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints. 3149 31502005-10-14 Roland McGrath <roland@redhat.com> 3151 3152 * dwarf_diecu.c (dwarf_diecu): New file. 3153 * Makefile.am (libdw_a_SOURCES): Add it. 3154 * libdw.h: Declare dwarf_diecu. 3155 * libdw.map: Export it. 3156 3157 * libdw.map: Bump to 0.116; export dwarf_ranges. 3158 31592005-09-20 Roland McGrath <roland@redhat.com> 3160 3161 * dwarf_haspc.c: Use dwarf_ranges. 3162 * dwarf_entry_breakpoints.c: Likewise. 3163 3164 * dwarf_ranges.c: New file. 3165 * Makefile.am (libdw_a_SOURCES): Add it. 3166 * libdw.h: Declare dwarf_ranges. 3167 * libdwP.h: Add INTDECL. 3168 31692005-09-14 Roland McGrath <roland@redhat.com> 3170 3171 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in 3172 prologue_end marker scanning loop. 3173 31742005-09-11 Roland McGrath <roland@redhat.com> 3175 3176 * dwarf.h: Comment typo fix. 3177 31782005-09-07 Roland McGrath <roland@redhat.com> 3179 3180 * dwarf_entry_breakpoints.c: New file. 3181 * Makefile.am (libdw_a_SOURCES): Add it. 3182 * libdw.h: Declare dwarf_entry_breakpoints. 3183 3184 * dwarf_entrypc.c: New file. 3185 * Makefile.am (libdw_a_SOURCES): Add it. 3186 * libdw.h: Declare dwarf_entrypc. 3187 * libdwP.h: Add INTDECL. 3188 31892005-08-28 Ulrich Drepper <drepper@redhat.com> 3190 3191 * Makefile.am: Use $(LINK) not $(CC) when creating DSO. 3192 (%.os): Use COMPILE.os. 3193 (COMPILE.os): Filter out gconv options. 3194 31952005-08-27 Roland McGrath <roland@redhat.com> 3196 3197 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using 3198 __libdw_visit_scopes. 3199 3200 * dwarf_getscopes_die.c: New file. 3201 * Makefile.am (libdw_a_SOURCES): Add it. 3202 * libdw.h: Declare dwarf_getscopes_die. 3203 * libdw.map: Bump to 0.115 and add it. 3204 3205 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct 3206 containing a DIE and its parent pointer, instead of just Dwarf_Die. 3207 Take two functions for both preorder and postorder visitors. 3208 * libdwP.h: Update decl. 3209 (struct Dwarf_Die_Chain): New type. 3210 * dwarf_func_inline.c: Update uses. 3211 3212 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate. 3213 Add INTDEF. 3214 * libdwP.h: Add INTDECL. 3215 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename. 3216 32172005-08-23 Roland McGrath <roland@redhat.com> 3218 3219 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat 3220 DW_AT_specification the same as DW_AT_abstract_origin. 3221 32222005-08-20 Roland McGrath <roland@redhat.com> 3223 3224 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu. 3225 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address, 3226 and dwfl_report_offline. 3227 32282005-08-19 Roland McGrath <roland@redhat.com> 3229 3230 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes. 3231 Add dwfl_module_relocate_address, dwfl_module_relocations, 3232 dwfl_module_relocation_info. 3233 32342005-08-18 Roland McGrath <roland@redhat.com> 3235 3236 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as 3237 outermost scope in the results. 3238 32392005-08-15 Roland McGrath <roland@redhat.com> 3240 3241 * dwarf_func_inline.c: New file. 3242 * Makefile.am (libdw_a_SOURCES): Add it. 3243 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances. 3244 * libdw.map: Add them. 3245 3246 * dwarf_func_die.c: New file. 3247 * Makefile.am (libdw_a_SOURCES): Add it. 3248 * libdw.h: Declare dwarf_func_die. 3249 * libdw.map: Add it. Bump version to ELFUTILS_0.114. 3250 32512005-08-10 Ulrich Drepper <drepper@redhat.com> 3252 3253 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming 3254 of DW_LNS_set_epilog_begin. 3255 32562005-08-09 Roland McGrath <roland@redhat.com> 3257 3258 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin. 3259 3260 * dwarf_end.c: Add INTDEF. 3261 * dwarf_error.c (dwarf_errmsg): Likewise. 3262 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs. 3263 32642005-08-01 Roland McGrath <roland@redhat.com> 3265 3266 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset. 3267 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise. 3268 32692005-07-28 Ulrich Drepper <drepper@redhat.com> 3270 3271 * Makefile.am (libdw.so): No need to link with libeu.a anymore. 3272 (libdw_a_LIBADD): Add all files from libdwfl.a. 3273 32742005-07-27 Roland McGrath <roland@redhat.com> 3275 3276 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in, 3277 along with ../libebl/libebl.a and ../lib/libeu.a; 3278 depend on ../libelf/libelf.so. 3279 (libdw_so_LDADD): New variable. 3280 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map. 3281 3282 * libdw.map: Define an empty base version and move all symbols to 3283 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet. 3284 32852005-07-23 Ulrich Drepper <drepper@redhat.com> 3286 3287 * dwarf_error.c: Add internal alias for dwarf_errno. 3288 * libdwP.h: Declare __dwarf_errno_internal. 3289 * dwarf_getloclist.c: Use INTDEF for dwarf_errno. 3290 3291 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of 3292 global_error. 3293 32942005-06-01 Roland McGrath <roland@redhat.com> 3295 3296 * dwarf_getaranges.c (dwarf_getaranges): Sort result array. 3297 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search. 3298 32992005-06-08 Roland McGrath <roland@redhat.com> 3300 3301 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts. 3302 (get_sleb128_step, get_sleb128): Likewise. 3303 * dwarf_getattrs.c (dwarf_getattrs): Add consts. 3304 * dwarf_getloclist.c (getloclist): Likewise. 3305 * dwarf_formblock.c (dwarf_formblock): Likewise. 3306 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise. 3307 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise. 3308 * dwarf_formref.c (dwarf_formref): Likewise. 3309 * dwarf_formsdata.c (dwarf_formsdata): Likewise. 3310 * dwarf_formudata.c (dwarf_formudata): Likewise. 3311 * dwarf_haschildren.c (dwarf_haschildren): Likewise. 3312 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise. 3313 * dwarf_tag.c (dwarf_tag): Likewise. 3314 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise. 3315 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise. 3316 * libdw_form.c (__libdw_form_val_len): Likewise. 3317 * libdwP.h: Update decl. 3318 33192005-06-04 Roland McGrath <roland@redhat.com> 3320 3321 * memory-access.h (get_uleb128_rest_return): New macro. 3322 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it. 3323 (get_sleb128_rest_return): New macro. 3324 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it. 3325 * memory-access.c: New file. 3326 * Makefile.am (libdw_a_SOURCES): Add it. 3327 (DEFS): Add -DIS_LIBDW. 3328 33292005-05-31 Roland McGrath <roland@redhat.com> 3330 3331 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to 3332 formref offset. 3333 33342005-05-30 Roland McGrath <roland@redhat.com> 3335 3336 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base 3337 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it. 3338 3339 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte 3340 BEGIN value. Instead, match base address entries separately for 3341 32/64 size cases. 3342 33432005-05-28 Roland McGrath <roland@redhat.com> 3344 3345 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance 3346 past location expression contents. 3347 33482005-05-23 Roland McGrath <roland@redhat.com> 3349 3350 * dwarf_getsrclines.c: Comment typo fix. 3351 3352 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation. 3353 * dwarf_getloclist.c (dwarf_addrloclists): Likewise. 3354 33552005-05-22 Ulrich Drepper <drepper@redhat.com> 3356 3357 * libdwP.h: Only use INTDECL for alias prototypes. 3358 33592005-05-19 Roland McGrath <roland@redhat.com> 3360 3361 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too. 3362 3363 * dwarf_getscopevar.c: New file. 3364 * Makefile.am (libdw_a_SOURCES): Add it. 3365 * libdw.h: Declare dwarf_getscopevar. 3366 3367 * dwarf_getsrcfiles.c: Add INTDEF. 3368 * dwarf_haschildren.c: Likewise. 3369 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL. 3370 3371 * dwarf_getscopes.c: New file. 3372 * Makefile.am (libdw_a_SOURCES): Add it. 3373 * libdw.h: Declare dwarf_getscopes. 3374 * libdw.map: Add it. 3375 33762005-05-18 Roland McGrath <roland@redhat.com> 3377 3378 * libdwP.h (IDX_debug_ranges): New enum constant. 3379 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges". 3380 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant. 3381 * dwarf_error.c (errmsgs): Add it. 3382 * dwarf_haspc.c: New file. 3383 * libdw.h: Declare dwarf_haspc. 3384 * libdw.map: Add it. 3385 * libdwP.h: Add INTDECL. 3386 3387 * dwarf_attr_integrate.c: New file. 3388 * dwarf_hasattr_integrate.c: New file. 3389 * Makefile.am (libdw_a_SOURCES): Add them. 3390 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate. 3391 * libdw.map: Add them. 3392 3393 * dwarf_hasattr.c: Add INTDEF. 3394 * libdwP.h: Add INTDECL for it. 3395 3396 * dwarf_formref_die.c: New file. 3397 * Makefile.am (libdw_a_SOURCES): Add it. 3398 * libdw.h (dwarf_formref_die): Declare it. 3399 * libdwP.h (dwarf_formref_die): Add INTDECL. 3400 * libdw.map: Add it. 3401 3402 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out 3403 of ... 3404 (dwarf_getloclist): ... here. Call them. 3405 (dwarf_addrloclists): New function. 3406 * libdw.h: Declare it. 3407 * libdw.map: Add it. 3408 3409 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at 3410 DW_MACINFO_end_file. Recognize type 0 as terminator. 3411 34122005-05-05 Roland McGrath <roland@redhat.com> 3413 3414 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search. 3415 3416 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since 3417 the line program does not produce all entries in ascending order. 3418 34192005-04-25 Ulrich Drepper <drepper@redhat.com> 3420 3421 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple 3422 occurences (e.g., inlines) better. 3423 34242005-04-24 Ulrich Drepper <drepper@redhat.com> 3425 3426 * libdw.h (DWARF_END_ABBREV): Define. 3427 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if 3428 end is reached. 3429 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end 3430 of records reached. 3431 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV 3432 as error of __libdw_getabbrev. 3433 34342005-04-04 Ulrich Drepper <drepper@redhat.com> 3435 3436 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization. 3437 3438 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of 3439 results back to caller. 3440 34412005-04-04 Roland McGrath <roland@redhat.com> 3442 3443 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL. 3444 3445 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in 3446 defn. 3447 34482005-04-04 Ulrich Drepper <drepper@redhat.com> 3449 3450 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE. 3451 3452 * dwarf_getsrc_file.c: New file. 3453 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c. 3454 * libdw.h: Declare dwarf_getsrc_file. 3455 * libdw.map: Add dwarf_getsrc_file. 3456 34572005-04-02 Ulrich Drepper <drepper@redhat.com> 3458 3459 * dwarf_func_entrypc.c: New file. 3460 * dwarf_func_col.c: New file. 3461 * dwarf_func_line.c: New file. 3462 * dwarf_func_file.c: New file. 3463 * libdw.h: Add prototypes for new functions. 3464 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line, 3465 dwarf_func_file. 3466 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c, 3467 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c. 3468 * libdwP.h (struct Dwarf_Func_s): Add cudie element. 3469 Declare __libdw_func_intval and __dwarf_formsdata_internal. 3470 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object. 3471 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs. 3472 3473 * dwarf.h: Add some DWARF3 definitions. 3474 34752005-04-01 Ulrich Drepper <drepper@redhat.com> 3476 3477 * dwarf_getfuncs.c: New file. 3478 * dwarf_func_highpc.c: New file. 3479 * dwarf_func_lowpc.c: New file. 3480 * dwarf_func_name.c: New file. 3481 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c, 3482 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c. 3483 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc, 3484 and dwarf_func_name. 3485 * libdw.h: Add prototypes for new functions. 3486 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs. 3487 * dwarf_siblingof.c: Likewise. 3488 * dwarf_dieoffset.c: Likewise. 3489 * dwarf_highpc.c: Likewise. 3490 * dwarf_lowpc.c: Likewise. 3491 * libdwP.h: Add prototypes for internal functions. 3492 Define Dwarf_Func_s structure. 3493 34942005-03-29 Ulrich Drepper <drepper@redhat.com> 3495 3496 * libdw.h: Add padding in Dwarf_die. 3497 3498 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs. 3499 * dwarf_attr.c: Likewise. 3500 * dwarf_begin.c: Likewise. 3501 * dwarf_begin_elf.c: Likewise. 3502 * dwarf_bitoffset.c: Likewise. 3503 * dwarf_bitsize.c: Likewise. 3504 * dwarf_bytesize.c: Likewise. 3505 * dwarf_diename.c: Likewise. 3506 * dwarf_formaddr.c: Likewise. 3507 * dwarf_formblock.c: Likewise. 3508 * dwarf_formref.c: Likewise. 3509 * dwarf_formstring.c: Likewise. 3510 * dwarf_formudata.c: Likewise. 3511 * dwarf_getarange_addr.c: Likewise. 3512 * dwarf_getarangeinfo.c: Likewise. 3513 * dwarf_getaranges.c: Likewise. 3514 * dwarf_getloclist.c: Likewise. 3515 * dwarf_getmacros.c: Likewise. 3516 * dwarf_getsrc_die.c: Likewise. 3517 * dwarf_getsrcfiles.c: Likewise. 3518 * dwarf_getsrclines.c: Likewise. 3519 * dwarf_highpc.c: Likewise. 3520 * dwarf_lowpc.c: Likewise. 3521 * dwarf_nextcu.c: Likewise. 3522 * dwarf_offdie.c: Likewise. 3523 * dwarf_siblingof.c: Likewise. 3524 * dwarf_srclang.c: Likewise. 3525 * dwarf_tag.c: Likewise. 3526 * libdw_findcu.c: Likewise. 3527 * libdwP.h: Add prototypes for internal functions. 3528 3529 * dwarf_addrdie.c: New file. 3530 * dwarf_macro_opcode.c: New file. 3531 * dwarf_macro_param1.c: New file. 3532 * dwarf_macro_param2.c: New file. 3533 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h. 3534 * libdwP.h: Remove Dwarf_Macro definition. 3535 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c, 3536 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c. 3537 * libdw.map: Add entries for new functions. 3538 35392005-03-21 Ulrich Drepper <drepper@redhat.com> 3540 3541 * libdw.h: Handle broken gcc < 4. 3542 35432005-02-15 Ulrich Drepper <drepper@redhat.com> 3544 3545 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. 3546 3547 * dwarf_begin_elf.c: Fix warnings. 3548 * dwarf_dieoffset.c: Likewise. 3549 * dwarf_end.c: Likewise. 3550 * dwarf_error.c: Likewise. 3551 * dwarf_getpubnames.c: Likewise. 3552 3553 * libdwP.h: Add new error values. 3554 * dwarf_error.c: Support new error values. 3555 * dwarf_getpubnames.c: Check parameter value. 3556 35572005-02-05 Ulrich Drepper <drepper@redhat.com> 3558 3559 * Makefile.am: Check for text relocations in constructed DSO. 3560 3561 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. 3562 35632005-02-04 Ulrich Drepper <drepper@redhat.com> 3564 3565 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary 3566 checks to not read over buffer boundaries for ill-formed DWARF data. 3567 35682004-09-25 Ulrich Drepper <drepper@redhat.com> 3569 3570 * dwarf_child.c: Make compile with gcc 4.0. 3571 * dwarf_error.c: Likewise. 3572 * dwarf_formblock.c: Likewise. 3573 * dwarf_getabbrev.c: Likewise. 3574 * dwarf_getattrs.c: Likewise. 3575 * dwarf_getsrclines.c: Likewise. 3576 * dwarf_tag.c: Likewise. 3577 * libdw_form.c: Likewise. 3578 35792004-01-20 Ulrich Drepper <drepper@redhat.com> 3580 3581 * Makefile.am: Support building with mudflap. 3582 3583 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out. 3584 * dwarf_getsrclines.c: Likewise. 3585 * dwarf_memory-access.h: Likewise. 3586 35872004-01-19 Ulrich Drepper <drepper@redhat.com> 3588 3589 * dwarf_getsrcfiles.c: Third parameter can be NULL. 3590 3591 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros. 3592 Third parameter of dwarf_getsrcfiles can be NULL. 3593 3594 * libdw.map: Add dwarf_getmacros. 3595 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros. 3596 * dwarf_getmacros.c: New file. 3597 35982004-01-18 Ulrich Drepper <drepper@redhat.com> 3599 3600 * libdw.h: Second parameter of dwarf_getaranges can be NULL. 3601 3602 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL. 3603 3604 * dwarf_getsrclines.c: 3605 Use read_2ubyte_unaligned_inc instead of _inc-less variant. 3606 3607 * dwarf_getaranges.c: Allow naranges parameter to be NULL. 3608 3609 * libdwP.h (_): Use elfutils domain. 3610 3611 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction. 3612 3613 * dwarf_getsrclines.c: Fix typo in comment. 3614 36152004-01-17 Ulrich Drepper <drepper@redhat.com> 3616 3617 * Makefile.am: Support building with mudflap. 3618 36192004-01-16 Ulrich Drepper <drepper@redhat.com> 3620 3621 * memory-access.h: Add lots of const in case a pointer passed is const. 3622 3623 * dwarf_formflag.c: New file. 3624 * dwarf_getattrs.c: New file. 3625 * dwarf_error.c: Add new error value. 3626 * libdw.h: Add prototypes for new functions. Adjust prototype for 3627 dwarf_getpubnames. 3628 * libdw.map: Add new functions. 3629 * dwarf_getpubnames.c: Change type of return value and fourth parameter 3630 to ptrdiff_t. 3631 * libdwP.h: Add new error value. 3632 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and 3633 dwarf_formflag.c. 3634 3635 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL. 3636 36372004-01-12 Ulrich Drepper <drepper@redhat.com> 3638 3639 * dwarf_getarange_addr.c: New file 3640 * dwarf_getarangeinfo.c: New file. 3641 * dwarf_getaranges.c: New file. 3642 * dwarf_onerange.c: New file. 3643 * libdw.h: Declare new functions. Define Dwarf_Arange and 3644 Dwarf_Aranges. 3645 * libdw.map: Add new functions. 3646 * libdwP.h: Add new errors. Add aranges member to struct Dwarf. 3647 Define Dwarf_Aranges_s and Dwarf_Arange_s. 3648 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c, 3649 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c. 3650 * dwarf_error.c: Add new message. 3651 36522004-01-11 Ulrich Drepper <drepper@redhat.com> 3653 3654 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c, 3655 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c, 3656 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c. 3657 * dwarf_error.c: Add another message. 3658 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines 3659 introduction. 3660 * dwarf_filesrc.c: Likewise. 3661 * dwarf_getsrcfiles.c: Likewise. 3662 * dwarf_getsrclines.c: Likewise. 3663 * dwarf_lineaddr.c: New file. 3664 * dwarf_linebeginstatement.c: New file. 3665 * dwarf_lineblock.c: New file. 3666 * dwarf_linecol.c: New file. 3667 * dwarf_lineendsequence.c: New file. 3668 * dwarf_lineepiloguebegin.c: New file. 3669 * dwarf_lineno.c: New file. 3670 * dwarf_lineprologueend.c: New file. 3671 * dwarf_onesrcline.c: New file. 3672 * dwarf_lineno.c: Change interface to store result in object pointed 3673 to by second parameter. 3674 * libdw.h: Add prototypes for new functions. Change dwarf_lineno 3675 prototype. Define Dwarf_Files and Dwarf_Lines. 3676 * libdw.map: Add new functions. 3677 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s. 3678 * libdw_findcu.c: Don't initialize nlines field. 3679 3680 * dwarf_siblingof: Little optimization. 3681 3682 * dwarf_begin.c: Remember that the ELF descriptor must be closed. 3683 * dwarf_end.c: Close ELF descriptor if free_elf is set. 3684 * libdwP.h (struct Dwarf): Add free_elf field. 3685 3686 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and 3687 dwarf_offabbrev.c. 3688 * dwarf_getstring.c: New file. 3689 * dwarf_offabbrev.c: New file. 3690 * libdw.map: Add dwarf_getstring and dwarf_offabbrev. 3691 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result 3692 parameters. Don't allocate memory if not necessary and don't lookup 3693 previous results if no CU given. 3694 (dwarf_getabbrev): Adjust call to __libdw_getabbrev. 3695 * dwarf_tag.c: Adjust call to __libdw_getabbrev. 3696 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring. 3697 * libdwP.h: Change prototype for __libdw_getabbrev. 3698 3699 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before 3700 returning if this is wanted. 3701 37022004-01-09 Ulrich Drepper <drepper@redhat.com> 3703 3704 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it 3705 with offset_size value. 3706 * libdw.h: Adjust dwarf_nextcu prototype. 3707 * libdwP.h (struct Dwarf_CU): Add offset_size member. 3708 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size 3709 member of new CU struct. 3710 * dwarf_formstring.c: Depend on offset_size not address_size for 3711 DW_FORM_strp handling. 3712 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr. 3713 3714 * dwarf_tag.c (__libdw_findabbrev): Return correct value for 3715 failing lookup. 3716 (dwarf_tag): Correctly recognize failed lookup. 3717 3718 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new 3719 function noop_free. 3720 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK. 3721 * dwarf_formblock.c: New file. 3722 * dwarf_getloclist.c: Rewrite to handle a single block. 3723 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove 3724 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove 3725 dwarf_getloclistent declaration. 3726 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent. 3727 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK. 3728 Add locs member to struct Dwarf_CU. 3729 * libdw_fundcu.c: Initialize locs member of new CU. 3730 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c. 3731 Remove dwarf_getloclistent.c. 3732 37332004-01-07 Ulrich Drepper <drepper@redhat.com> 3734 3735 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3. 3736 * libdwP.h: Likewise. 3737 3738 * dwarf_getloclist.c: New file. 3739 * dwarf_getloclistent.c: New file. 3740 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc. 3741 Declare dwarf_getloclistent and dwarf_getloclist. 3742 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist. 3743 * libdwP.h: Define DWARF_E_NO_LOCLIST. 3744 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and 3745 dwarf_getloclist.c. 3746 3747 * dwarf_error.c: More error messages. 3748 37492004-01-06 Ulrich Drepper <drepper@redhat.com> 3750 3751 * dwarf_getsrclines.c: Remove debugging support. 3752 3753 * dwarf_getsrcfiles.c: New file. 3754 * dwarf_filesrc.c: New file. 3755 * libdw.h: Declare these functions. Define Dwarf_File. 3756 * libdwP.c: Adjust Dwarf_File_s definition. 3757 * libdw.map: Add these functions. 3758 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and 3759 dwarf_filesrc.c. 3760 * dwarf_getsrclines.c: Initialize cu->files. 3761 37622004-01-05 Ulrich Drepper <drepper@redhat.com> 3763 3764 * libdw.h: Add more nonnull function attributes. 3765 3766 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next. 3767 * dwarf_end.c (cu_free): New function. 3768 (dwarf_end): Also free CU tree. Correct freeing of memory blocks. 3769 * dwarf_error.c (errmsgs): Add new messages. 3770 * dwarf_getsrc_die.c: New file. 3771 * dwarf_getsrclines.c: New file. 3772 * dwarf_lineno.c: New file. 3773 * dwarf_linesrc.c: New file. 3774 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc 3775 instead of the *_inc-less variants. 3776 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare 3777 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc. 3778 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, 3779 and dwarf_linesrc. 3780 * libdwP.h: Add more error codes. 3781 (struct Dwarf): Remove mem_tail.next member. 3782 (Dwarf_File): Define type. 3783 (struct Dwarf_Line_s): Define type. 3784 (struct Dwarf_CU): Add lines and nlines members. 3785 (libdw_alloc): Define local variable _tail and use it. 3786 Add some function attributes. 3787 * libdw_alloc.c (__libdw_allocate): Don't initialize next member. 3788 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members. 3789 * memory-access.h: Add unlikely for the endian conversion paths. 3790 * Makefile.am (AM_CFLAGS): Add -std parameter. 3791 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die, 3792 dwarf_lineno, and dwarf_linesrc. 3793 37942003-08-11 Ulrich Drepper <drepper@redhat.com> 3795 3796 * Moved to CVS archive. 3797