12015-12-18 Mark Wielaard <mjw@redhat.com> 2 3 * libdwP.h (struct Dwarf): Remove sectiondata_gzip_mask. 4 (__libdw_free_zdata): Remove. 5 * dwarf_begin_elf.c (inflate_section): Remove. 6 (check_section): Remove __libdw_free_zdata calls. Use elf_compress 7 and elf_compress_gnu to decompress if necessary. 8 (valid_p): Remove __libdw_free_zdata calls. 9 (scngrp_read): Use elf_compress if section is compressed. Remove 10 __libdw_free_zdata calls. 11 * dwarf_end.c (__libdw_free_zdata): Remove. 12 (dwarf_end): Don't call __libdw_free_zdata. 13 142015-10-28 Mark Wielaard <mjw@redhat.com> 15 16 * libdw.map (ELFUTILS_0.165): New. Add dwelf_scn_gnu_compressed_size. 17 182015-12-02 Mark Wielaard <mjw@redhat.com> 19 20 * fde.c (intern_fde): Don't leak duplicate FDEs. 21 222015-12-01 Mark Wielaard <mjw@redhat.com> 23 24 * fde.c (intern_fde): Don't intern an fde that doesn't cover a 25 valid code range. 26 272015-12-01 Mark Wielaard <mjw@redhat.com> 28 29 * dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists. 30 312015-10-14 Chih-Hung Hsieh <chh@google.com> 32 33 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Move recursive 34 functions 'add_bkpt', 'entrypc_bkpt', and 'search_range' to file scope. 35 362015-10-14 Chih-Hung Hsieh <chh@google.com> 37 38 * libdw_visit_scopes.c (__libdw_visit_scopes): Move recursive nested 39 function 'walk_children' to file scope; inline 'recurse' at its call 40 site. 41 422015-10-19 Mark Wielaard <mjw@redhat.com> 43 44 * frame-cache.c (__libdw_destroy_frame_cache): Call ebl_closebackend 45 if necessary. 46 472015-10-16 Dmitry V. Levin <ldv@altlinux.org> 48 49 * dwarf_getsrclines.c (read_srclines): Initialize state early. 50 512015-10-13 Chih-Hung Hsieh <chh@google.com> 52 53 * dwarf_getsrclines.c (read_srclines): Move nested functions 54 'advance_pc' and 'add_new_line' to file scope and keep many 55 local state variables within one structure. 56 572015-10-13 Chih-Hung Hsieh <chh@google.com> 58 59 * dwarf_getscopevar.c (dwarf_getscopevar): Move nested 60 function 'file_matches' to file scope. 61 622015-10-16 Mark Wielaard <mjw@redhat.com> 63 64 * Makefile.am (libdw.so): Add -lz. 65 662015-10-14 Chih-Hung Hsieh <chh@google.com> 67 68 * cfi.c (execute_cfi): Move nested functions 'enough_registers' 69 and 'require_cfa_offset' to file scope. 70 712015-10-09 Josh Stone <jistone@redhat.com> 72 73 * dwarf_begin.c (dwarf_begin): Replace stat64 and fstat64 with stat 74 and fstat. 75 762015-10-05 Josh Stone <jistone@redhat.com> 77 78 * Makefile.am (libdw.so): Add AM_V_CCLD and AM_V_at silencers. 79 802015-09-24 Jose E. Marchesi <jose.marchesi@oracle.com> 81 82 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid 83 relocation overflows in some platforms. 84 852015-09-23 Mark Wielaard <mjw@redhat.com> 86 87 * dwarf_error.c (__libdw_seterrno): Mark as internal_function. 88 * dwarf_formref.c (__libdw_formref): Likewise. 89 * libdw_findcu.c (__libdw_findcu): Likewise. 90 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. 91 922015-09-22 Mark Wielaard <mjw@redhat.com> 93 94 * *.c: Remove old-style function definitions. 95 962015-09-15 Mark Wielaard <mjw@redhat.com> 97 98 * dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer. 99 1002015-09-09 Chih-Hung Hsieh <chh@google.com> 101 102 * dwarf_macro_getsrcfiles.c (dwarf_macro_getsrcfiles): Remove 103 redundant NULL tests on parameters declared with __nonnull_attribute__. 104 * dwarf_siblingof.c (dwarf_siblingof): Likewise. 105 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. 106 1072015-09-04 Chih-Hung Hsieh <chh@google.com> 108 Mark Wielaard <mjw@redhat.com> 109 110 * dwarf_getlocation.c (getlocations_addr): Replace K&R function 111 definition with ansi-C definition and add const qualifier to 112 locs argument. 113 1142015-09-04 Chih-Hung Hsieh <chh@google.com> 115 116 * libdw_findcu.c (__libdw_intern_next_unit): Replace K&R function 117 definition with ansi-C definitions. 118 (__libdw_findcu): Likewise. 119 1202015-08-25 Mark Wielaard <mjw@redhat.com> 121 122 * dwarf.h: Add DW_LANG_Haskell. 123 1242015-06-18 Mark Wielaard <mjw@redhat.com> 125 126 * dwarf_begin_elf.c (dwarf_begin_elf): Assert page size is big enough 127 to hold a Dwarf. 128 1292015-06-18 Mark Wielaard <mjw@redhat.com> 130 131 * dwarf_getpubnames.c (get_offsets): Always free mem on error. 132 1332015-06-18 Mark Wielaard <mjw@redhat.com> 134 135 * dwarf_getmacros.c (get_macinfo_table): Return NULL when 136 dwarf_formudata reports an error. 137 (get_table_for_offset): Likewise. 138 1392015-06-08 Mark Wielaard <mjw@redhat.com> 140 141 * dwarf_getsrclines.c (read_srclines): Initialize dirarray early. 142 1432015-06-06 Mark Wielaard <mjw@redhat.com> 144 145 * dwarf_getsrclines.c (read_srclines): Initialize filelist early. 146 1472015-05-27 Mark Wielaard <mjw@redhat.com> 148 149 * encoded-value.h (read_encoded_value): Check data d_size contains 150 at least enough data to hold a pointer for DW_EH_PE_indirect. 151 1522015-05-22 Mark Wielaard <mjw@redhat.com> 153 154 * dwarf_getsrclines.c (read_srclines): Limit stack usage of lines 155 with MAX_STACK_LINES, files with MAX_STACK_LINES and dirs with 156 MAX_STACK_DIRS. Calculate number of dirs needed first, then 157 create dirarray directly, without needing the next field. Free 158 not stack allocated lines and files at the end. 159 1602015-05-19 Mark Wielaard <mjw@redhat.com> 161 162 * dwarf_getlocation.c (__libdw_intern_expression): Create a stack 163 allocated array to hold locs. Allocate locs bigger than the array 164 with malloc and free them when done. 165 1662015-05-11 Jonathan Lebon <jlebon@redhat.com> 167 168 * libdwP.h (DWARF_E_COMPRESSED_ERROR): New enumerator. 169 * dwarf_error.c (errmsgs): Add DWARF_E_COMPRESSED_ERROR message. 170 * dwarf_begin_elf.c (inflate_section): New static function, lifted 171 from... 172 (check_section): ... here. Call inflate_section, set libdw errno to 173 DWARF_E_COMPRESSED_ERROR if .debug_info section couldn't be inflated. 174 1752015-05-11 Jonathan Lebon <jlebon@redhat.com> 176 177 * dwarf_begin_elf.c (check_section): Add compressed flag. Always 178 check for .zdebug sections. Only wrap decompression in #if USE_ZLIB. 179 1802015-05-06 Mark Wielaard <mjw@redhat.com> 181 182 * dwarf_getsrclines.c (read_srclines): Use an int64_t to store and 183 check the line number. 184 1852015-05-05 Mark Wielaard <mjw@redhat.com> 186 187 * dwarf_getaranges.c (dwarf_getaranges): Check there is enough data 188 left before reading values. 189 1902015-05-04 Anthony G. Basile <blueness@gentoo.org> 191 192 * Makefile.am (libdw_so_SOURCES): Append $(argp_LDADD) to link 193 command. 194 1952015-04-22 Mark Wielaard <mjw@redhat.com> 196 197 * memory-access.h (__libdw_max_len_leb128): Take type_len as argument. 198 (__libdw_max_len_uleb128): New function. 199 (__libdw_max_len_sleb128): Likewise. 200 (__libdw_get_uleb128): Use __libdw_max_len_uleb128. 201 (__libdw_get_sleb128): Use __libdw_max_len_sleb128. 202 2032015-04-21 Mark Wielaard <mjw@redhat.com> 204 205 * dwarf_getmacros.c (read_macros): Allocate attributes dynamically 206 when there are more than 8. 207 2082015-04-01 Petr Machata <pmachata@redhat.com> 209 210 * libdwP.h (DWARF_E_NOT_CUDIE): New enumerator. 211 (is_cudie): New function. 212 * dwarf_error.c (errmsgs): Add message for DWARF_E_NOT_CUDIE. 213 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Call is_cudie instead 214 of white-listing valid tags. 215 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise. 216 2172015-03-18 Petr Machata <pmachata@redhat.com> 218 219 * Makefile.am (pkginclude_HEADERS): Add known-dwarf.h. 220 (EXTRA_DIST): Remove known-dwarf.h. 221 2222015-02-09 Mark Wielaard <mjw@redhat.com> 223 224 * dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08. 225 * dwarf_aggregate_size.c (array_size): Recognize array lower bound 226 for new Fortran language codes is 1. 227 2282015-02-09 Mark Wielaard <mjw@redhat.com> 229 230 * dwarf.h: Add DW_TAG_atomic_type. 231 * libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type. 232 * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type. 233 2342015-02-11 Josh Stone <jistone@redhat.com> 235 236 * encoded-value.h (read_encoded_value): Initialize value. 237 2382015-02-11 Petr Machata <pmachata@redhat.com> 239 240 * dwarf_ranges.c (dwarf_ranges): Do not bail out when neither 241 DW_AT_entry_pc nor DW_AT_low_pc are available. Instead remember 242 the fact in *BASEP and bail out later if it hasn't been updated by 243 __libdw_read_begin_end_pair_inc. 244 2452014-12-24 Mark Wielaard <mjw@redhat.com> 246 247 * dwarf_getsrc_die.c (dwarf_getsrc_die): Return the last line record 248 smaller than or equal to addr, rather than returning immediately on 249 a match. 250 2512015-01-07 Mark Wielaard <mjw@redhat.com> 252 253 * cfi.h (struct Dwarf_CFI_s): Add search_table_len. 254 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Check there is enough 255 room in the search table for all entries. Store search_table_len. 256 (getcfi_scn_eh_frame): Likewise. 257 * encoded-value.h (encoded_value_size): Don't abort, return zero. 258 (__libdw_cfi_read_address_inc): Check there is enough room to read 259 values. Pass other byte order to read functions. 260 (read_encoded_value): Check encoded_value_size. Don't abort, but 261 set libdw errno and report failure. Check there is enough room to 262 read values. 263 * fde.c (binary_search_fde): Check encoded value size. Add hdr 264 data buf and size to dummy_cfi. 265 2662015-01-04 Mark Wielaard <mjw@redhat.com> 267 268 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute 269 is after current DIE. 270 2712015-01-04 Mark Wielaard <mjw@redhat.com> 272 273 * cfi.c (enough_registers): Check reg < INT32_MAX / sizeof 274 (dwarf_frame_register). 275 2762015-01-02 Mark Wielaard <mjw@redhat.com> 277 278 * dwarf_getcfi_elf.c (parse_eh_frame_hdr): Add size check. 279 (getcfi_gnu_eh_frame): Remove size check. Check d_buf is not NULL. 280 (getcfi_scn_eh_frame): Check d_buf is not NULL. 281 2822015-01-02 Mark Wielaard <mjw@redhat.com> 283 284 * dwarf_getlocation.c (__libdw_intern_expression): Check dbg is not 285 NULL for DW_OP_call_ref and DW_OP_GNU_implicit_pointer. For 286 DW_OP_addr if dbg is NULL then read argument directly. 287 2882015-01-14 Jason P. Leasure <jpleasu@super.org> 289 290 * dwarf_formref_die.c (dwarf_formref_die): Offset is cu->type_offset 291 plus cu->start. 292 2932014-12-27 Mark Wielaard <mjw@redhat.com> 294 295 * dwarf_siblingof.c (dwarf_siblingof): Check sibling attribute offset 296 still falls inside CU data. 297 2982015-01-11 Mark Wielaard <mjw@redhat.com> 299 300 * dwarf_func_inline.c (dwarf_func_inline_instances): Call 301 __libdw_visit_scopes with NULL imports. 302 * dwarf_getfuncs.c (dwarf_getfuncs): Likewise. 303 * dwarf_getscopes.c (pc_record): Likewise. 304 (dwarf_getscopes): Likewise. 305 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise. 306 * libdwP.h (__libdw_visit_scopes): Add imports argument. 307 * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. Add new 308 function imports_contains. Push and pop imports around walk_children 309 when processing DW_TAG_imported_unit. 310 3112014-12-18 Ulrich Drepper <drepper@gmail.com> 312 313 * Makefile.am: Suppress output of textrel_check command. 314 3152014-12-16 Mark Wielaard <mjw@redhat.com> 316 317 * dwarf_getsrclines.c (read_srclines): Check diridx is valid under 318 DW_LNE_define_file. 319 3202014-12-16 Mark Wielaard <mjw@redhat.com> 321 322 * dwarf_getpubnames.c (dwarf_getpubnames): Make sure there is enough 323 space to read die offset. 324 3252014-12-16 Mark Wielaard <mjw@redhat.com> 326 327 * dwarf_getsrclines.c (read_srclines): Correct overflow check for 328 unit_length. 329 3302014-12-15 Mark Wielaard <mjw@redhat.com> 331 332 * dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside 333 section data. Set error to DWARF_E_NO_ENTRY if cnt is zero. 334 (dwarf_getpubnames): Make sure section data contains string zero 335 terminator. 336 3372014-12-16 Mark Wielaard <mjw@redhat.com> 338 339 * memory-access.h (__libdw_get_sleb128): Unroll the first step to help 340 the compiler optimize for the common single-byte case. 341 3422014-12-15 Josh Stone <jistone@redhat.com> 343 344 * memory-access.h (__libdw_max_len_leb128): New. 345 (__libdw_get_uleb128): Use __libdw_max_len_leb128. 346 (__libdw_get_sleb128): Likewise. 347 3482014-12-14 Mark Wielaard <mjw@redhat.com> 349 350 * cfi.c (execute_cfi): Add program bounds checks. 351 * dwarf_child.c (__libdw_find_attr): Add attrp bounds checks. 352 * dwarf_formblock.c (dwarf_formblock): Call get_uleb128 with endp. 353 * dwarf_formref.c (__libdw_formref): Add datap bounds checks. 354 * dwarf_formsdata.c (dwarf_formsdata): Likewise. 355 * dwarf_formudata.c (dwarf_formudata): Likewise. 356 * dwarf_frame_register.c (dwarf_frame_register): Call get_uleb128 357 with end of data buf. 358 * dwarf_getabbrev.c (__libdw_getabbrev): Add abbrevp bounds checks. 359 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Assume get_uleb128 360 call gets enough data. 361 * dwarf_getattrs,c (dwarf_getattrs): Call get_uleb128 with endp. 362 * dwarf_getlocation.c (store_implicit_value): Call get_uleb128 363 with enough data. 364 (__libdw_intern_expression): Call get_uleb128/get_sleb128 with 365 end_data. 366 * dwarf_getmacros.c (get_table_for_offset): Add nforms bounds check. 367 * dwarf_getsrclines.c (read_srclines): Bounds check linep and call 368 get_uleb128 with lineendp. 369 * dwarf_hasattr.c (dwarf_hasattr): Bounds check attrp and call 370 get_uleb128 with endp. 371 * dwarf_next_cfi.c (dwarf_next_cfi): Bounds check bytes and call 372 get_uleb128/get_sleb128 with limit. 373 * encoded-value.h (read_encoded_value): Assume get_uleb128 and 374 get_sleb128 get called with enough data. 375 * fde.c (intern_fde): Call get_uleb128 with instructions_end. 376 * libdwP.h (__libdw_dieabbrev): Call get_uleb128 with die->cu->endp. 377 * libdw_form.c (__libdw_form_val_compute_len): Call get_uleb128 with 378 endp. 379 * memory-access.h (__libdw_get_uleb128): Take an extra endp. 380 Don't call get_uleb128_step if out of data. 381 (__libdw_get_sleb128): Likewise for get_sleb128_step. 382 3832014-12-12 Mark Wielaard <mjw@redhat.com> 384 385 * libdwP.h (struct Dwarf): Add fake_loc_cu. 386 (cu_data): Removed. 387 (DIE_OFFSET_FROM_CU_OFFSET): Don't use cu_data, use cu_sec_idx. 388 (__libdw_form_val_compute_len): Drop dbg and endp arguments. 389 (__libdw_form_val_len): Likewise. 390 * libdw_form.c (__libdw_form_val_compute_len): Likewise. 391 * libdw_findcu.c (__libdw_intern_next_unit): Don't use cu_data, use 392 the already found data buffer directly. 393 * dwarf_begin_elf.c (valid_p): Setup fake_loc_cu. 394 * dwarf_end.c (dwarf_end): Free fake_loc_cu. 395 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len with 396 just cu. 397 * dwarf_getattrs.c (dwarf_getattrs): Likewise. 398 * dwarf_formblock.c (dwarf_formblock): Add bounds checking. 399 * dwarf_getlocation_attr.c (attr_form_cu): New function. 400 (dwarf_getlocation_attr): Use attr_form_cu to set result->cu. 401 (getlocation): Handle empty blocks immediately. 402 * dwarf_getlocation_implicit_pointer.c (empty_cu): New static var. 403 (__libdw_empty_loc_attr): Drop cu argument, use empty_cu. 404 (dwarf_getlocation_implicit_pointer): Call __libdw_empty_loc_attr with 405 one argument. 406 * dwarf_getmacros.c (read_macros): Also setup startp and endp for 407 fake_cu. Call __libdw_form_val_len with just fake_cu. 408 * dwarf_formref_die.c (dwarf_formref_die): Don't use cu_data, get 409 datap and size directly from cu startp and endp. 410 4112014-12-11 Mark Wielaard <mjw@redhat.com> 412 413 * libdw_findcu.c (__libdw_intern_next_unit): Sanity check offset. 414 4152014-12-13 Mark Wielaard <mjw@redhat.com> 416 417 * dwarf_getaranges.c (compare_aranges): Make sure Dwarf_Addr 418 difference doesn't wrap around before returning as int. 419 4202014-12-11 Josh Stone <jistone@redhat.com> 421 422 * dwarf_getsrclines.c (struct linelist): Add sequence. 423 (compare_lines): Take linelists, and break ties by sequence. 424 (read_srclines): Use linelists for sorting. 425 (read_srclines::add_new_line): Set sequence. 426 4272014-12-10 Josh Stone <jistone@redhat.com> 428 429 * libdwP.h (Dwarf_CU): Add startp and endp boundaries. 430 * libdw_findcu.c (__libdw_intern_next_unit): Set startp and endp. 431 * dwarf_child.c (dwarf_child): Use cu->endp. 432 * dwarf_cuoffset.c (dwarf_cuoffset): Use cu->startp. 433 * dwarf_dieoffset.c (dwarf_dieoffset): Use cu->startp. 434 * dwarf_siblingof.c (dwarf_siblingof): Use both. 435 4362014-12-10 Josh Stone <jistone@redhat.com> 437 438 * dwarf_hasattr.c (dwarf_hasattr): Just walk abbrev for presence. 439 4402014-12-10 Josh Stone <jistone@redhat.com> 441 442 * libdwP.h (__libdw_dieabbrev): New die->abbrev lookup function. 443 * dwarf_child.c (__libdw_find_attr, dwarf_child): Use it. 444 * dwarf_getattrs.c (dwarf_getattrs): Likewise. 445 * dwarf_haschildren.c (dwarf_haschildren): Likewise. 446 * dwarf_tag.c (dwarf_tag): Likewise. 447 4482014-12-04 Mark Wielaard <mjw@redhat.com> 449 450 * libdwP.h (__libdw_form_val_compute_len): Add endp argument. 451 (__libdw_form_val_len): Likewise and check len doesn't overflow. 452 * libdw_form.c (__libdw_form_val_compute_len): Likewise. 453 * dwarf_child.c (__libdw_find_attr): Call __libdw_form_val_len 454 with endp. 455 * dwarf_getattrs.c (dwarf_getattrs): Likewise. 456 * dwarf_getmacros.c (read_macros): Likewise and check for errors. 457 4582014-12-02 Petr Machata <pmachata@redhat.com> 459 460 * dwarf_getmacros.c (token_from_offset, offset_from_token): New 461 helper functions. 462 (do_dwarf_getmacros_die): Merge into dwarf_getmacros. 463 * libdw.h (DWARF_GETMACROS_START): New macro. 464 4652014-11-27 Mark Wielaard <mjw@redhat.com> 466 467 * Makefile.am (libdw.so): Use textrel_check. 468 4692014-11-27 Mark Wielaard <mjw@redhat.com> 470 471 * dwarf_getcfi_elf.c (getcfi_gnu_eh_frame): Initialize 472 search_table_entries and search_table_encoding. 473 4742014-11-24 Mark Wielaard <mjw@redhat.com> 475 476 * dwarf_getsrclines.c (read_srclines): Check line_range is not zero 477 before usage. 478 4792014-11-23 Mark Wielaard <mjw@redhat.com> 480 481 * dwarf_attr.c (dwarf_attr): Check __libdw_find_attr return value. 482 * dwarf_hasattr.c (dwarf_hasattr): Likewise. 483 * dwarf_siblingof.c (dwarf_siblingof): Likewise. 484 4852014-11-23 Mark Wielaard <mjw@redhat.com> 486 487 * dwarf_getabbrev.c (__libdw_getabbrev): Don't assert on bad DWARF. 488 Set libdw errno and return NULL. 489 4902014-11-24 Mark Wielaard <mjw@redhat.com> 491 492 * dwarf.h (DW_LANG_C_plus_plus_11): Added. 493 (DW_LANG_C11): Likewise. 494 (DW_LANG_C_plus_plus_14): Likewise. 495 * dwarf_aggregate_size.c (array_size): Handle DW_LANG_C11, 496 DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 and DW_LANG_Go 497 lower bound. 498 * dwarf_getfuncs.c (dwarf_getfuncs): Set c_cu to true for 499 DW_LANG_C11. 500 5012014-11-26 Mark Wielaard <mjw@redhat.com> 502 503 * dwarf.h (DW_AT_noreturn): Added. 504 5052014-11-11 Mark Wielaard <mjw@redhat.com> 506 507 * dwarf_getsrclines.c (read_srclines): Do address_size comparison 508 explicitly as uint8_t. 509 (__libdw_getsrclines): Add internal_function to declaration. 510 5112014-09-10 Petr Machata <pmachata@redhat.com> 512 513 * dwarf_macro_getparamcnt.c: New file. 514 * dwarf_macro_param.c: New file. 515 * dwarf_macro_getsrcfiles.c: New file. 516 * Makefile.am (libdw_a_SOURCES): Add the new files. 517 * libdwP.h (struct files_lines_s): New structure. 518 (DWARF_E_INVALID_OPCODE): New enumerator. 519 (struct Dwarf): New fields macro_ops, files_lines. 520 (Dwarf_Macro_Op_Proto, Dwarf_Macro_Op_Table): New structures for 521 keeping macro opcode prototypes in. 522 (Dwarf_Macro_s): Redefine from scratch. 523 (__libdw_getsrclines, __libdw_getcompdir, libdw_macro_nforms): New 524 internal interfaces. 525 * dwarf_error.c (errmsgs): Add a message for 526 DWARF_E_INVALID_OPCODE. 527 * dwarf_end.c (dwarf_end): Destroy struct Dwarf.macro_ops and 528 files_lines. 529 * libdw.h (dwarf_getmacros_off, dwarf_macro_getparamcnt) 530 (dwarf_macro_getsrcfiles, dwarf_macro_param): New public 531 interfaces. 532 * dwarf_getmacros.c (dwarf_getmacros_off): New function, 533 (get_offset_from, macro_op_compare, build_table) 534 (init_macinfo_table, get_macinfo_table, get_table_for_offset) 535 (cache_op_table, read_macros, gnu_macros_getmacros_off) 536 (macro_info_getmacros_off, do_dwarf_getmacros_die): New helper 537 functions. 538 (dwarf_getmacros): Adjust to dispatch to the new interfaces. 539 * dwarf_getsrclines.c (read_srclines): New function with guts 540 taken from dwarf_getsrclines. 541 (__libdw_getsrclines): Likewise. 542 (__libdw_getcompdir, files_lines_compare): New functions. 543 (dwarf_getsrclines): Make it dispatch to the new interfaces. 544 * dwarf_macro_param1.c (dwarf_macro_param1): Adjust to dispatch to 545 the new interfaces. 546 * dwarf_macro_param2.c (dwarf_macro_param2): Likewise. 547 * libdw.map (ELFUTILS_0.161): New. Add dwarf_getmacros_off, 548 dwarf_macro_getsrcfiles, dwarf_macro_getparamcnt, dwarf_macro_param. 549 5502014-10-06 Mark Wielaard <mjw@redhat.com> 551 552 * Makefile.am (libdw_a_SOURCES): Add dwarf_peel_type.c. 553 * dwarf_aggregate_size.c (get_type): Use dwarf_peel_type. 554 (aggregate_size): Likewise. Add old and new version. 555 * dwarf_peel_type.c: New file. 556 * libdw.h (dwarf_peel_type): New function declaration. 557 * libdwP.h (dwarf_peel_type): New internal declaration. 558 * libdw.map (ELFUTILS_0.161): New section. 559 5602014-10-15 Petr Machata <pmachata@redhat.com> 561 562 * libdwP.h (struct Dwarf_Files_s.cu): Drop field. 563 * dwarf_getsrclines.c (dwarf_getsrclines): Don't set it. 564 5652014-10-05 Mark Wielaard <mjw@redhat.com> 566 567 * dwarf.h: Add DW_AT_GNU_deleted. 568 5692014-10-02 Mark Wielaard <mjw@redhat.com> 570 571 * dwarf_aggregate_size.c (aggregate_size): Return CU address_size 572 for sizeless DW_TAG_pointer_type, DW_TAG_reference_type or 573 DW_TAG_rvalue_reference_type. 574 5752014-09-12 Petr Machata <pmachata@redhat.com> 576 577 * memory-access.h (read_ubyte_unaligned_inc): Allow only 4- and 578 8-byte quantities. Consequently, rename to... 579 (read_addr_unaligned_inc): ... this. 580 (read_sbyte_unaligned_inc, read_ubyte_unaligned): Drop. 581 (read_sbyte_unaligned): Drop. 582 5832014-09-10 Petr Machata <pmachata@redhat.com> 584 585 * dwarf_getlocation.c (attr_ok): Also accept 586 DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value, 587 DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered. 588 5892014-08-15 Mark Wielaard <mjw@redhat.com> 590 591 * dwarf_cu_die.c: New file. 592 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_die.c. 593 * libdw.h (dwarf_cu_die): New function declaration. 594 * libdw.map (ELFUTILS_0.160): Add dwarf_cu_die. 595 5962014-08-15 Mark Wielaard <mjw@redhat.com> 597 598 * dwarf_cu_getdwarf.c: New file. 599 * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_getdwarf.c. 600 * libdw.h (Dwarf_CU): New typedef. 601 (dwarf_cu_getdwarf): New function declaration. 602 * libdw.map (ELFUTILS_0.160): New. Add dwarf_cu_getdwarf. 603 6042014-06-18 Mark Wielaard <mjw@redhat.com> 605 606 * dwarf.h: Remove DW_TAG_mutable_type. 607 6082014-05-02 Mark Wielaard <mjw@redhat.com> 609 610 * libdwP.h (__check_build_id): Removed now unused. 611 6122014-05-01 Mark Wielaard <mjw@redhat.com> 613 614 * libdwP.h (struct Dwarf): Remove free_alt. 615 * dwarf_end.c (dwarf_end): Don't check free_alt, don't end alt_dwarf. 616 * dwarf_setalt.c (dwarf_setalt): Don't check or set free_alt. 617 6182014-04-30 Mark Wielaard <mjw@redhat.com> 619 620 * libdw.map (ELFUTILS_0.159): Add dwelf_elf_gnu_build_id. 621 6222014-04-15 Florian Weimer <fweimer@redhat.com> 623 624 * dwarf_begin_elf.c (__check_build_id, try_debugaltlink) 625 (open_debugaltlink): Move to libdwfl. 626 (check_section): Do not locate alternate debuginfo. 627 6282014-04-24 Florian Weimer <fweimer@redhat.com> 629 630 * libdw.map (ELFUTILS_0.159): Export dwelf_dwarf_gnu_debugaltlink. 631 6322014-04-22 Florian Weimer <fweimer@redhat.com> 633 634 * dwarf_getalt.c, dwarf_setalt.c: New files. 635 * Makefile.am (libdw_a_SOURCES): Add them. 636 * libdw.h (dwarf_getalt, dwarf_setalt): Add function declarations. 637 * libdwP.h (dwarf_getalt, dwarf_setalt): Add internal function 638 declarations. 639 * libdw.map (ELFUTILS_0.159): Export the two new functions. 640 6412014-04-15 Florian Weimer <fweimer@redhat.com> 642 643 * libdwP.h (enum IDX_gnu_debugaltlink): New. 644 * dwarf_begin_elf.c (dwarf_scnnames): Increase string size and add 645 .gnu_debugaltlink. 646 (check_section): Obtain .gnu_debugaltlink section from the 647 setiondata array. 648 6492014-04-11 Mark Wielaard <mjw@redhat.com> 650 651 * libdw.map (ELFUTILS_0.159): New. Add dwelf_elf_gnu_debuglink. 652 * Makefile.am (libdw.so): Depend on libdwelf_pic.a. 653 (libdwelf_objects): New variable. 654 (libdw_a_LIBADD): Add libdwelf objects. 655 6562014-04-22 Mark Wielaard <mjw@redhat.com> 657 658 * memory-access.h (get_sleb128_step): Remove undefined behavior 659 of left shifting a signed value. Replace it with a multiplication. 660 6612014-04-13 Mark Wielaard <mjw@redhat.com> 662 663 * Makefile.am: Remove !MUDFLAP conditions. 664 6652014-04-09 Mark Wielaard <mjw@redhat.com> 666 667 * dwarf_begin_elf.c (check_section): Check for unsigned overflow 668 before calling malloc to uncompress data. 669 6702014-03-03 Jan Kratochvil <jan.kratochvil@redhat.com> 671 672 Fix abort() on missing section headers. 673 * dwarf_begin_elf.c (check_section): Replace abort call by goto err. 674 New label err to return NULL. 675 6762014-02-05 Josh Stone <jistone@redhat.com> 677 678 * dwarf_decl_file.c (dwarf_decl_file): Read the idx as unsigned. 679 * dwarf_decl_line.c (__libdw_attr_intval): Read the line/column as 680 unsigned. Change the range assert to DWARF_E_INVALID_DWARF. 681 6822013-12-30 Mark Wielaard <mjw@redhat.com> 683 684 * libdw.map (ELFUTILS_0.158): Add dwfl_core_file_attach and 685 dwfl_linux_proc_attach. 686 6872013-12-20 Mark Wielaard <mjw@redhat.com> 688 689 * libdw.map (ELFUTILS_0.158): Add dwfl_getthread_frames. 690 6912013-12-18 Mark Wielaard <mjw@redhat.com> 692 693 * libdw.map (ELFUTILS_0.158): Remove dwfl_module_addrsym_elf and 694 dwfl_module_getsym_elf. Add dwfl_module_addrinfo and 695 dwfl_module_getsym_info. 696 6972013-12-16 Mark Wielaard <mjw@redhat.com> 698 699 * libdw.map (ELFUTILS_0.158): Add dwfl_module_getsymtab_first_global. 700 7012013-12-10 Josh Stone <jistone@redhat.com> 702 703 * memory-access.h (get_uleb128_rest_return): Removed. 704 (get_sleb128_rest_return): Removed. 705 (get_uleb128_step): Make this a self-contained block. 706 (get_sleb128_step): Ditto, and use a bitfield to extend signs. 707 (get_uleb128): Make this wholly implemented by __libdw_get_uleb128. 708 (get_sleb128): Make this wholly implemented by __libdw_get_sleb128. 709 (__libdw_get_uleb128): Simplify and inline for all callers. 710 (__libdw_get_sleb128): Ditto. 711 * dwarf_getlocation.c (store_implicit_value): Void the unused uleb128. 712 * memory-access.c: Delete file. 713 * Makefile.am (libdw_a_SOURCES): Remove it. 714 (DEFS): Remove the now unused -DIS_LIBDW. 715 7162013-12-09 Josh Stone <jistone@redhat.com> 717 718 * libdw_form.c (__libdw_form_val_compute_len): Renamed function from 719 __libdw_form_val_len, now handling only non-constant form lengths. 720 * libdwP.h (__libdw_form_val_len): New inlined function. 721 7222013-12-09 Mark Wielaard <mjw@redhat.com> 723 724 * dwarf_getlocation.c (__libdw_intern_expression): Handle empty 725 location expressions. 726 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no 727 location found, return empty location expression. 728 * dwarf_getlocation_implicit_pointer.c 729 (dwarf_getlocation_implicit_pointer): Likewise. 730 (__libdw_empty_loc_attr): New internal function. 731 * libdwP.h (__libdw_empty_loc_attr): Define. 732 7332013-11-27 Mark Wielaard <mjw@redhat.com> 734 735 * libdw.map (ELFUTILS_0.158): Add dwfl_module_addrsym_elf and 736 dwfl_module_getsym_elf. 737 7382013-11-26 Mark Wielaard <mjw@redhat.com> 739 740 * libdw.map (ELFUTILS_0.156): Move dwfl_attach_state, dwfl_pid, 741 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread, 742 dwfl_thread_state_registers, dwfl_thread_state_register_pc, 743 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc to ... 744 (ELFUTILS_0.158): ... here. 745 7462013-11-09 Mark Wielaard <mjw@redhat.com> 747 748 * dwarf_getaranges.c (dwarf_getaranges): Read segment_size and 749 check that it is zero. 750 7512013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com> 752 753 * cfi.h (struct Dwarf_Frame_s): Make the comment more specific. 754 * libdw.map (ELFUTILS_0.156): Add dwfl_attach_state, dwfl_pid, 755 dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread, 756 dwfl_thread_state_registers, dwfl_thread_state_register_pc, 757 dwfl_getthreads, dwfl_thread_getframes and dwfl_frame_pc. 758 7592013-11-01 Michael Forney <mforney@mforney.org> 760 761 * Makefile.am (libdwfl_objects): New definition. 762 (libdw_a_LIBADD): Use libdwfl_objects. 763 7642013-11-01 Michael Forney <mforney@mforney.org> 765 766 * Makefile.am: Use READELF. 767 7682013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com> 769 770 * libdw.map (ELFUTILS_0.158): New. 771 7722013-10-10 Mark Wielaard <mjw@redhat.com> 773 774 * dwarf_getfuncs.c (struct visitor_info): Rename start_offset to 775 start_addr and rename last_offset to last_addr. Now both void *. 776 (tree_visitor): Use start_add and die_addr instead of start_offset 777 and die_offset. 778 (dwarf_getfuncs): Use last_addr instead of last_offset. 779 7802013-10-06 Mark Wielaard <mjw@redhat.com> 781 782 * cfi.c (execute_cfi): Make sure DW_CFA_expression and 783 DW_CFA_val_expression are not used with abi_cfi. 784 7852013-10-03 Josh Stone <jistone@redhat.com> 786 787 * dwarf_formref_die.c (dwarf_formref_die): Don't hash the sig8 here. 788 * libdw_findcu.c (__libdw_intern_next_unit): Since this never revisits 789 a unit, make sure to always hash the sig8 here, so none are missed. 790 7912013-09-29 Mark Wielaard <mjw@redhat.com> 792 793 * dwarf_getlocation.c (store_implicit_value): Cast op->number2 to 794 uintptr_t before casting to char *. 795 (__libdw_intern_expression): Cast data to uintptr_t before casting 796 to Dwarf_Word. 797 * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Cast 798 op->number2 to uintptr_t before casting to char *. 799 8002013-09-24 Josh Stone <jistone@redhat.com> 801 802 * libdw_visit_scopes.c (classify_die): Removed. 803 (may_have_scopes): New function to replace classify_die. There's no 804 need for full classification; just find tags that may contain scopes. 805 (__libdw_visit_scopes): Use a direct tag comparison for imported 806 units, and use may_have_scopes to test if recursion is needed. 807 8082013-09-20 Mark Wielaard <mjw@redhat.com> 809 810 * dwarf_getfuncs.c (visitor_info): New struct. 811 (tree_visitor): New function. 812 (dwarf_getfuncs): Use __libdw_visit_scopes with tree_visitor. 813 * libdw.h (dwarf_getfuncs): Expand function documentation. 814 8152013-09-12 Mark Wielaard <mjw@redhat.com> 816 817 * fde.c (intern_fde): Free fde and set libdw errno when start 818 or end could not be read. 819 8202013-08-24 Mark Wielaard <mjw@redhat.com> 821 822 * dwarf_getlocation.c (store_implicit_value): Don't take data 823 as argument, get block data from op number2. Return false when 824 block data length and op number don't match up. 825 (__libdw_intern_expression): Store start of block for 826 DW_OP_implicit_value and DW_OP_GNU_entry_value instead of 827 relative data offset. Also store block start (including length) 828 for DW_OP_GNU_const_type. Don't pass data to store_implicit_value. 829 * dwarf_getlocation_attr.c: New file. 830 * dwarf_getlocation_die.c: Likewise. 831 * libdw.h (dwarf_getlocation_die): New function definition. 832 (dwarf_getlocation_attr): Likewise. 833 * libdwP.h: Declare internal dwarf_getlocation_die. 834 * libdw.map (ELFUTILS_0.157): Add dwarf_getlocation_die and 835 dwarf_getlocation_attr. 836 * Makefile.am (libdw_a_SOURCES): Add dwarf_getlocation_die.c and 837 dwarf_getlocation_attr.c. 838 8392013-08-23 Mark Wielaard <mjw@redhat.com> 840 841 * dwarf_getlocation.c (attr_ok): Also accept DW_AT_segment. 842 (attr_base_address): New function. 843 (initial_offset_base): New function. 844 (getlocations_addr): New function. Taken from... 845 (dwarf_getlocation_addr): here. Use new initial_offset_base and 846 getlocations_addr. 847 (dwarf_getlocations): New function. 848 * libdw.h (dwarf_getlocations): New function definition. 849 * libdw.map (ELFUTILS_0.157): New. 850 8512013-07-02 Mark Wielaard <mjw@redhat.com> 852 853 * dwarf_getsrclines.c (dwarf_getsrclines): Add new stack allocation 854 limit MAX_STACK_ALLOC. After MAX_STACK_ALLOC lines use malloc in 855 NEW_LINE macro. Free malloced line records if any at the end. 856 8572013-07-02 Mark Wielaard <mjw@redhat.com> 858 859 * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type == SHT_PROGBITS. 860 8612013-06-26 Mark Wielaard <mjw@redhat.com> 862 863 * libdw_visit_scopes.c (__libdw_visit_scopes): Don't reject root 864 DIEs without children. Return an error whenever dwarf_child or 865 dwarf_siblingof return an error. Don't call recurse and increase 866 the depth for an imported unit. Walk the children of an imported 867 unit as if they are logical children of the parent root DIE. 868 8692013-05-03 Mark Wielaard <mjw@redhat.com> 870 871 * dwarf_getsrclines.c (dwarf_getsrclines): Only set end_sequence 872 when nlinelist > 0. 873 8742013-04-28 Jan Kratochvil <jan.kratochvil@redhat.com> 875 876 * libdw.map (ELFUTILS_0.156): New. 877 8782013-04-24 Mark Wielaard <mjw@redhat.com> 879 880 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. 881 8822013-04-10 Mark Wielaard <mjw@redhat.com> 883 884 * dwarf_formref_die.c (dwarf_formref_die): Reference size is only 885 equal to address size when we have a DW_FORM_ref_addr for DWARF 886 version 2. 887 8882013-03-25 Mark Wielaard <mjw@redhat.com> 889 890 * dwarf_getsrclines.c (dwarf_getsrclines): Mark highest address as 891 end_sequence. 892 8932013-03-12 Mark Wielaard <mjw@redhat.com> 894 895 * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Allow DW_TAG_partial_unit. 896 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise. 897 8982013-02-15 Mark Wielaard <mjw@redhat.com> 899 900 * dwarf_formstring.c (dwarf_formstring): Check dbg_ret->sectiondata, 901 not dbg->sectiondata. 902 9032013-01-07 Roland McGrath <roland@hack.frob.com> 904 905 * memory-access.h 906 [ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New macro. 907 [!ALLOW_UNALIGNED] (read_8ubyte_unaligned_noncvt): New inline function. 908 9092012-12-18 Mark Wielaard <mjw@redhat.com> 910 911 * dwarf_begin_elf.c (valid_p): Call Dwarf_Sig8_Hash_free if invalid. 912 (check_section): Likewise on error. 913 (scngrp_read): Likewise. 914 (dwarf_begin_elf): Likewise. 915 9162012-10-09 Petr Machata <pmachata@redhat.com> 917 918 * dwarf_getlocation.c (__libdw_intern_expression): Handle 919 DW_OP_GNU_parameter_ref, DW_OP_GNU_convert, DW_OP_GNU_reinterpret, 920 DW_OP_GNU_regval_type, DW_OP_GNU_entry_value, 921 DW_OP_GNU_deref_type, DW_OP_GNU_const_type. 922 9232012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com> 924 925 * cfi.c: New include system.h. 926 (execute_cfi) (enough_registers): Clear new memory after realloc. 927 9282012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com> 929 930 * fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return 931 DWARF_E_NO_MATCH if .eh_frame_hdr points to FDE which is too short for 932 searched PC. 933 9342012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com> 935 936 * dwarf_getlocation.c (__libdw_intern_expression) <cfap>: Make new 937 loclist element DW_OP_call_frame_cfa before decoding the opcodes. 938 Remove the later DW_OP_call_frame_cfa push to RESULT. 939 9402012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com> 941 942 Code cleanup. 943 * fde.c (binary_search_fde): Remove always true <address >= start> 944 conditional. Move L initialization upwards. 945 9462012-08-24 Mark Wielaard <mjw@redhat.com> 947 948 * dwarf_begin_elf.c (check_section): Only probe for dwz multi files 949 when ENABLE_DWZ is defined. 950 * libdwP.h (__check_build_id): Only declare when ENABLE_DWZ is 951 defined. 952 9532012-08-16 Mark Wielaard <mjw@redhat.com> 954 955 * Makefile.am (EXTRA_DIST): Add known-dwarf.h. 956 * dwarf.h (DW_LANG_Go): Update comment. 957 (DW_LANG_Mips_Assembler): Likewise. 958 9592012-06-27 Mark Wielaard <mjw@redhat.com> 960 961 * dwarf.h: Add DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt. 962 * dwarf_begin.c (dwarf_begin): Add INTDEF. 963 * dwarf_begin_elf.c (__check_build_id): New internal_function. 964 (try_debugaltlink): New function. 965 (open_debugaltlink): Likewise. 966 (check_section): Try open_debugaltlink for .gnu_debugaltlink. 967 * dwarf_end.c (dwarf_end): Free the alternative Dwarf descriptor if 968 necessary. 969 * dwarf_error.c (errmsgs): Add DWARF_E_NO_ALT_DEBUGLINK. 970 * dwarf_formref.c (__libdw_formref): Using DW_FORM_GNU_ref_alt 971 is an error here. 972 * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_GNU_ref_alt. 973 * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_strp_alt. 974 * dwarf_formudata.c (__libdw_formptr): Adjust __libdw_read_offset 975 calls. 976 * dwarf_getpubnames.c (get_offsets): Adjust __libdw_read_offset call. 977 * libdwP.h: Add DWARF_E_NO_ALT_DEBUGLINK. 978 (struct Dwarf): Add alt_dwarf and free_alt fields. 979 (__libdw_read_offset): Add dbg_ret argument, use to check with 980 __libdw_offset_in_section. 981 (__check_build_id): New function declaration. 982 (dwarf_begin): Define as INTDECL. 983 * libdw_form.c (__libdw_form_val_len): Handle DW_FORM_GNU_ref_alt 984 and DW_FORM_GNU_strp_alt. 985 9862012-07-19 Mark Wielaard <mjw@redhat.com> 987 988 * dwarf.h: Add DW_OP_GNU_parameter_ref. 989 9902012-07-24 Mark Wielaard <mjw@redhat.com> 991 992 * dwarf.h: Correct spelling of DW_LANG_ObjC. 993 * dwarf_aggregate_size.c (array_size): Use correct spelling of 994 DW_LANG_ObjC. 995 9962012-07-24 Mark Wielaard <mjw@redhat.com> 997 998 * dwarf.h: Add DW_ATE_UTF. 999 10002012-06-27 Mark Wielaard <mjw@redhat.com> 1001 1002 * dwarf.h: Add DW_MACRO_GNU .debug_macro type encodings. 1003 10042012-06-26 Mark Wielaard <mjw@redhat.com> 1005 1006 * libdwP.h: Add IDX_debug_macro. 1007 * dwarf.h: Add DW_AT_GNU_macros. 1008 * dwarf_begin_elf.c (dwarf_scnnames): Add .debug_macro. 1009 * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_macros. 1010 10112012-04-27 Mark Wielaard <mjw@redhat.com> 1012 1013 * libdw/dwarf_highpc.c (dwarf_highpc): Handle DW_AT_high_pc being 1014 a constant offset from DW_AT_low_pc. 1015 10162012-03-19 Tom Tromey <tromey@redhat.com> 1017 1018 * libdw_findcu.c (findcu_cb): Move earlier. 1019 (__libdw_intern_next_unit): Add new CU to search tree here... 1020 (__libdw_findcu): ... not here. 1021 10222012-01-31 Mark Wielaard <mjw@redhat.com> 1023 1024 * dwarf_formudata.c (dwarf_formudata): Handle DW_FORM_sec_offset. 1025 10262011-11-31 Mark Wielaard <mjw@redhat.com> 1027 1028 * Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk. 1029 10302011-07-14 Mark Wielaard <mjw@redhat.com> 1031 1032 * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info. 1033 10342011-05-16 Jakub Jelinek <jakub@redhat.com> 1035 1036 * dwarf.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type, 1037 DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret): 1038 New. 1039 10402011-04-26 Mark Wielaard <mjw@redhat.com> 1041 1042 * dwarf_child (dwarf_child): Sanity check end of section against 1043 cu_data () of die->cu. 1044 10452011-03-22 Mark Wielaard <mjw@redhat.com> 1046 1047 * dwarf.h: Add DW_TAG_GNU_call_site, 1048 DW_TAG_GNU_call_site_parameter, 1049 DW_AT_GNU_call_site_value, 1050 DW_AT_GNU_call_site_data_value, 1051 DW_AT_GNU_call_site_target, 1052 DW_AT_GNU_call_site_target_clobbered, 1053 DW_AT_GNU_tail_call, 1054 DW_AT_GNU_all_tail_call_sites, 1055 DW_AT_GNU_all_call_sites, 1056 DW_AT_GNU_all_source_call_sites, 1057 and DW_OP_GNU_entry_value. 1058 10592011-03-10 Petr Machata <pmachata@redhat.com> 1060 1061 * libdw/dwarf_tag.c (__libdw_findabbrev): Reject requests for 1062 abbreviation with code 0. 1063 10642011-03-09 Petr Machata <pmachata@redhat.com> 1065 1066 * libdw/dwarf_child.c (dwarf_child): Check for section overrun. 1067 10682011-02-23 Roland McGrath <roland@redhat.com> 1069 1070 * libdwP.h (struct Dwarf) [USE_ZLIB]: New member sectiondata_gzip_mask. 1071 Declare __libdw_free_zdata. 1072 * dwarf_end.c [USE_ZLIB] (__libdw_free_zdata): New function. 1073 (dwarf_end): Call it. 1074 1075 * dwarf_begin_elf.c (valid_p): Likewise. 1076 (check_section, scngrp_read): Likewise. 1077 (check_section) [USE_ZLIB]: Grok .z* flavors of sections. 1078 10792010-10-13 Roland McGrath <roland@redhat.com> 1080 1081 * dwarf.h: Add DW_LANG_Go. 1082 10832010-10-05 Roland McGrath <roland@redhat.com> 1084 1085 * dwarf_getaranges.c: Use malloc rather than alloca, 1086 since the total number of elements can be quite huge. 1087 10882010-07-26 Roland McGrath <roland@redhat.com> 1089 1090 * dwarf_getlocation_implicit_pointer.c: New file. 1091 * Makefile.am (libdw_a_SOURCES): Add it. 1092 * libdw.map (ELFUTILS_0.149): New set. 1093 Add dwarf_getlocation_implicit_pointer. 1094 * libdw.h: Declare it. 1095 1096 * dwarf_offdie.c (do_offdie): Renamed to __libdw_offdie, made global. 1097 (dwarf_offdie, dwarf_offdie_types): Update callers. 1098 * libdwP.h: Declare it. 1099 1100 * dwarf.h: Add DW_OP_GNU_implicit_pointer. 1101 * dwarf_getlocation.c (__libdw_intern_expression): Handle it. 1102 11032010-08-24 Roland McGrath <roland@redhat.com> 1104 1105 * libdw.map (ELFUTILS_0.149): New set. Add dwfl_dwarf_line. 1106 11072010-07-27 Roland McGrath <roland@redhat.com> 1108 1109 * dwarf_formref_die.c: Fix sig8 hash insertion. 1110 11112010-06-23 Roland McGrath <roland@redhat.com> 1112 1113 * cfi.c (dwarf_cfi_validate_fde): Function removed. 1114 * libdw.h: Remove it. 1115 * libdw.map: Likewise. 1116 11172010-06-22 Roland McGrath <roland@redhat.com> 1118 1119 * dwarf_getlocation.c (check_constant_offset): data[48] are constant. 1120 1121 * dwarf_getsrclines.c: Fix signed comparison warning in extended 1122 opcode parsing. 1123 11242010-06-21 Roland McGrath <roland@redhat.com> 1125 1126 * dwarf.h: Add DW_TAG_GNU_* constants. 1127 1128 * memory-access.h (get_sleb128_rest_return): Fix sign extension for 1129 10-byte case. 1130 11312010-06-20 Roland McGrath <roland@redhat.com> 1132 1133 * libdw_findcu.c (__libdw_findcu): Take new flag argument, 1134 to search TUs instead of CUs. 1135 * libdwP.h: Update decl. 1136 (struct Dwarf): New member tu_tree. 1137 * dwarf_end.c (dwarf_end): Clean up tu_tree. 1138 * dwarf_offdie.c (do_offdie): New function, broken out of ... 1139 (dwarf_offdie): ... here. 1140 (dwarf_offdie_types): New function. 1141 * libdw.h: Declare it. 1142 * libdw.map (ELFUTILS_0.148): Add it. 1143 1144 * libdwP.h (CUDIE): Use cu_data. 1145 * dwarf_formblock.c: Likewise. 1146 * dwarf_formref_die.c: Likewise. 1147 * dwarf_diecu.c: Use CUDIE macro. 1148 * dwarf_formaddr.c: Use cu_sec_idx. 1149 11502010-06-16 Roland McGrath <roland@redhat.com> 1151 1152 * dwarf_formref_die.c: Use dwarf_offdie only for DW_FORM_ref_addr, so 1153 we don't repeat a CU lookup we've already done. Handle 1154 DW_FORM_ref_sig8 using sig8_hash table and __libdw_intern_next_unit. 1155 1156 * libdw_findcu.c (__libdw_intern_next_unit): New function, 1157 broken out of ... 1158 (__libdw_findcu): ... here. Call it. 1159 * libdwP.h: Declare it. 1160 (struct Dwarf): New member next_tu_offset. 1161 1162 * dwarf_sig8_hash.c: New file. 1163 * dwarf_sig8_hash.h: New file. 1164 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them. 1165 * dwarf_abbrev_hash.c: Include dwarf_sig8_hash.h before 1166 defining NO_UNDEF. 1167 * libdwP.h (struct Dwarf): New member sig8_hash. 1168 * dwarf_begin_elf.c: Call Dwarf_Sig8_Hash_init on it. 1169 * dwarf_end.c: Call Dwarf_Sig8_Hash_free on it. 1170 1171 * dwarf_nextcu.c (dwarf_next_unit): New function, broken out of ... 1172 (dwarf_nextcu): ... here. Call it. 1173 * libdw.h: Declare it. 1174 * libdwP.h: Add INTDECL. 1175 * libdw_findcu.c (__libdw_findcu): Use it instead of dwarf_nextcu. 1176 * libdw.map (ELFUTILS_0.148): New set, add dwarf_next_unit. 1177 1178 * libdwP.h (cu_sec_idx, cu_data): New functions. 1179 Use .debug_types when CU is a TU. 1180 * dwarf_cuoffset.c: Use that instead of assuming IDX_debug_info. 1181 * dwarf_siblingof.c: Likewise. 1182 * dwarf_formstring.c: Likewise. 1183 * dwarf_formudata.c (__libdw_formptr, dwarf_formudata): Likewise. 1184 * dwarf_getlocation.c (dwarf_getlocation): Likewise. 1185 (dwarf_getlocation_addr): Likewise. 1186 1187 * libdwP.h (struct Dwarf_CU): Add new members type_offset, type_sig8. 1188 (DIE_OFFSET_FROM_CU_OFFSET): Take flag argument; if true, compute 1189 .debug_types header size instead of .debug_info header size. 1190 (CUDIE): Use it. 1191 * dwarf_diecu.c: Update caller. 1192 * dwarf_getaranges.c: Likewise. 1193 * dwarf_nextcu.c: Likewise. 1194 * libdw_findcu.c (__libdw_findcu): Initialize new members. 1195 1196 * fde.c (fde_by_offset): Renamed to ... 1197 (__libdw_fde_by_offset): ... this, made global and internal_function. 1198 Don't take ADDRESS argument. 1199 (__libdw_find_fde): Update caller. Do address sanity check here. 1200 * cfi.h: Declare __libdw_fde_by_offset. 1201 * cfi.c (dwarf_cfi_validate_fde): New function. 1202 * libdw.h: Declare it. 1203 * libdw.map (ELFUTILS_0.148): Add it. 1204 1205 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to 1206 either DW_EH_PE_udata8 or DW_EH_PE_udata4. 1207 1208 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect. 1209 Don't assume DW_EH_PE_aligned refers to native address size. 1210 1211 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the 1212 address. 1213 12142010-06-17 Roland McGrath <roland@redhat.com> 1215 1216 * libdwP.h (struct Dwarf_Line_s): Add members isa, discriminator, and 1217 op_index. 1218 * dwarf_getsrclines.c (dwarf_getsrclines): Move NEW_FILE macro guts 1219 into an inner inline function. Set new fields. Check all fields for 1220 overflow when setting. 1221 * dwarf_lineisa.c: New file. 1222 * dwarf_linediscriminator.c: New file. 1223 * dwarf_lineop_index.c: New file. 1224 * Makefile.am (libdw_a_SOURCES): Add them. 1225 * libdw.map (ELFUTILS_0.148): Add them. 1226 * libdw.h: Declare them. 1227 12282010-06-16 Roland McGrath <roland@redhat.com> 1229 1230 * dwarf_next_cfi.c: Fix version 4 return_address_register decoding. 1231 1232 * fde.c (fde_by_offset): Renamed to ... 1233 (__libdw_fde_by_offset): ... this, made global and internal_function. 1234 Don't take ADDRESS argument. 1235 (__libdw_find_fde): Update caller. Do address sanity check here. 1236 * cfi.h: Declare __libdw_fde_by_offset. 1237 * cfi.c (dwarf_cfi_validate_fde): New function. 1238 * libdw.h: Declare it. 1239 * libdw.map (ELFUTILS_0.148): Add it. 1240 1241 * cie.c (intern_new_cie): Canonicalize DW_EH_PE_absptr FDE encoding to 1242 either DW_EH_PE_udata8 or DW_EH_PE_udata4. 1243 1244 * encoded-value.h (read_encoded_value): Handle DW_EH_PE_indirect. 1245 Don't assume DW_EH_PE_aligned refers to native address size. 1246 1247 * cfi.c (execute_cfi): Barf on CIE initial instructions changing the 1248 address. 1249 12502010-06-15 Roland McGrath <roland@redhat.com> 1251 1252 * dwarf_formref.c (__libdw_formref): Diagnose DW_FORM_ref_sig8 like 1253 DW_FORM_ref_addr. 1254 * dwarf_formref_die.c (dwarf_formref_die): Diagnose it the same way 1255 here, since we don't support it yet. 1256 1257 * dwarf_next_cfi.c: Handle version 4 format. 1258 1259 * dwarf_getsrclines.c: Handle version 4 format. 1260 12612010-06-01 Roland McGrath <roland@redhat.com> 1262 1263 * libdwP.h: Remove unused IDX_debug_*names, add IDX_debug_types. 1264 * dwarf_begin_elf.c (dwarf_scnnames): Likewise. 1265 1266 * libdwP.h (CIE_VERSION): Remove unused macro. 1267 1268 * dwarf_getsrclines.c: Fix version field test. 1269 * libdwP.h (DWARF_VERSION): Remove useless macro. 1270 1271 * dwarf_formudata.c (__libdw_formptr): Fix DW_FORM_sec_offset handling. 1272 1273 * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_exprloc. 1274 1275 * libdw_findcu.c (__libdw_findcu): Accept version 4. 1276 12772010-05-31 Mark Wielaard <mjw@redhat.com> 1278 1279 * cfi.h (dwarf_cfi_cie_p): Move definition from here, to .. 1280 * libdw.h (dwarf_cfi_cie_p): ... here. 1281 12822010-05-31 Mark Wielaard <mjw@redhat.com> 1283 1284 * dwarf.h: Fix DW_LANG_Python constant. 1285 12862010-05-28 Eduardo Santiago <santiago@redhat.com> 1287 1288 * dwarf_getlocation.c (dwarf_getlocation): Do attr_ok check first 1289 thing. 1290 12912010-05-27 Roland McGrath <roland@redhat.com> 1292 1293 * dwarf.h: Add DW_AT_enum_class, DW_AT_linkage_name, 1294 DW_TAG_template_alias, DW_LANG_Python, DW_LNE_set_discriminator. 1295 12962010-05-08 Roland McGrath <roland@redhat.com> 1297 1298 * dwarf_getlocation.c (__libdw_intern_expression): Take new argument 1299 REF_SIZE. Use that to handle DW_OP_call_ref correctly. 1300 (getlocation): Update caller. 1301 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise. 1302 * dwarf_frame_register.c (dwarf_frame_register): Likewise. 1303 * libdwP.h: Update decl. 1304 13052010-04-26 Roland McGrath <roland@redhat.com> 1306 1307 * cfi.h (struct Dwarf_Frame_s): Add cfa_invalid alternative in cfa_rule. 1308 * cfi.c (execute_cfi): Set that instead of doing cfi_assert for 1309 DW_CFA_def_cfa_{offset*,register} when a non-offset rule is in force. 1310 * dwarf_frame_cfa.c (dwarf_frame_cfa): Handle cfa_invalid. 1311 1312 * dwarf_getlocation.c (__libdw_intern_expression): Take new arg CFAP. 1313 Prepend DW_OP_call_frame_cfa if true. 1314 (getlocation): Update caller. 1315 * dwarf_frame_cfa.c (dwarf_frame_cfa): Likewise. 1316 * dwarf_frame_register.c (dwarf_frame_register): Likewise. 1317 * libdwP.h: Update decl. 1318 13192010-04-22 Roland McGrath <roland@redhat.com> 1320 1321 * cfi.c (execute_cfi): Never return without cleanup. 1322 Free FS on failure. 1323 (cie_cache_initial_state): Adjust caller to expect that free. 1324 (__libdw_frame_at_address): Likewise. 1325 13262010-03-10 Roland McGrath <roland@redhat.com> 1327 1328 * libdw.map (ELFUTILS_0.146): New set. Add dwfl_core_file_report. 1329 13302010-02-15 Roland McGrath <roland@redhat.com> 1331 1332 * Makefile.am: Use config/eu.am for common stuff. 1333 13342010-02-02 Mark Wielaard <mjw@redhat.com> 1335 1336 * fde.c (intern_fde): Fix length check for sized_augmentation_data. 1337 13382010-01-07 Roland McGrath <roland@redhat.com> 1339 1340 * dwarf_getcfi_elf.c (getcfi_phdr): Use elf_getphdrnum. 1341 13422010-01-05 Roland McGrath <roland@redhat.com> 1343 1344 * dwarf_aggregate_size.c: New file. 1345 * Makefile.am (libdw_a_SOURCES): Add it. 1346 * libdw.h: Declare it. 1347 * libdwP.h: Add INTDECL. 1348 * libdw.map (ELFUTILS_0.144): New set. Add dwarf_aggregate_size. 1349 1350 * dwarf_srclang.c: Add INTDEF. 1351 * libdwP.h: Add INTDECL. 1352 1353 * dwarf.h: Add some more DW_AT_GNU_* types from gcc. 1354 1355 * dwarf.h: Add DW_AT_GNU_vector, DW_AT_GNU_template_name. 1356 13572009-11-21 Roland McGrath <roland@redhat.com> 1358 1359 * dwarf_getlocation.c (check_constant_offset): Return 1 for all 1360 non-constant forms. 1361 13622009-10-15 Roland McGrath <roland@redhat.com> 1363 1364 * libdw_form.c (__libdw_form_val_len): Grok DW_FORM_sec_offset, 1365 DW_FORM_exprloc, DW_FORM_flag_present, and DW_FORM_ref_sig8. 1366 13672009-09-17 Roland McGrath <roland@redhat.com> 1368 1369 * dwarf_getlocation.c (dwarf_getlocation_implicit_value): Make OP 1370 argument a pointer to const. 1371 * libdw.h: Update decl. 1372 13732009-09-10 Roland McGrath <roland@redhat.com> 1374 1375 * dwarf_getlocation.c (store_implicit_value): New function. 1376 (__libdw_intern_expression): Use it, handle DW_OP_implicit_value. 1377 (dwarf_getlocation_implicit_value): New function. 1378 * libdw.h: Declare it. 1379 * libdw.map (ELFUTILS_0.143): Add it. 1380 13812009-09-09 Mark Wielaard <mjw@redhat.com> 1382 1383 * dwarf_getcfi.c (dwarf_getcfi): Clear cfi->ebl. 1384 13852009-08-21 Josh Stone <jistone@redhat.com> 1386 1387 * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too. 1388 13892009-08-10 Roland McGrath <roland@redhat.com> 1390 1391 * dwarf_getscopevar.c: Use dwarf_diename. 1392 13932009-08-09 Roland McGrath <roland@redhat.com> 1394 1395 * libdw.map (ELFUTILS_0.143): New version set, 1396 inherits from ELFUTILS_0.142. 1397 * dwarf_arrayorder.c: Use OLD_VERSION and NEW_VERSION to define an 1398 alias in the ELFUTILS_0.122 version set and the default in the new set. 1399 * dwarf_srclang.c: Likewise. 1400 * dwarf_decl_file.c: Likewise. 1401 * dwarf_decl_line.c: Likewise. 1402 * dwarf_decl_column.c: Likewise. 1403 * dwarf_bytesize.c: Likewise. 1404 * dwarf_bitsize.c: Likewise. 1405 * dwarf_bitoffset.c: Likewise. 1406 14072009-08-07 Roland McGrath <roland@redhat.com> 1408 1409 * dwarf_arrayorder.c: Use dwarf_attr_integrate. 1410 * dwarf_srclang.c: Likewise. 1411 * dwarf_decl_file.c: Likewise. 1412 * dwarf_decl_line.c (__libdw_attr_intval): Likewise. 1413 * dwarf_bytesize.c: Likewise. 1414 * dwarf_bitsize.c: Likewise. 1415 * dwarf_bitoffset.c: Likewise. 1416 14172009-07-22 Roland McGrath <roland@redhat.com> 1418 1419 * dwarf_frame_cfa.c: Change calling convention. 1420 * libdw.h: Update decl. 1421 1422 * dwarf_frame_register.c: Change calling/return-value convention for 1423 value-only results and undefined/same_value. 1424 * libdw.h: Update decl. 1425 1426 * dwarf_getlocation.c (__libdw_intern_expression): Take new bool 1427 argument, append DW_OP_stack_value if set. Don't take NOPS argument, 1428 return that value instead. 1429 (getlocation): Update caller. 1430 * dwarf_frame_cfa.c: Likewise. 1431 * libdwP.h: Update decl. 1432 14332009-07-21 Roland McGrath <roland@redhat.com> 1434 1435 * dwarf_getsrc_file.c: Ignore a CU that just has no DW_AT_stmt_list. 1436 Fix loop iteration after skipping a bogus or useless CU. 1437 1438 * dwarf_entry_breakpoints.c: Handle 0 dwarf_errno () as harmless 1439 absence, not DWARF_E_NO_DEBUG_LINE. 1440 14412009-07-20 Roland McGrath <roland@redhat.com> 1442 1443 * dwarf_getlocation.c (__libdw_intern_expression): 1444 Handle DW_OP_stack_value. 1445 14462009-07-16 Roland McGrath <roland@redhat.com> 1447 1448 * dwarf_formudata.c (__libdw_formptr): Handle DW_FORM_sec_offset, 1449 reject others when CU's version > 3. 1450 1451 * dwarf_formflag.c: Handle DW_FORM_flag_present. 1452 1453 * dwarf.h: Add DW_OP_{implicit,stack}_value from DWARF 4 draft. 1454 Also DW_TAG_type_unit and DW_TAG_rvalue_reference_type. 1455 Also DW_AT_signature, DW_AT_main_subprogram, DW_AT_data_bit_offset, 1456 and DW_AT_const_expr. 1457 Also DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present, 1458 and DW_FORM_ref_sig8. 1459 14602009-07-15 Roland McGrath <roland@redhat.com> 1461 1462 * dwarf_getlocation.c: Grok DW_OP_form_tls_address, 1463 DW_OP_GNU_push_tls_address, and DW_OP_bit_piece. 1464 14652009-07-13 Roland McGrath <roland@redhat.com> 1466 1467 * dwarf_getlocation.c: Grok DW_OP_call_frame_cfa. 1468 14692009-07-08 Roland McGrath <roland@redhat.com> 1470 1471 * libdw.map (ELFUTILS_0.142): Add dwfl_module_dwarf_cfi, 1472 dwfl_module_eh_cfi. 1473 1474 * libdwP.h (struct Dwarf): Add member `cfi'. 1475 * dwarf_end.c (dwarf_end): Call __libdw_destroy_frame_cache on it. 1476 * dwarf_getcfi.c: New file. 1477 * dwarf_getcfi_elf.c: New file. 1478 * dwarf_cfi_end.c: New file. 1479 * dwarf_cfi_addrframe.c: New file. 1480 * dwarf_frame_cfa.c: New file. 1481 * dwarf_frame_register.c: New file. 1482 * dwarf_frame_return_address_register.c: New file. 1483 * Makefile.am (libdw_a_SOURCES): Add them. 1484 * unwind.h: Declare those functions. 1485 * libdw.map (ELFUTILS_0.142): Export them. 1486 1487 * dwarf_getlocation.c (__libdw_intern_expression): New function, 1488 broken out of ... 1489 (getlocation): ... here, call it. 1490 * libdwP.h: Declare it. 1491 1492 * cie.c: New file. 1493 * fde.c: New file. 1494 * frame-cache.c: New file. 1495 * cfi.c: New file. 1496 * cfi.h: New file. 1497 * encoded-value.h: New file. 1498 * Makefile.am (libdw_a_SOURCES, noinst_HEADERS): Add them. 1499 * libdwP.h: Add DWARF_E_INVALID_CFI to errors enum. 1500 * dwarf_error.c (errmsgs): Add element for it. 1501 1502 * dwarf_next_cfi.c: New file. 1503 * Makefile.am (libdw_a_SOURCES): Add it. 1504 * libdw.h (Dwarf_CIE, Dwarf_FDE, Dwarf_CIE_Entry): New types. 1505 Declare dwarf_next_cfi. 1506 * libdw.map (ELFUTILS_0.142): New set, inherits from ELFUTILS_0.136. 1507 Add dwarf_next_cfi. 1508 1509 * memory-access.h [! ALLOW_UNALIGNED] 1510 (read_2ubyte_unaligned): Renamed to ... 1511 (read_2ubyte_unaligned_1): ... this. Take bool rather than Dwarf *. 1512 (read_2ubyte_unaligned): Define as macro passing dbg->other_byte_order. 1513 (read_2sbyte_unaligned): Likewise. 1514 (read_4ubyte_unaligned): Likewise. 1515 (read_4sbyte_unaligned): Likewise. 1516 (read_8ubyte_unaligned): Likewise. 1517 (read_8sbyte_unaligned): Likewise. 1518 1519 * libdwP.h (IDX_eh_frame): Remove it. 1520 * dwarf_begin_elf.c (dwarf_scnnames): Remove its element. 1521 15222009-07-08 Roland McGrath <roland@redhat.com> 1523 1524 * libdwP.h (struct Dwarf_Line_s): Reorder members to pack better. 1525 1526 * dwarf_getlocation.c (check_constant_offset): New function. 1527 (dwarf_getlocation, dwarf_getlocation_addr): Call it to 1528 handle DW_AT_data_member_location of data[48] as constant offset. 1529 15302009-06-18 Roland McGrath <roland@redhat.com> 1531 1532 * libdwP.h (__libdw_read_address_inc): Constify. 1533 (__libdw_read_offset_inc): Likewise. 1534 * dwarf_getaranges.c: Likewise. 1535 * dwarf_getlocation.c: Likewise. 1536 * dwarf_getsrclines.c: Likewise. 1537 * dwarf_nextcu.c: Likewise. 1538 15392009-05-05 Petr Machata <pmachata@redhat.com> 1540 1541 * libdwP.h (__libdw_formptr): Declare new function. 1542 * dwarf_formudata.c: Implement it here. 1543 * dwarf_getlocation.c (dwarf_getlocation_addr): 1544 Call it instead of hand-rolled offset handling code. 1545 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise. 1546 * dwarf_ranges.c (dwarf_ranges): Likewise. 1547 15482009-05-04 Petr Machata <pmachata@redhat.com> 1549 1550 * libdwP.h (__libdw_read_begin_end_pair_inc): Declare new function. 1551 * dwarf_ranges.c: Implement it here. 1552 (dwarf_ranges): Call it. 1553 * dwarf_getlocation.c (dwarf_getlocation_addr): Call it also here. 1554 15552009-04-23 Petr Machata <pmachata@redhat.com> 1556 1557 * dwarf_formaddr.c (dwarf_formaddr): Call __libdw_read_* instead 1558 of read_*ubyte_unaligned. 1559 * dwarf_formref_die.c (dwarf_formref_die): Likewise. 1560 * dwarf_formstring.c (dwarf_formstring): Likewise. 1561 * dwarf_formudate.c (dwarf_formudata): Likewise. 1562 * dwarf_getaranges.c (dwarf_getaranges): Likewise. 1563 * dwarf_getlocation.c (dwarf_getlocation_addr): Likewise. 1564 * dwarf_getpubnames.c (get_offsets): Likewise. 1565 * dwarf_nextcu.c (dwarf_nextcu): Likewise. 1566 15672009-04-23 Petr Machata <pmachata@redhat.com> 1568 1569 * libdwP.h (__libdw_read_addr_inc, __libdw_read_off_inc, 1570 __libdw_read_addr, __libdw_read_off): Add four new internal 1571 functions. 1572 15732009-05-07 Roland McGrath <roland@redhat.com> 1574 1575 * dwarf_getmacros.c (dwarf_getmacros): Use absolute section offset in 1576 return value and OFFSET argument, not CU-relative. Only fetch the 1577 attribute data when called with OFFSET of 0. 1578 15792009-05-07 Petr Machata <pmachata@redhat.com> 1580 1581 * dwarf_getmacros.c (dwarf_getmacros): Take into account offset in 1582 DW_AT_macro_info attribute of CU DIE. 1583 15842009-04-15 Roland McGrath <roland@redhat.com> 1585 1586 * dwarf.h (DW_CIE_ID): Removed. 1587 (DW_CIE_ID_32, DW_CIE_ID_64): New constants replace it. 1588 15892009-04-01 Roland McGrath <roland@redhat.com> 1590 1591 * dwarf.h: Add DW_CFA_GNU_negative_offset_extended. 1592 15932009-01-28 Roland McGrath <roland@redhat.com> 1594 1595 * libdwP.h (struct Dwarf_Line_s): Move out of struct Dwarf_Lines_s 1596 defn so C++ doesn't scope the name to not match the Dwarf_Line typedef. 1597 1598 * libdwP.h (struct Dwarf_Files_s): Replace dbg field with cu field. 1599 16002009-01-26 Roland McGrath <roland@redhat.com> 1601 1602 * dwarf_ranges.c: Return 0 when no ranges or *_pc attrs at all. 1603 16042009-01-25 Roland McGrath <roland@redhat.com> 1605 1606 * dwarf_getattrs.c: Correctly skip attribute values when restarting. 1607 16082009-01-23 Roland McGrath <roland@redhat.com> 1609 1610 * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back. 1611 Put these rules under if MAINTAINER_MODE. 1612 16132009-01-22 Roland McGrath <roland@redhat.com> 1614 1615 * dwarf.h: Add DW_OP_GNU_encoded_addr. 1616 16172009-01-21 Roland McGrath <roland@redhat.com> 1618 1619 * Makefile.am (CLEANFILES): Renamed to ... 1620 (MOSTLYCLEANFILES): ... here. 1621 (CLEANFILES): New variable, add known-dwarf.h. 1622 16232009-01-17 Roland McGrath <roland@redhat.com> 1624 1625 * Makefile.am (known-dwarf.h): Target renamed, not in $(srcdir). 1626 Make it unconditional. 1627 (BUILT_SOURCES): Updated. 1628 1629 * dwarf.h: Add description comments for DW_LANG_* values. 1630 1631 * Makefile.am [MAINTAINER_MODE] 1632 ($(srcdir)/known-dwarf.h): New target. 1633 (BUILT_SOURCES): Add it. 1634 1635 * dwarf.h: Add DW_OP_GNU_push_tls_address, DW_OP_GNU_uninit. 1636 16372009-01-10 Ulrich Drepper <drepper@redhat.com> 1638 1639 * dwarf_error.c: Always use __thread. Remove all !USE_TLS code. 1640 16412009-01-08 Roland McGrath <roland@redhat.com> 1642 1643 * Makefile.am (libdw.so): Don't depend on $(zip_LIBS), just link it in. 1644 16452008-01-06 Roland McGrath <roland@redhat.com> 1646 1647 * libdwP.h (struct Dwarf_Abbrev): Change type of 'has_children' to bool. 1648 Reorder members. 1649 * dwarf_haschildren.c: Return -1 for error case, not 0. 1650 1651 * Makefile.am (libdw.so): Link in $(zip_LIBS). 1652 16532009-01-06 Ulrich Drepper <drepper@redhat.com> 1654 1655 * dwarf.h: Add definition for unwind and call frame information. 1656 1657 * memory-access.h: Define read_ubyte_unaligned, read_sbyte_unaligned, 1658 read_ubyte_unaligned_inc, and read_sbyte_unaligned_inc. 1659 16602008-08-15 Roland McGrath <roland@redhat.com> 1661 1662 * libdw.map (ELFUTILS_0.136): New version set, inherits from 1663 ELFUTILS_0.130. Add dwfl_addrsegment, dwfl_report_segment. 1664 16652008-01-21 Ulrich Drepper <drepper@redhat.com> 1666 1667 * dwarf_child.c: Minor optimizations. 1668 * dwarf_getattrs.c: Likewise. 1669 * dwarf_getpubnames.c: Likewise. 1670 * dwarf_siblingof.c: Likewise. 1671 * dwarf_tag.c: Likewise. 1672 16732008-01-18 Ulrich Drepper <drepper@redhat.com> 1674 1675 * dwarf_getsrclines.c (dwarf_getsrclines): Don't require exact match 1676 of DWARF_VERSION comparison, just fail if the file's version is newer. 1677 16782008-01-17 Nick Clifton <nickc@redhat.com> 1679 1680 * dwarf.h (DWARF3_LENGTH_MIN_ESCAPE_CODE): New define. 1681 (DWARF3_LENGTH_MAX_ESCAPE_CODE): New define. 1682 (DWARF3_LENGTH_64_BIT): New define. 1683 * dwarf_getaranges (dwarf_getaranges): Use the new definitions. 1684 * dwarf_getpubnames: Include dwarf.h. 1685 (get_offsets): Use the new definitions. 1686 * dwarf_getsrclines.c (dwarf_getsrclines): Use the new defintions. 1687 * dwarf_nextcu.c: Include dwarf.h. Correct comment. 1688 (dwarf_nextcu): Use the new definitions. 1689 1690 * libdwP.h (DIE_OFFSET_FROM_CU_OFFSET): New macro. 1691 * dwarf_diecu.c (dwarf_diecu): Use the new macro. 1692 * dwarf_getaranges (dwarf_getaranges): Use the new macro. 1693 * dwarf_nextcu.c (dwarf_nextcu): Use the new macro. 1694 1695 * dwarf_getpubnames (get_offsets): Replace assertion with test and 1696 error return. 1697 1698 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Use CUDIE. 1699 1700 * dwarf_siblingof (dwarf_siblingof): Detect a NULL return pointer. 1701 Set the address in the return structure to the address of the next 1702 non-sibling die, if there is no sibling and the return pointer is 1703 not the same as the die pointer. 1704 * libdw.h: Expand the description of the dwarf_siblingof prototype. 1705 1706 * dwarf_child.c: Fix typo in comment. 1707 1708 * libdwP.h (DWARF_VERSION): Change to 3. 1709 1710 * dwarf_formref.c (__libdw_formref.c): Handle attributes which do 1711 not have a initialised valp pointer. 1712 1713 * dwarf_getattrs.c (dwarf_getattrs): Return 1 rather than 0 when 1714 the end of the attributes is reached. When the callback fails, 1715 return the address of the failing attribute, not the address of 1716 its successor. 1717 * libdw.h: Expand the description of the dwarf_getattrs prototype. 1718 1719 * dwarf_child.c (__libdw_find_attr): Use the new definition. 1720 (dwarf_child): Likewise. 1721 * dwarf_tag.c (__libdw_findabbrev): Likewise. 1722 (dwarf_tag): Likewise. 1723 17242008-01-08 Roland McGrath <roland@redhat.com> 1725 1726 * Makefile.am (euinclude): Variable removed. 1727 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS. 1728 (libdw.so): Pass -Wl,--enable-new-dtags,-rpath,$(pkglibdir). 1729 17302007-10-17 Roland McGrath <roland@redhat.com> 1731 1732 * libdw.h (__deprecated_attribute__): New macro. 1733 (dwarf_formref): Mark it deprecated. 1734 * dwarf_formref.c (__libdw_formref): New function, broken out of ... 1735 (dwarf_formref): ... here. Call it. Remove INTDEF. 1736 * libdwP.h: Remove INTDECL. 1737 Declare __libdw_formref. 1738 * dwarf_siblingof.c (dwarf_siblingof): Call __libdw_formref instead. 1739 * dwarf_formref_die.c: Likewise. Handle DW_FORM_ref_addr here. 1740 1741 * libdw_form.c (__libdw_form_val_len): Fix DW_FORM_ref_addr result, 1742 needs to check CU->version. 1743 1744 * libdwP.h (struct Dwarf_CU): New member `version'. 1745 * libdw_findcu.c (__libdw_findcu): Initialize it. 1746 1747 * dwarf_child.c: Return 1 for null entry as first child. 1748 17492007-10-05 Roland McGrath <roland@redhat.com> 1750 1751 * dwarf_begin_elf.c (check_section): Punt on SHT_NOBITS sections. 1752 1753 * libdw.h (__extern_inline): Rename to __libdw_extern_inline. 1754 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Update uses. 1755 17562007-10-03 Roland McGrath <roland@redhat.com> 1757 1758 * libdw.map (ELFUTILS_0.130: Add dwfl_build_id_find_elf 1759 and dwfl_build_id_find_debuginfo. 1760 1761 * libdw.map (ELFUTILS_0.130): New version set, inherits from 1762 ELFUTILS_0.127. Add dwfl_module_build_id, dwfl_module_report_build_id. 1763 17642007-10-02 Roland McGrath <roland@redhat.com> 1765 1766 * libdw_visit_scopes.c (classify_die): Return walk for class_type and 1767 structure_type. 1768 17692007-08-07 Roland McGrath <roland@redhat.com> 1770 1771 * dwarf_getscopes.c (pc_match): Swallow dwarf_haspc error return when 1772 error code is DWARF_E_NOERROR (0). 1773 1774 * dwarf_getscopes.c (pc_record): Always bail early if DIE->prune. 1775 Fix typo in __libdw_visit_scopes argument. 1776 1777 * dwarf_getscopes.c (pc_match): Check dwarf_haspc error return, 1778 swallow DWARF_E_NO_DEBUG_RANGES but not other errors. 1779 17802007-07-03 Roland McGrath <roland@redhat.com> 1781 1782 * libdw.h (__extern_inline): New macro. 1783 [__OPTIMIZE__] (dwarf_whatattr, dwarf_whatform): Use it. 1784 17852007-04-16 Roland McGrath <roland@redhat.com> 1786 1787 * libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section. 1788 17892007-04-05 Roland McGrath <roland@redhat.com> 1790 1791 * dwarf_getsrcdirs.c: New file. 1792 * Makefile.am (libdw_a_SOURCES): Add it. 1793 * libdw.h: Declare dwarf_getsrcdirs. 1794 * libdw.map (ELFUTILS_0.127): Add it. 1795 1796 * libdwP.h (struct Dwarf_Files_s): New member ndirs. 1797 * dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to 1798 zero before we use it to check for DWARF_E_INVALID_DIR_IDX. 1799 Save DIRARRAY in the Dwarf_Files. 1800 1801 * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN 1802 address to check for all-ones base address entry. Check directly. 1803 Reported by Sébastien Dugué <sebastien.dugue@bull.net>. 1804 18052007-03-25 Roland McGrath <roland@redhat.com> 1806 1807 * dwarf_begin_elf.c (check_section): Return Dwarf * instead of void. 1808 Return NULL when freeing RESULT on error. 1809 (global_read, scngrp_read): Check return value from check_section, 1810 break out of loop after it has freed RESULT. 1811 (valid_p): Handle null argument. 1812 18132007-03-12 Roland McGrath <roland@redhat.com> 1814 1815 * libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add. 1816 18172007-03-04 Roland McGrath <roland@redhat.com> 1818 1819 * libdw.map (ELFUTILS_0.127): New version set, inherits from 1820 ELFUTILS_0.126. Add dwfl_module_addrsym. 1821 18222007-02-10 Roland McGrath <roland@redhat.com> 1823 1824 * dwarf.h (DW_OP_fbreg): Comment fix. 1825 18262007-02-03 Roland McGrath <roland@redhat.com> 1827 1828 * dwarf_getelf.c (dwarf_getelf): Renamed from dwarf_get_elf. 1829 * libdw.map (ELFUTILS_0.126): New version set, inherits from 1830 ELFUTILS_0.122. Move dwarf_getelf there; it was never truly 1831 exported in the past. 1832 18332006-12-17 Roland McGrath <roland@redhat.com> 1834 1835 * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base 1836 address when the CU is missing attributes due to buggy GCC. 1837 18382006-08-29 Roland McGrath <roland@redhat.com> 1839 1840 * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION). 1841 1842 * libdw.h (dwarf_diecu): Add __nonnull_attribute__. 1843 (dwarf_child): Don't list arg 1 in __nonnull_attribute__. 1844 1845 * libdw_alloc.c (__libdw_allocate): Take new ALIGN argument, make sure 1846 result is aligned. Adjust NEWP->remaining here for this allocation. 1847 * libdwP.h: Update decl. 1848 (libdw_alloc): Update caller. 1849 18502006-07-12 Ulrich Drepper <drepper@redhat.com> 1851 1852 * dwarf_child.c: Adjust for internal_function_def removal. 1853 * dwarf_getabbrev.c: Likewise. 1854 * dwarf_tag.c: Likewise. 1855 * libdw_form.c: Likewise. 1856 * memory-access.c: Likewise. 1857 18582006-06-28 Roland McGrath <roland@redhat.com> 1859 1860 * libdw.map: Export dwfl_linecu, dwfl_line_comp_dir. 1861 1862 * libdw.map: Bump to 0.122; export dwfl_module_getsymtab and 1863 dwfl_module_getsym. 1864 18652006-05-27 Ulrich Drepper <drepper@redhat.com> 1866 1867 * libdw.h: Add extern "C". 1868 18692006-05-22 Ulrich Drepper <drepper@redhat.com> 1870 1871 * dwarf_getaranges.c (dwarf_getaranges): Handle files without 1872 aranges information. 1873 18742006-05-21 Ulrich Drepper <drepper@redhat.com> 1875 1876 * libdw.h: Add nonnull attributes to dwarf_tag, dwarf_getattrs, 1877 dwarf_haschildren. 1878 18792006-02-28 Roland McGrath <roland@redhat.com> 1880 1881 * dwarf.h: Add missing DW_ATE_*, DW_TAG_*, DW_LANG_*, DW_CFA_*, 1882 DW_OP_* values, to match DWARF 3.0. Add new DW_DS_*, DW_END_* 1883 values from DWARF 3.0. 1884 18852006-02-22 Roland McGrath <roland@redhat.com> 1886 1887 * libdw.map: Bump to 0.120; export dwfl_version. 1888 18892005-12-22 Roland McGrath <roland@redhat.com> 1890 1891 * libdw.map: Bump to 0.119; export dwfl_linux_proc_maps_report. 1892 18932005-12-12 Roland McGrath <roland@redhat.com> 1894 1895 * dwarf_ranges.c: Copy CU base address-finding code from 1896 dwarf_getlocation. 1897 18982005-12-09 Roland McGrath <roland@redhat.com> 1899 1900 * dwarf_getlocation.c (dwarf_getlocation_addr): Add some unlikelys. 1901 Delay CU base lookup until it's needed. 1902 If CU base lookup fails with no error, flag invalid DWARF. 1903 19042005-11-25 Roland McGrath <roland@redhat.com> 1905 1906 * libdw.map: Bump to 0.118; export dwfl_module_register_names. 1907 19082005-11-15 Roland McGrath <roland@redhat.com> 1909 1910 * Makefile.am [BUILD_STATIC] (AM_CFLAGS): Add -fpic. 1911 19122005-11-13 Roland McGrath <roland@redhat.com> 1913 1914 * libdw.map: Bump to 0.117; export dwfl_module_return_value_location. 1915 19162005-10-27 Roland McGrath <roland@redhat.com> 1917 1918 * dwarf_entry_breakpoints.c (search_range): Fix binary search code; 1919 don't match end_sequence markers. 1920 1921 * dwarf_getsrclines.c (compare_lines): Sort end_sequence markers 1922 before normal records at the same address. 1923 * dwarf_getsrc_die.c (dwarf_getsrc_die): Don't match an end_sequence 1924 marker. 1925 19262005-10-26 Roland McGrath <roland@redhat.com> 1927 1928 * dwarf_getfuncs.c (dwarf_getfuncs): Use Dwarf_Die, not Dwarf_Func. 1929 * dwarf_func_file.c: Renamed to ... 1930 * dwarf_decl_file.c: ... here. 1931 * dwarf_func_col.c: Renamed to ... 1932 * dwarf_decl_column.c: ... here. 1933 * dwarf_func_line.c: Renamed to ... 1934 * dwarf_decl_line.c: ... here. 1935 (dwarf_func_line): Renamed to ... 1936 (dwarf_decl_line): ... this. Take a Dwarf_Die * argument. 1937 (__libdw_func_intval): Renamed __libdw_attr_intval. 1938 * dwarf_func_name.c: File removed. 1939 * dwarf_func_lowpc.c: File removed. 1940 * dwarf_func_highpc.c: File removed. 1941 * dwarf_func_entrypc.c: File removed. 1942 * dwarf_func_die.c: File removed. 1943 * Makefile.am (libdw_a_SOURCES): Updated. 1944 * libdw.h: Update decls. 1945 (Dwarf_Func): Type removed. 1946 * libdwP.h: Update decls. 1947 (struct Dwarf_Func_s): Type removed. 1948 * libdw.map: Updated. 1949 1950 * libdwP.h (CUDIE): New macro. 1951 * dwarf_getlocation.c (dwarf_getlocation_addr): Use it. 1952 * dwarf_getscopes_die.c (dwarf_getscopes_die): Likewise. 1953 * dwarf_ranges.c (dwarf_ranges): Likewise. 1954 1955 * dwarf_getloclist.c: Renamed to ... 1956 * dwarf_getlocation.c: ... here. 1957 (getloclist): Renamed to getlocation. 1958 (dwarf_getloclist): Renamed to dwarf_getlocation. 1959 (dwarf_addrloclists): Renamed to dwarf_getlocation_addr. 1960 * Makefile.am (libdw_a_SOURCES): Updated. 1961 * libdw.h (dwarf_getloclist): Renamed to dwarf_getlocation. 1962 (dwarf_addrloclists): Renamed dwarf_getlocation_addr. 1963 (Dwarf_Loc): Renamed Dwarf_Op. 1964 * libdwP.h (struct loc_s): Update use. 1965 * libdw.map: Update map. 1966 1967 * dwarf_entry_breakpoints.c: Use the second line record within the 1968 function, regardless of its source location data. 1969 19702005-10-25 Roland McGrath <roland@redhat.com> 1971 1972 * dwarf_entry_breakpoints.c: Fall back to entrypc for contiguous too. 1973 1974 * libdw.map: Add dwarf_entrypc, dwarf_entry_breakpoints. 1975 19762005-10-14 Roland McGrath <roland@redhat.com> 1977 1978 * dwarf_diecu.c (dwarf_diecu): New file. 1979 * Makefile.am (libdw_a_SOURCES): Add it. 1980 * libdw.h: Declare dwarf_diecu. 1981 * libdw.map: Export it. 1982 1983 * libdw.map: Bump to 0.116; export dwarf_ranges. 1984 19852005-09-20 Roland McGrath <roland@redhat.com> 1986 1987 * dwarf_haspc.c: Use dwarf_ranges. 1988 * dwarf_entry_breakpoints.c: Likewise. 1989 1990 * dwarf_ranges.c: New file. 1991 * Makefile.am (libdw_a_SOURCES): Add it. 1992 * libdw.h: Declare dwarf_ranges. 1993 * libdwP.h: Add INTDECL. 1994 19952005-09-14 Roland McGrath <roland@redhat.com> 1996 1997 * dwarf_entry_breakpoints.c (dwarf_entry_breakpoints): Fix braino in 1998 prologue_end marker scanning loop. 1999 20002005-09-11 Roland McGrath <roland@redhat.com> 2001 2002 * dwarf.h: Comment typo fix. 2003 20042005-09-07 Roland McGrath <roland@redhat.com> 2005 2006 * dwarf_entry_breakpoints.c: New file. 2007 * Makefile.am (libdw_a_SOURCES): Add it. 2008 * libdw.h: Declare dwarf_entry_breakpoints. 2009 2010 * dwarf_entrypc.c: New file. 2011 * Makefile.am (libdw_a_SOURCES): Add it. 2012 * libdw.h: Declare dwarf_entrypc. 2013 * libdwP.h: Add INTDECL. 2014 20152005-08-28 Ulrich Drepper <drepper@redhat.com> 2016 2017 * Makefile.am: Use $(LINK) not $(CC) when creating DSO. 2018 (%.os): Use COMPILE.os. 2019 (COMPILE.os): Filter out gconv options. 2020 20212005-08-27 Roland McGrath <roland@redhat.com> 2022 2023 * dwarf_getscopes.c (dwarf_getscopes): Rewritten using 2024 __libdw_visit_scopes. 2025 2026 * dwarf_getscopes_die.c: New file. 2027 * Makefile.am (libdw_a_SOURCES): Add it. 2028 * libdw.h: Declare dwarf_getscopes_die. 2029 * libdw.map: Bump to 0.115 and add it. 2030 2031 * libdw_visit_scopes.c (__libdw_visit_scopes): Pass a struct 2032 containing a DIE and its parent pointer, instead of just Dwarf_Die. 2033 Take two functions for both preorder and postorder visitors. 2034 * libdwP.h: Update decl. 2035 (struct Dwarf_Die_Chain): New type. 2036 * dwarf_func_inline.c: Update uses. 2037 2038 * dwarf_diename.c (dwarf_diename): Use dwarf_attr_integrate. 2039 Add INTDEF. 2040 * libdwP.h: Add INTDECL. 2041 * dwarf_func_name.c (dwarf_func_name): Use dwarf_diename. 2042 20432005-08-23 Roland McGrath <roland@redhat.com> 2044 2045 * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat 2046 DW_AT_specification the same as DW_AT_abstract_origin. 2047 20482005-08-20 Roland McGrath <roland@redhat.com> 2049 2050 * libdw.map: Add dwfl_cumodule, remove dwfl_linecu. 2051 Add dwfl_linux_kernel_report_offline, dwfl_offline_section_address, 2052 and dwfl_report_offline. 2053 20542005-08-19 Roland McGrath <roland@redhat.com> 2055 2056 * libdw.map: Bump version to ELFUTILS_0.114 for libdwfl changes. 2057 Add dwfl_module_relocate_address, dwfl_module_relocations, 2058 dwfl_module_relocation_info. 2059 20602005-08-18 Roland McGrath <roland@redhat.com> 2061 2062 * dwarf_getscopes.c (dwarf_getscopes): Include the CU itself as 2063 outermost scope in the results. 2064 20652005-08-15 Roland McGrath <roland@redhat.com> 2066 2067 * dwarf_func_inline.c: New file. 2068 * Makefile.am (libdw_a_SOURCES): Add it. 2069 * libdw.h: Declare dwarf_func_inline, dwarf_func_inline_instances. 2070 * libdw.map: Add them. 2071 2072 * dwarf_func_die.c: New file. 2073 * Makefile.am (libdw_a_SOURCES): Add it. 2074 * libdw.h: Declare dwarf_func_die. 2075 * libdw.map: Add it. Bump version to ELFUTILS_0.114. 2076 20772005-08-10 Ulrich Drepper <drepper@redhat.com> 2078 2079 * dwarf_getsrclines.c (dwarf_getsrclines): Correct fallout of renaming 2080 of DW_LNS_set_epilog_begin. 2081 20822005-08-09 Roland McGrath <roland@redhat.com> 2083 2084 * dwarf.h (DW_LNS_set_epilog_begin): Renamed DW_LNS_set_epilogue_begin. 2085 2086 * dwarf_end.c: Add INTDEF. 2087 * dwarf_error.c (dwarf_errmsg): Likewise. 2088 * libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs. 2089 20902005-08-01 Roland McGrath <roland@redhat.com> 2091 2092 * dwarf_getaranges.c (dwarf_getaranges): Check for bogus offset. 2093 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise. 2094 20952005-07-28 Ulrich Drepper <drepper@redhat.com> 2096 2097 * Makefile.am (libdw.so): No need to link with libeu.a anymore. 2098 (libdw_a_LIBADD): Add all files from libdwfl.a. 2099 21002005-07-27 Roland McGrath <roland@redhat.com> 2101 2102 * Makefile.am (libdw.so): Link ../libdwfl/libdwfl_pic.a in, 2103 along with ../libebl/libebl.a and ../lib/libeu.a; 2104 depend on ../libelf/libelf.so. 2105 (libdw_so_LDADD): New variable. 2106 * libdw.map: Add dwfl_* symbols formerly in ../libdwfl/libdwfl.map. 2107 2108 * libdw.map: Define an empty base version and move all symbols to 2109 version ELFUTILS_0.111; don't define ELFUTILS_1.0 at all yet. 2110 21112005-07-23 Ulrich Drepper <drepper@redhat.com> 2112 2113 * dwarf_error.c: Add internal alias for dwarf_errno. 2114 * libdwP.h: Declare __dwarf_errno_internal. 2115 * dwarf_getloclist.c: Use INTDEF for dwarf_errno. 2116 2117 * dwarf_error.c [USE_TLS]: Actually use __thread in definition of 2118 global_error. 2119 21202005-06-01 Roland McGrath <roland@redhat.com> 2121 2122 * dwarf_getaranges.c (dwarf_getaranges): Sort result array. 2123 * dwarf_getarange_addr.c (dwarf_getarange_addr): Use binary search. 2124 21252005-06-08 Roland McGrath <roland@redhat.com> 2126 2127 * memory-access.h (get_uleb128_step, get_uleb128): Remove casts. 2128 (get_sleb128_step, get_sleb128): Likewise. 2129 * dwarf_getattrs.c (dwarf_getattrs): Add consts. 2130 * dwarf_getloclist.c (getloclist): Likewise. 2131 * dwarf_formblock.c (dwarf_formblock): Likewise. 2132 * dwarf_getsrclines.c (dwarf_getsrclines): Likewise. 2133 * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise. 2134 * dwarf_formref.c (dwarf_formref): Likewise. 2135 * dwarf_formsdata.c (dwarf_formsdata): Likewise. 2136 * dwarf_formudata.c (dwarf_formudata): Likewise. 2137 * dwarf_haschildren.c (dwarf_haschildren): Likewise. 2138 * dwarf_child.c (__libdw_find_attr, __libdw_find_attr): Likewise. 2139 * dwarf_tag.c (dwarf_tag): Likewise. 2140 * dwarf_getabbrev.c (__libdw_getabbrev): Likewise. 2141 * memory-access.c (__libdw_get_uleb128, __libdw_get_sleb128): Likewise. 2142 * libdw_form.c (__libdw_form_val_len): Likewise. 2143 * libdwP.h: Update decl. 2144 21452005-06-04 Roland McGrath <roland@redhat.com> 2146 2147 * memory-access.h (get_uleb128_rest_return): New macro. 2148 [! IS_LIBDW] (__libdw_get_uleb128): New static, defined using it. 2149 (get_sleb128_rest_return): New macro. 2150 [! IS_LIBDW] (__libdw_get_sleb128): New static, defined using it. 2151 * memory-access.c: New file. 2152 * Makefile.am (libdw_a_SOURCES): Add it. 2153 (DEFS): Add -DIS_LIBDW. 2154 21552005-05-31 Roland McGrath <roland@redhat.com> 2156 2157 * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to 2158 formref offset. 2159 21602005-05-30 Roland McGrath <roland@redhat.com> 2161 2162 * dwarf_getloclist.c (dwarf_addrloclists): Use DW_AT_entry_pc for base 2163 address if DW_AT_low_pc is missing. Not to spec, but GCC generates it. 2164 2165 * dwarf_getloclist.c (dwarf_addrloclists): Don't sign-extend 4-byte 2166 BEGIN value. Instead, match base address entries separately for 2167 32/64 size cases. 2168 21692005-05-28 Roland McGrath <roland@redhat.com> 2170 2171 * dwarf_getloclist.c (dwarf_addrloclists): Fix decoding to advance 2172 past location expression contents. 2173 21742005-05-23 Roland McGrath <roland@redhat.com> 2175 2176 * dwarf_getsrclines.c: Comment typo fix. 2177 2178 * dwarf_haspc.c (dwarf_haspc): Fix CU DIE address calculation. 2179 * dwarf_getloclist.c (dwarf_addrloclists): Likewise. 2180 21812005-05-22 Ulrich Drepper <drepper@redhat.com> 2182 2183 * libdwP.h: Only use INTDECL for alias prototypes. 2184 21852005-05-19 Roland McGrath <roland@redhat.com> 2186 2187 * dwarf_getloclist.c (attr_ok): Permit DW_AT_static_link too. 2188 2189 * dwarf_getscopevar.c: New file. 2190 * Makefile.am (libdw_a_SOURCES): Add it. 2191 * libdw.h: Declare dwarf_getscopevar. 2192 2193 * dwarf_getsrcfiles.c: Add INTDEF. 2194 * dwarf_haschildren.c: Likewise. 2195 * libdwP.h (dwarf_getsrcfiles, dwarf_haschildren): Add INTDECL. 2196 2197 * dwarf_getscopes.c: New file. 2198 * Makefile.am (libdw_a_SOURCES): Add it. 2199 * libdw.h: Declare dwarf_getscopes. 2200 * libdw.map: Add it. 2201 22022005-05-18 Roland McGrath <roland@redhat.com> 2203 2204 * libdwP.h (IDX_debug_ranges): New enum constant. 2205 * dwarf_begin_elf.c (dwarf_scnnames): Add it for ".debug_ranges". 2206 * libdwP.h (DWARF_E_NO_DEBUG_RANGES): New enum constant. 2207 * dwarf_error.c (errmsgs): Add it. 2208 * dwarf_haspc.c: New file. 2209 * libdw.h: Declare dwarf_haspc. 2210 * libdw.map: Add it. 2211 * libdwP.h: Add INTDECL. 2212 2213 * dwarf_attr_integrate.c: New file. 2214 * dwarf_hasattr_integrate.c: New file. 2215 * Makefile.am (libdw_a_SOURCES): Add them. 2216 * libdw.h: Declare dwarf_attr_integrate, dwarf_hasattr_integrate. 2217 * libdw.map: Add them. 2218 2219 * dwarf_hasattr.c: Add INTDEF. 2220 * libdwP.h: Add INTDECL for it. 2221 2222 * dwarf_formref_die.c: New file. 2223 * Makefile.am (libdw_a_SOURCES): Add it. 2224 * libdw.h (dwarf_formref_die): Declare it. 2225 * libdwP.h (dwarf_formref_die): Add INTDECL. 2226 * libdw.map: Add it. 2227 2228 * dwarf_getloclist.c (attr_ok, getloclist): New functions, broken out 2229 of ... 2230 (dwarf_getloclist): ... here. Call them. 2231 (dwarf_addrloclists): New function. 2232 * libdw.h: Declare it. 2233 * libdw.map: Add it. 2234 2235 * dwarf_getmacros.c (dwarf_getmacros): Don't bail at 2236 DW_MACINFO_end_file. Recognize type 0 as terminator. 2237 22382005-05-05 Roland McGrath <roland@redhat.com> 2239 2240 * dwarf_getsrc_die.c (dwarf_getsrc_die): Use binary search. 2241 2242 * dwarf_getsrclines.c (dwarf_getsrclines): Sort result array, since 2243 the line program does not produce all entries in ascending order. 2244 22452005-04-25 Ulrich Drepper <drepper@redhat.com> 2246 2247 * dwarf_getsrc_file.c (dwarf_getsrc_file): Handle multiple 2248 occurences (e.g., inlines) better. 2249 22502005-04-24 Ulrich Drepper <drepper@redhat.com> 2251 2252 * libdw.h (DWARF_END_ABBREV): Define. 2253 * dwarf_getabbrev.c (__libdw_getabbrev): Return DWARF_END_ABBREV if 2254 end is reached. 2255 * dwarf_offabbrev.c (dwarf_offabbrev): Return -1 on error, 1 if end 2256 of records reached. 2257 * dwarf_tag.c (__libdw_findabbrev): Also recognize DWARF_END_ABBREV 2258 as error of __libdw_getabbrev. 2259 22602005-04-04 Ulrich Drepper <drepper@redhat.com> 2261 2262 * dwarf_getsrc_file.c (dwarf_getsrc_file): Minor optimization. 2263 2264 * dwarf_getsrc_file.c (dwarf_getsrc_file): Always pass number of 2265 results back to caller. 2266 22672005-04-04 Roland McGrath <roland@redhat.com> 2268 2269 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use size_t for CUHL. 2270 2271 * dwarf_func_line.c (__libdw_func_intval): Use internal_function in 2272 defn. 2273 22742005-04-04 Ulrich Drepper <drepper@redhat.com> 2275 2276 * dwarf_getsrc_file.c (dwarf_getsrc_file): Use INTUSE. 2277 2278 * dwarf_getsrc_file.c: New file. 2279 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrc_file.c. 2280 * libdw.h: Declare dwarf_getsrc_file. 2281 * libdw.map: Add dwarf_getsrc_file. 2282 22832005-04-02 Ulrich Drepper <drepper@redhat.com> 2284 2285 * dwarf_func_entrypc.c: New file. 2286 * dwarf_func_col.c: New file. 2287 * dwarf_func_line.c: New file. 2288 * dwarf_func_file.c: New file. 2289 * libdw.h: Add prototypes for new functions. 2290 * libdw.map: Add dwarf_func_entrypc, dwarf_func_col, dwarf_func_line, 2291 dwarf_func_file. 2292 * Makefile.am (libdw_a_SOURCES): Add dwarf_func_entrypc.c, 2293 dwarf_func_col.c, dwarf_func_line.c, dwarf_func_file.c. 2294 * libdwP.h (struct Dwarf_Func_s): Add cudie element. 2295 Declare __libdw_func_intval and __dwarf_formsdata_internal. 2296 * dwarf_getfuncs.c: Also fill in cudie in Dwarf_Func object. 2297 * dwarf_formsdata.c: Use INTUSE and INTDEF to avoid PLTs. 2298 2299 * dwarf.h: Add some DWARF3 definitions. 2300 23012005-04-01 Ulrich Drepper <drepper@redhat.com> 2302 2303 * dwarf_getfuncs.c: New file. 2304 * dwarf_func_highpc.c: New file. 2305 * dwarf_func_lowpc.c: New file. 2306 * dwarf_func_name.c: New file. 2307 * Makefile.am (libdw_a_SOURCES): Add dwarf_getfuncs.c, 2308 dwarf_func_highpc.c, dwarf_func_lowpc.c, and dwarf_func_name.c. 2309 * libdw.map: Add dwarf_getfuncs, dwarf_func_highpc, dwarf_func_lowpc, 2310 and dwarf_func_name. 2311 * libdw.h: Add prototypes for new functions. 2312 * dwarf_child.c: Use INTUSE and INTDEF to avoid PLTs. 2313 * dwarf_siblingof.c: Likewise. 2314 * dwarf_dieoffset.c: Likewise. 2315 * dwarf_highpc.c: Likewise. 2316 * dwarf_lowpc.c: Likewise. 2317 * libdwP.h: Add prototypes for internal functions. 2318 Define Dwarf_Func_s structure. 2319 23202005-03-29 Ulrich Drepper <drepper@redhat.com> 2321 2322 * libdw.h: Add padding in Dwarf_die. 2323 2324 * dwarf_arrayorder.c: Use INTUSE and INTDEF to avoid PLTs. 2325 * dwarf_attr.c: Likewise. 2326 * dwarf_begin.c: Likewise. 2327 * dwarf_begin_elf.c: Likewise. 2328 * dwarf_bitoffset.c: Likewise. 2329 * dwarf_bitsize.c: Likewise. 2330 * dwarf_bytesize.c: Likewise. 2331 * dwarf_diename.c: Likewise. 2332 * dwarf_formaddr.c: Likewise. 2333 * dwarf_formblock.c: Likewise. 2334 * dwarf_formref.c: Likewise. 2335 * dwarf_formstring.c: Likewise. 2336 * dwarf_formudata.c: Likewise. 2337 * dwarf_getarange_addr.c: Likewise. 2338 * dwarf_getarangeinfo.c: Likewise. 2339 * dwarf_getaranges.c: Likewise. 2340 * dwarf_getloclist.c: Likewise. 2341 * dwarf_getmacros.c: Likewise. 2342 * dwarf_getsrc_die.c: Likewise. 2343 * dwarf_getsrcfiles.c: Likewise. 2344 * dwarf_getsrclines.c: Likewise. 2345 * dwarf_highpc.c: Likewise. 2346 * dwarf_lowpc.c: Likewise. 2347 * dwarf_nextcu.c: Likewise. 2348 * dwarf_offdie.c: Likewise. 2349 * dwarf_siblingof.c: Likewise. 2350 * dwarf_srclang.c: Likewise. 2351 * dwarf_tag.c: Likewise. 2352 * libdw_findcu.c: Likewise. 2353 * libdwP.h: Add prototypes for internal functions. 2354 2355 * dwarf_addrdie.c: New file. 2356 * dwarf_macro_opcode.c: New file. 2357 * dwarf_macro_param1.c: New file. 2358 * dwarf_macro_param2.c: New file. 2359 * libdw.h: Add declarations. Move Dwarf_Macro definition to libdwP.h. 2360 * libdwP.h: Remove Dwarf_Macro definition. 2361 * Makefile.am (libdw_a_SOURCES): Add dwarf_addrdie.c, 2362 dwarf_macro_opcode.c, dwarf_macro_param1.c, and dwarf_macro_param2.c. 2363 * libdw.map: Add entries for new functions. 2364 23652005-03-21 Ulrich Drepper <drepper@redhat.com> 2366 2367 * libdw.h: Handle broken gcc < 4. 2368 23692005-02-15 Ulrich Drepper <drepper@redhat.com> 2370 2371 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. 2372 2373 * dwarf_begin_elf.c: Fix warnings. 2374 * dwarf_dieoffset.c: Likewise. 2375 * dwarf_end.c: Likewise. 2376 * dwarf_error.c: Likewise. 2377 * dwarf_getpubnames.c: Likewise. 2378 2379 * libdwP.h: Add new error values. 2380 * dwarf_error.c: Support new error values. 2381 * dwarf_getpubnames.c: Check parameter value. 2382 23832005-02-05 Ulrich Drepper <drepper@redhat.com> 2384 2385 * Makefile.am: Check for text relocations in constructed DSO. 2386 2387 * Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap. 2388 23892005-02-04 Ulrich Drepper <drepper@redhat.com> 2390 2391 * dwarf_siblingof.c (dwarf_siblingof): Add some buffer boundary 2392 checks to not read over buffer boundaries for ill-formed DWARF data. 2393 23942004-09-25 Ulrich Drepper <drepper@redhat.com> 2395 2396 * dwarf_child.c: Make compile with gcc 4.0. 2397 * dwarf_error.c: Likewise. 2398 * dwarf_formblock.c: Likewise. 2399 * dwarf_getabbrev.c: Likewise. 2400 * dwarf_getattrs.c: Likewise. 2401 * dwarf_getsrclines.c: Likewise. 2402 * dwarf_tag.c: Likewise. 2403 * libdw_form.c: Likewise. 2404 24052004-01-20 Ulrich Drepper <drepper@redhat.com> 2406 2407 * Makefile.am: Support building with mudflap. 2408 2409 * dwarf_getloclist.c: Fix warnings gcc 3.4 spits out. 2410 * dwarf_getsrclines.c: Likewise. 2411 * dwarf_memory-access.h: Likewise. 2412 24132004-01-19 Ulrich Drepper <drepper@redhat.com> 2414 2415 * dwarf_getsrcfiles.c: Third parameter can be NULL. 2416 2417 * libdw.h: Define Dwarf_macro. Declare dwarf_getmacros. 2418 Third parameter of dwarf_getsrcfiles can be NULL. 2419 2420 * libdw.map: Add dwarf_getmacros. 2421 * Makefile.am (libdw_a_SOURCES): Add dwarf_getmacros. 2422 * dwarf_getmacros.c: New file. 2423 24242004-01-18 Ulrich Drepper <drepper@redhat.com> 2425 2426 * libdw.h: Second parameter of dwarf_getaranges can be NULL. 2427 2428 * dwarf_nextcu.c: Return -1 if dwarf parameter is NULL. 2429 2430 * dwarf_getsrclines.c: 2431 Use read_2ubyte_unaligned_inc instead of _inc-less variant. 2432 2433 * dwarf_getaranges.c: Allow naranges parameter to be NULL. 2434 2435 * libdwP.h (_): Use elfutils domain. 2436 2437 * dwarf_getsrclines.c (dwarf_getsrclines): Add more branch prediction. 2438 2439 * dwarf_getsrclines.c: Fix typo in comment. 2440 24412004-01-17 Ulrich Drepper <drepper@redhat.com> 2442 2443 * Makefile.am: Support building with mudflap. 2444 24452004-01-16 Ulrich Drepper <drepper@redhat.com> 2446 2447 * memory-access.h: Add lots of const in case a pointer passed is const. 2448 2449 * dwarf_formflag.c: New file. 2450 * dwarf_getattrs.c: New file. 2451 * dwarf_error.c: Add new error value. 2452 * libdw.h: Add prototypes for new functions. Adjust prototype for 2453 dwarf_getpubnames. 2454 * libdw.map: Add new functions. 2455 * dwarf_getpubnames.c: Change type of return value and fourth parameter 2456 to ptrdiff_t. 2457 * libdwP.h: Add new error value. 2458 * Makefile.am (libdw_a_SOURCES): Add dwarf_getattrs.c and 2459 dwarf_formflag.c. 2460 2461 * dwarf_getpubnames.c (dwarf_getpubnames): Just fail if dbg is NULL. 2462 24632004-01-12 Ulrich Drepper <drepper@redhat.com> 2464 2465 * dwarf_getarange_addr.c: New file 2466 * dwarf_getarangeinfo.c: New file. 2467 * dwarf_getaranges.c: New file. 2468 * dwarf_onerange.c: New file. 2469 * libdw.h: Declare new functions. Define Dwarf_Arange and 2470 Dwarf_Aranges. 2471 * libdw.map: Add new functions. 2472 * libdwP.h: Add new errors. Add aranges member to struct Dwarf. 2473 Define Dwarf_Aranges_s and Dwarf_Arange_s. 2474 * Makefile.am (libdw_a_SOURCES): Add dwarf_getaranges.c, 2475 dwarf_onearange.c, dwarf_getarangeinfo.c, dwarf_getarange_addr.c. 2476 * dwarf_error.c: Add new message. 2477 24782004-01-11 Ulrich Drepper <drepper@redhat.com> 2479 2480 * Makefile.am (libdw_a_SOURCES): Add dwarf_lineaddr.c, dwarf_linecol.c, 2481 dwarf_linebeginstatement.c, dwarf_lineendsequence.c, dwarf_lineblock.c, 2482 dwarf_lineprologueend.c, dwarf_lineepiloguebegin.c, dwarf_onesrcline.c. 2483 * dwarf_error.c: Add another message. 2484 * dwarf_getsrc_die.c: Adjust for Dwarf_Files and Dwarf_Lines 2485 introduction. 2486 * dwarf_filesrc.c: Likewise. 2487 * dwarf_getsrcfiles.c: Likewise. 2488 * dwarf_getsrclines.c: Likewise. 2489 * dwarf_lineaddr.c: New file. 2490 * dwarf_linebeginstatement.c: New file. 2491 * dwarf_lineblock.c: New file. 2492 * dwarf_linecol.c: New file. 2493 * dwarf_lineendsequence.c: New file. 2494 * dwarf_lineepiloguebegin.c: New file. 2495 * dwarf_lineno.c: New file. 2496 * dwarf_lineprologueend.c: New file. 2497 * dwarf_onesrcline.c: New file. 2498 * dwarf_lineno.c: Change interface to store result in object pointed 2499 to by second parameter. 2500 * libdw.h: Add prototypes for new functions. Change dwarf_lineno 2501 prototype. Define Dwarf_Files and Dwarf_Lines. 2502 * libdw.map: Add new functions. 2503 * libdwP.h: Define Dwarf_Files_s and Dwarf_Lines_s. 2504 * libdw_findcu.c: Don't initialize nlines field. 2505 2506 * dwarf_siblingof: Little optimization. 2507 2508 * dwarf_begin.c: Remember that the ELF descriptor must be closed. 2509 * dwarf_end.c: Close ELF descriptor if free_elf is set. 2510 * libdwP.h (struct Dwarf): Add free_elf field. 2511 2512 * Makefile.am (libdw_a_SOURCES): Add dwarf_getstring.c and 2513 dwarf_offabbrev.c. 2514 * dwarf_getstring.c: New file. 2515 * dwarf_offabbrev.c: New file. 2516 * libdw.map: Add dwarf_getstring and dwarf_offabbrev. 2517 * dwarf_getabbrev.c (__libdw_getabbrev): Add new dbg and result 2518 parameters. Don't allocate memory if not necessary and don't lookup 2519 previous results if no CU given. 2520 (dwarf_getabbrev): Adjust call to __libdw_getabbrev. 2521 * dwarf_tag.c: Adjust call to __libdw_getabbrev. 2522 * libdw.h: Declare dwarf_offabbrev and dwarf_getstring. 2523 * libdwP.h: Change prototype for __libdw_getabbrev. 2524 2525 * dwarf_getabbrevattr.c: Add offsetp parameter. Fill in before 2526 returning if this is wanted. 2527 25282004-01-09 Ulrich Drepper <drepper@redhat.com> 2529 2530 * dwarf_nextcu.c: Add new parameter offset_sizep. Initialize it 2531 with offset_size value. 2532 * libdw.h: Adjust dwarf_nextcu prototype. 2533 * libdwP.h (struct Dwarf_CU): Add offset_size member. 2534 * libdw_findcu.c: Adjust dwarf_nextcu call. Initialize offset_size 2535 member of new CU struct. 2536 * dwarf_formstring.c: Depend on offset_size not address_size for 2537 DW_FORM_strp handling. 2538 * dwarf_form.c: Likewise for DW_FORM_strp and DW_FORM_ref_addr. 2539 2540 * dwarf_tag.c (__libdw_findabbrev): Return correct value for 2541 failing lookup. 2542 (dwarf_tag): Correctly recognize failed lookup. 2543 2544 * dwarf_end.c (cu_free): Call tdestroy for locs member. Use new 2545 function noop_free. 2546 * dwarf_error.c: Add message for DWARF_E_NO_BLOCK. 2547 * dwarf_formblock.c: New file. 2548 * dwarf_getloclist.c: Rewrite to handle a single block. 2549 * libdw.h: Define Dwarf_Block. Rename Dwarf_Loc members. Remove 2550 Dwarf_Locdesc definition. Declare dwarf_formblock. Remove 2551 dwarf_getloclistent declaration. 2552 * libdw.map: Add dwarf_formblock, remove dwarf_getloclistent. 2553 * libdwP.h: Define struct loc_s and DWARF_E_NO_BLOCK. 2554 Add locs member to struct Dwarf_CU. 2555 * libdw_fundcu.c: Initialize locs member of new CU. 2556 * Makefile.am (libdw_a_SOURCES): Add dwarf_formblock.c. 2557 Remove dwarf_getloclistent.c. 2558 25592004-01-07 Ulrich Drepper <drepper@redhat.com> 2560 2561 * libdw.h: Use __nonnull__ attribute only for gcc >= 3.3. 2562 * libdwP.h: Likewise. 2563 2564 * dwarf_getloclist.c: New file. 2565 * dwarf_getloclistent.c: New file. 2566 * libdw.h: Define Dwarf_Loc and Dwarf_Locdesc. 2567 Declare dwarf_getloclistent and dwarf_getloclist. 2568 * libdw.map: Add dwarf_getloclistent and dwarf_getloclist. 2569 * libdwP.h: Define DWARF_E_NO_LOCLIST. 2570 * Makefile.am (libdw_a_SOURCES): Add dwarf_getloclistent.c and 2571 dwarf_getloclist.c. 2572 2573 * dwarf_error.c: More error messages. 2574 25752004-01-06 Ulrich Drepper <drepper@redhat.com> 2576 2577 * dwarf_getsrclines.c: Remove debugging support. 2578 2579 * dwarf_getsrcfiles.c: New file. 2580 * dwarf_filesrc.c: New file. 2581 * libdw.h: Declare these functions. Define Dwarf_File. 2582 * libdwP.c: Adjust Dwarf_File_s definition. 2583 * libdw.map: Add these functions. 2584 * Makefile.am (libdw_a_SOURCES): Add dwarf_getsrcfiles.c and 2585 dwarf_filesrc.c. 2586 * dwarf_getsrclines.c: Initialize cu->files. 2587 25882004-01-05 Ulrich Drepper <drepper@redhat.com> 2589 2590 * libdw.h: Add more nonnull function attributes. 2591 2592 * dwarf_begin_elf.c (dwarf_begin_elf): Don't initialize mem_tail->next. 2593 * dwarf_end.c (cu_free): New function. 2594 (dwarf_end): Also free CU tree. Correct freeing of memory blocks. 2595 * dwarf_error.c (errmsgs): Add new messages. 2596 * dwarf_getsrc_die.c: New file. 2597 * dwarf_getsrclines.c: New file. 2598 * dwarf_lineno.c: New file. 2599 * dwarf_linesrc.c: New file. 2600 * dwarf_nextcu.c (dwarf_nextcu): Use read_*byte_unaligned_inc 2601 instead of the *_inc-less variants. 2602 * libdw.h: Define Dwarf_Line. Add some function attributes. Declare 2603 dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, and dwarf_linesrc. 2604 * libdw.map: Add dwarf_getsrclines, dwarf_getsrc_die, dwarf_lineno, 2605 and dwarf_linesrc. 2606 * libdwP.h: Add more error codes. 2607 (struct Dwarf): Remove mem_tail.next member. 2608 (Dwarf_File): Define type. 2609 (struct Dwarf_Line_s): Define type. 2610 (struct Dwarf_CU): Add lines and nlines members. 2611 (libdw_alloc): Define local variable _tail and use it. 2612 Add some function attributes. 2613 * libdw_alloc.c (__libdw_allocate): Don't initialize next member. 2614 * libdw_findcu.c (__libdw_findcu): Initialize lines and nlines members. 2615 * memory-access.h: Add unlikely for the endian conversion paths. 2616 * Makefile.am (AM_CFLAGS): Add -std parameter. 2617 (libdw_a_SOURCES): Add dwarf_getsrclines, dwarf_getsrc_die, 2618 dwarf_lineno, and dwarf_linesrc. 2619 26202003-08-11 Ulrich Drepper <drepper@redhat.com> 2621 2622 * Moved to CVS archive. 2623