1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747
|
2020-11-30 David Anderson
* libdwarf_version.h: updated version string
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h: regenerated with new version string.
2020-11-29 David Anderson
* dwarf_form.c: Correct comments on dwarf_formsig8_const()
* dwarf_query.c: Fix if( to if ( in some places.
Shorten some too-long lines. Implement the new function
dwarf_cu_header_basics().
* dwarf_opaque.h: Corrected a comment on one field.
* libdwarf.h.in: Prototype for dwarf_cu_header_basics()
added.
* generated_libdwarf.h.in: regenerated.
* libdwarf2.1.mm. Version 3.18. Added to the description
of dwarf_attr(), which was incomplete.
Documented dwarf_cu_header_basics().
* libdwarf.2.1.pdf: Regenerated 3.18
2020-11-25 David Anderson
* Makefile.in: Regenerated from configure.ac.
To support data needed for dwarfexample make check.
2020-11-25: David Anderson
* libdwarf_version.h: updated version string
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h: regenerated with new version string.
2020-11-23: David Anderson
* libdwarf_version.h: updated version string
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h: regenerated with new version string.
2020-11-21: David Anderson
* dwarf_frame.c: Improve a couple error messages with
additional detail.
Remove old #if0/endif around macros no longer used.
* dwarf_frame2.c: Improve some error messages with
additional detail.
2020-11-15: David Anderson
* dwarf_locationop_read.c: Comments corrected.
2020-11-15: David Anderson
* libdwarf.h.in: Cooment for dwarf_get_die_infotypes_flag()
corrected.
* generated_libdwarf.h.in: Regenerated
2020-11-12: David Anderson
* libdwarf.h.in: Altering too-long lines
and poor indenting.
* generated_libdwarf.h.in: Regenerated.
2020-11-12: David Anderson
* CMakeLists.txt, Makefile.am: new file to
and code to put into releases to help
some cmake users.
2020-11-10: David Anderson
* Correctly dealing with SHF_COMPRESSED when
we are reading the object using libelf.
Was a surprise to learn libelf translates
the endianness of the little header in
SHF_COMPRESSED.
* dwarf_original_elf_init.c: Set de_using_libelf = TRUE.
* dwarfstring.c: Fix some if( to match libdwarf
coding standard.
2020-11-10: David Anderson
* dwarf_opaque.h: Fixing indents, trailing
whitespace, and too-long lines.
Adding field de_using_libelf (helpful
when using libelf and there is SHF_COMPRESSED elf)
2020-11-10: David Anderson
* dwarf_vars.c: Shortening too-long line.
2020-11-09: David Anderson
* dwarf_harmless.c,dwarf_machoread.c: Modified slightly
to match libdwarf coding style.
2020-11-09: David Anderson
* libdwarf_version.h: updated version string
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h: regenerated with new version string.
2020-11-08: David Anderson
* dwarf_abbrev.c: Shorten a pointlessly long line.
* libdwarf2.1.mm: Rev 3.17. Remove many accidental
tab characters and fix indents of the function
prototypes. Broke up some pointlessly
long lines.
* libdwarf2.1.pdf: Regenerated as 3.17
2020-11-04: David Anderson
* dwarf_crc32.c,dwarf_debuglink.c,dwarf_elf_access.c,
dwarf_elf_load_headers.c,dwarf_elfread.c,dwarf_error.c,
dwarf_frame2.c,dwarf_generic_init.c,dwarf_init_finish.c,
dwarf_loclists.c,dwarf_machoread.c,dwarf_object_detector.c,
dwarf_object_read_common.c,dwarf_original_elf_init.c,
dwarf_peread.c,dwarf_print_lines.c,dwarf_ranges.c,
dwarf_rnglists.c,dwarf_util.c,dwarfstring.c,dwgetopt.c,
gennames.c,pro_arange.c,pro_debug_sup.c,pro_die.c,
pro_dnames.c,pro_encode_nm.c,pro_error.c,pro_forms.c,
pro_frame.c,pro_funcs.c,pro_init.c,pro_line.c: These
had instances of includes not protected by, for
example, #ifdef HAVE_STRING_H. All fixed to be
consistent with all the HAVE*H config.h has.
2020-11-04: David Anderson
* dwarf_frame2.c: Remove useless/misleading comments.
Quite a few lines were longer than the libdwarf
standard line length. Many of them comments.
All now (aside from two copyright lines) have proper
length.
2020-11-03: David Anderson
* libdwarf_version.h: updated version string
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h: regenerated with new version string.
2020-11-03: David Anderson
* dwarf_macro.c: shortened a pointlessly long line.
2020-11-03: David Anderson
* dwarf_macro5.c: Fixed a test which was a dreadful
assignment instead of being the correct test.
Otherwise just changing a comment and arranging
if (... instead of if(, similarly for for(.
2020-11-01: David Anderson
* dwarf_line.c: Corrected the comments for dwarf_srcfiles().
* dwarf_print_lines.c: When turning a DW_LNS file to
a name, do it correctly.
* libdwarf2.1.mm: Rev 3.16. Document dwarf_srclines()
more fully and correctly. Refer to dwarfstd.org
for more information on DWARF file numbers.
dwarf_srcfileno() is also more fully
and more correctly described. DWARF5 differs.
* libdwarf2.1.pdf: Rev 3.16. Regenerated.
2020-10-31: David Anderson
* dwarf_line.h: Removed a FIXME comment that no longer applies.
* dwarf_die_deliv.c: Now compares and reports
signature variance when
the DWARF4 GNU extension DW_AT_[GNU_]dwo_id used
with DWARF4 extension split dwarf.
* dwarf_errmsg_list.h: Adds DW_DLE_SIGNATURE_MISMATCH.
* dwarf_line.h: Deleted three obsolete comment lines.
* libdwarf.h.in: Added DW_DLE_SIGNATURE_MISMATCH.
* generated_libdwarf.h.in: Regenerated.
2020-10-29: David Anderson
* dwarf_generic_init.c: Remove trailing whitepace.
* dwarf_crc32.c: Added initializer to conform
to libdwarf practices.
2020-10-29: David Anderson
* dwarfstring.c: Dealing with impossible things by
reporting ERROR plus descriptive information in the string.
* test_dwarfstring.c: Now tests all the various
impossible things for correct ERROR message content.
2020-10-29: David Anderson
* libdwarf_version.h: updated version string
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h: regenerated with new version string.
2020-10-29: David Anderson
* dwarf_print_lines.c: Fixed an old mistake passing
%d into dwarfstrling_append_printf_u (the value
in question is unsigned).
* dwarfstring.c: If a caller passes in something bogus
dwarfstring now adds specifics with "ERROR:"
to the output dwarfstring as well as returning FALSE.
2020-10-28: David Anderson
* dwarf_print_lines.c: In case of corrupted
DWARF5 line header the fi_file_name field
for a file entry can be null. Now
we print a <no file name> string in that case
to avoid passing a null to dwarfstring_append.
Dwarfbug DW202010-003.
Also some lines longer than libdwarf standard
were shortened, but a few long lines really
must remain.
2020-10-28: David Anderson
* dwarf_ranges.c: Altered lines longer than libdwarf
standard.
2020-10-27: David Anderson
* dwarf_generic_init.c: Now checks for a null PATH
passed to dwarf_init_path() or dwarf_init_path_dl()
and returns error.
2020-10-20: David Anderson
* libdwarf_version.h: updated version string
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h: regenerated with new version string.
* crc32.c: Computing from first principles. LGPL 2.1
2020-10-19: David Anderson
* dwarf_line_table_reader_common.h: Everywhere ptr - ptr
generates an unnamed ptrdiff_t is called out by
a short comment.
2020-10-19: David Anderson
* crc32.c,dwarf_debuglink.c,dwarf_die_deliv.c,dwarf_line.c,
dwarf_line.h,dwarf_line_table_reader_common.h,dwarf_query.c,
dwarf_str_offsets.c: Fixed indents and removed
trailing whitespace.
2020-10-19: David Anderson
* crc32.c: Revised line lengths to under
20 characters for a better appearance.
No change in wording.
* pro_frame.c,pro_funcs.c: Removed a blank line
before the copyright text for a better appearance.
2020-10-19: David Anderson
* dwarf_arange.h,dwarf_base_types.h,dwarf_die_deliv.h,
dwarf_dsc.h,dwarf_elf_access.h,dwarf_errmsg_list.h,
dwarf_error.h,dwarf_frame.h,dwarf_funcs.h,dwarf_gdbindex.h,
dwarf_global.h,dwarf_harmless.h,dwarf_line.h,dwarf_macro.h,
dwarf_macro5.h,dwarf_reloc_386.h,dwarf_reloc_arm.h,
dwarf_reloc_mips.h,dwarf_reloc_ppc.h,dwarf_reloc_ppc64.h,
dwarf_reloc_x86_64.h,dwarf_tied_decls.h,dwarf_types.h,
dwarf_util.h,dwarf_vars.h,dwarf_weaks.h,dwarf_xu_index.h,
libdwarfdefs.h,malloc_check.h,pro_alloc.h,pro_arange.h,
pro_die.h,pro_encode_nm.h,pro_error.h,pro_expr.h,
pro_frame.h,pro_incl.h,pro_macinfo.h,pro_reloc.h,
pro_reloc_stream.h,pro_reloc_symbolic.h,pro_section.h,
pro_types.h,pro_util.h: License text reformatted
to fit libdwarf line lengths. No change in terms.
2020-10-19: David Anderson
* dwarf_debuglink.c,dwarf_die_deliv.c,dwarf_query.c,
dwarf_str_offsets.c,dwarf_util.c: These no longer
explicitly use ptrdiff_t. Only non-negative pointer
differences are converted to unsigned. The other
side of a compare is given an appropriate constant unsigned
value that will cause an immediate error (this side
represents an astonishing and impossible situation).
* crc32.c,dwarf_alloc.c,dwarf_crc32.c,dwarf_debuglink.c,
dwarf_die_deliv.c,dwarf_elf_access.c,dwarf_elf_load_headers.c,
dwarf_elfread.c,dwarf_error.c dwarf_generic_init.c,
dwarf_init_finish.c,dwarf_machoread.c,dwarf_object_detector.c,
dwarf_object_read_common.c,dwarf_original_elf_init.c,
dwarf_peread.c,dwarf_query.c,dwarf_str_offsets.c,
dwarf_util.c,pro_error.c,test_linkedtopath.c: Consistent
use of HAVE_SYS_STATS_H throughout.
2020-10-17: David Anderson
* libdwarf_version.h: updated version string
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h: regenerated with new version string.
2020-10-15: David Anderson
* dwarf_line.c:Set up the default registers correctly
for DWARF5 as well as earlier versions.
* dwarf_line.h: update a comment.
* dwarf_line_table_reader_common.c: Using ptrdiff_t
is completely unnecessary. So not using now.
Removing with #if 0 some lines of checking code
which are now up a few lines in a corrected
version of earlier checking.
* libdwarf2.1.pdf: Regenerated 3.15. Forgot
to do it earlier.
2020-10-13: David Anderson
* dwarf_debuglink.c: Now _dwarf_pathjoinl works
for Windows too (see HAVE_WINDOWS_PATH) and
transforms all backslash to /. This
has always been the behavior, it just vanished
for a couple days.
* dwarf_line_table_reader_common.h: Removed a trailing blank.
* dwarf_macro5.c: Now correctly handles the null byte
at the end of a list of macro operands. Added
macro CHECKNULLCONTEXT to avoid lots of 8 line
sequences just checking basic call sanity.
Gave the structure sentinal a name: MC_SENTINAL
(only exists in this one source file).
* dwarf_macro5.h: Added mc_section_size so offset
insanity is caught. Added comments about
Dwarf_Macro_Operator_s for clarity.
* libdwarf.h;.in: Added comment on the DWARF 5
macro operands table.
* libdwarf2.1.mm: Rev 3.15 Added a comment in examplep5
on dwarf_get_macro_op() about the DWARF5
macro operator value 0, and
amplified the function wording on this point..
* libdwarf2.1.pdf: Rev 3.15. Regenerated.
.
2020-10-12: David Anderson
* dwarf_alloc.c: Creation of Dwarf_Error_ with
null dbg is now gracefully handled.
* dwarf_debuglink.c: Now handles
HAVE_WINDOWS_PATH. Needed additional #include
and create_fullest_file_path() now uses dwarfstsring.
* dwarf_line.h: Trailing whitespace.
* dwarf_line_table_reader_common.h: Shorten a couple lines
to fit libdwarf standards.
* dwarf_object_detector.c: Free debuglinkfull path
where appropriate. Ensure fd's (other than -1)
get closed where appropriate.
* dwarf_object_detector.h: Removed #if 0 lines.
* dwarf_peread.c: Assures fd which is not -1
gets closed.
* dwarf_print_lines.c: Now uses
dwarfstring_constructor_static() so in nearly all
cases no malloc/free needed. Adds DWARF5
specific support for indexing into includes.
* libdwarf.h.in: Corrected comments about what to
free after calling dwarf_gnu_debuglink().
* generated_libdwarf.h.in: regenerated.
* libdwarf2.1.mm: Version 3.14. Correctet
description of dwarf_gnu_debuglink().
* libdwarf2.1.pdf: Version 3.14. Regenerated.
* testdebuglinksh: Remove trailing whitespace.
2020-10-11: David Anderson
* dwarf_object_detector.h: Deleted #if 0 prototype.
* testdebuglink.sh: Removed a trailing blank.
2020-10-11: David Anderson
* libdwarf_version.h: updated version string
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h: regenerated with new version string.
2020-10-11: David Anderson
* CMakeLists.txt: Added crc32.c, a new source file.
* Makefile.am: Same addition.
* Makefile.in: Regenerated.
* crc32.c: The crc needed to interoperate with GNU
debuglink.
* dwarf_alloc.c: Clarifying comment and removing
old unnecessary () around return values.
* dwarf_crc32.c: Removing crc from here, it was
the wrong crc32! Modified crc calls to match
the needs of the correct crc calculation. Ensured
a local malloc always gets freed.
* dwarf_debuglink.c: Added short comments.
* dwarf_errmsg_list.h: New error DW_DLE_DEBUGLINK_PATH_SHORT.
* dwarf_generic_init.c.: Updated to work properly
with debuglink and dSYM.
* dwarf_incl.h: Reformatted copyright for shorter
lines per libdwarf formatting, no change in content.
* dwarf_init_finish.c: Added comment. Removed
a pointless test for error (error not
not set, guaranteed) in dwarf_object_finish().
* dwarf_object_detector.c: Implemented support
for debuglink, significant changes involved.
* dwarf_object_detector.h: Comment change
* dwarf_opaque.h: Updated a comment and
declared the internal function _dwarf_crc32();
* libdwarf.h.in: Functions added for debuglink
and a mistake corrected (now comment the arg names
to avoid macro disaster) in several functions.
New error DW_DLE_DEBUGLINK_PATH_SHORT.
New function dwarf_object_detector_path_b()
lets one supply global paths for debuglink and
get back a (new!) value, one of
DW_PATHSOURCE_basic, DW_PATHSOURCE_dsym,or
DW_PATHSOURCE_debuglink so callers know what
the path source by type.
* generated_libdwarf.h.in: Regenerated.
* libdwarf2.1.mm: Clarified lifetimes of several
arguments of debuglink-related functions. Revision 3.13.
* libdwarf2.1.pdf: Regenerated, version 3.13.
2020-10-05: David Anderson
* libdwarf.h.in: Removed DW_DLC_NO_FOLLOW_DEBUGLINK
as it is never needed and was never used or
documented (it's only been there for a handful
of days). Updated commentary.
* generated_libdwar.h.in: Regenerated.
* libdwarf2.1.mm: Rev 3.12. Beginning documentation
of GNU debuglink support.
* libdwarf2.1.pdf: Regenerated as 3.12.
2020-10-02: David Anderson
* dwarf_crc32.c,dwarf_fission_to_cu.c,dwarf_macro5.c,
dwarf_opaque.h,libdwarf.h.in,test_linkedtopath.c,
test_linkedtopath.c: Removed whitespace and
tabs and make indents dwarf-standard.
* COPYING: Corrected the references to the BSD copyright
to use "two-clause BSD license".
2020-10-02: David Anderson
* dwarf_generic_init.c: Implements the new
dwarf_init_path_dl() which allows passing debuglink
global paths (if one desires to). Global paths not
used here yet.
* libdwarf.h.in: Added prototype dwarf_init_path_dl()
but it is not yet used. Relevant commentary updated.
* generated_libdwarf.h.in: regenerated
2020-10-01: David Anderson
* libdwarf2.1.mm: Revision 3.11. Added new debuglink
function dwarf_crc32().
* libdwarf2.1.pdf: Revision 3.11. Regenerated.
2020-10-01: David Anderson
* dwarf_crc32.c: Refined the #includes so they work
with cmake too.
* dwarf_debuglink.c,dwarf_object_detector.c,
dwarf_peread.c: Refined the #includes to work
in more general circumstances.
2020-10-01: David Anderson
* libdwarf.h.in: Added DW_DLC_NO_FOLLOW_DEBUGLINK
but it is not yet used.
* generated_libdwarf.h.in: regenerated
2020-09-30: David Anderson
* CMakeLists.txt,Makefile.am: Added dwarf_crc32.c
* Makefile.am: Regenerated.
* dwarf_crc32.c: So libdwarf can interoperate with GNU
debuglink to locate separate debug object files.
* dwarf_debuglink.c: Added {} one place. No real change.
* libdwarf.h.in: New interfaces for crc32.
* generated_libdwarf.h.in: Regenerated
2020-09-28: David Anderson
* libdwarf.h.in: Rearranged the DW_DLC_* values
for clarity and added commentary on the main
point (the 'access' argument to dwarf init
functions for the consumer/reader calls
should be zero). This is not a change.
* generated_libdwarf.h.in: Documented
the longstanding handling of that same
argument to consumer/reader functions.
* libdwarf2.1.mm: Version 3.10. Documenting
that same thing.
* libdwarf2.1.pdf: Regenerated as version 3.10.
2020-09-26: David Anderson
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h,libdwarf_version.h: Updated version
string, regenerated files that reference it.
2020-09-26: David Anderson
* baseline.ltp: new test baseline for debuglink.
* test_linkedtopath.c: Now with better coverage
of the paths in tbe debuglink code, we
add a getcwd here to return a test cwd
of /exam/ple so the output of debuglink
does not depend on the real build
directory location.
2020-09-25: David Anderson
* dwarf_debuglink.c: Corrected and clarified.
2020-09-22: David Anderson
* CMakeLists.txt, Makefile.am: Added new file
dwarf_fission_to_cu.c.
* Makefile.in: Regenerated.
* dwarf_die_deliv.c: Renamed _dwarf_find_offsets_via_fission
to be _dwarf_find_all_offsets_via_fission().
Added status check following the call to it.
* dwarf_fission_to_cu.c: Now the above function
and supporting functions are in this source file to
deal with DW_SECT_LOCLISTS,DW_SECT_STR_OFFSETS,
DW_SECT_MACRO, DW_SECT_RNGLISTS.
* dwarf_loc.h: Updated prototypes for these
functions.
* dwarf_loclists.h: Now deleted. It's long been
unused.
* dwarf_loclists.c: Renamed internal_read_header as
_dwarf_internal_read_loclists_header for more general
access.
* dwarf_macro5.c: Now the cu-context cc_macro_base
field is used when needed for DWP files.
* dwarf_opaque.h: Rearranged some fields of
Dwarf_CU_Context
into more logical groupings (related to debug fission).
* dwarf_rnglists.c: renamed internal_read_header
to _dwarf_internal_read_rnglists_header().
* dwarf_rnglists.h: Added protype for
_dwarf_internal_read_rnglists_header().
* dwarf_str_offsets.c: Removed
_dwarf_find_offsets_via_fission
(which does more than just str_offsets now)
and put into dwarf_fission_to_cu.c as
_dwarf_find_all_offsets_via_fission().
* dwarf_str_offsets.h: Prototype renamed.
* libdwarf.h.in: Added a comment.
* generated_libdwarf.h.in: Regenerated.
2020-09-18: David Anderson
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h,libdwarf_version.h: Updated version
string, regenerated files that reference it.
2020-09-18: David Anderson
* dwarf_debug_names.c: If allocation fails in setting up
a Dwarf_Dnames head we now get an error and a more tailored
error than just memory-allocation-failed.
* dwarf_elf_load_headers.c: If the symtab section size
is really big (larger than the object file size!) we now
get a relevant error message. Used to get malloc fail on
32bit systems and do a large malloc on 64bit systems before
getting an error eventually.
* dwarf_frame.c: Calling the frame-retrieval functions
on a corrupted object file could result in leaking memory.
Fixed.
2020-09-17: David Anderson
* dwarf_peread.c: Deleted several blank lines.
* dwarf_global.c: Removed trailing whitespace,
fixed indents.
* dwarf_errmsg_list.h: Various error strings now
have extra text with meaningful, but generic,
content.
2020-09-17: David Anderson
* dwarf_global.c: Refactored to eliminate 50 lines
of duplicated code and ensure no leaks while
improving error messages when the object or DWARF
data is damaged (fuzzed).
* dwarf_global.h,dwarf_funcs.c,dwarf_pubtypes.c,
dwarf_types.c,dwarf_vars.c,dwarf_weaks.c: Eliminated
useless arguments to library-internal function.
* dwarf_util.h: Errors detected in a macro now
report more useful information.
* dwarf_alloc.c: Two DEBUG lines were too long,
broke those lines to shorter ones.
Added DEBUG-only output where it had not
reported earler.
2020-09-15: David Anderson
* dwarf_alloc.c: Added ifdef DEBUG
printf for cases it should exist.
#undef debug at the top guaranties it will not
be turned on by accident.
* dwarf_loc.c(_dwarf_read_loc_section): Was missing dbg
in a call to _dwarf_error. Corrupt object lead to leak.
* dwarf_die_deliv.c(_dwarf_make_CU_Context) was missing
a _dwarf_error call where one was required.
A corrupt object lead to memory leak.
And _dwarf_next_die_info_ptr was failing to
initialize dbg from the passed in cu_context.
Also causing a memory leak on some corrupt objects.
* dwarf_peread.c(pe_section_name_get): Was failing
to check for a valid null-terminated
string in the string table.
A corrupted object could cause segmentation violation.
* dwarf_error.c (_dwarf_error_string): Added ifdef DEBUG
printf where they should have been all along.
#undef debug at the top guaranties it will not
be turned on by accident.
2020-09-10: David Anderson
* dwarf_die_deliv.c: Now handle DW_AT_GNU_ranges_base
properly.
* dwarf_ranges.c: New function dwarf_get_ranges_b()
so we can pass back the true split-dwarf offset
when we have DWARF4 split-dwarf extension objects.
And we calculate that true offset.
* libdwarf.h.in: New function prototype:
dwarf_get_ranges_b().
* generated_libdwarf.h.in: Regenerated.
* libdwarf2.1.mm: Version 3.09. Now documents
dwarf_get_ranges_b().
* libdwarf2.1.pdf: Version 3.09. Regenerated.
2020-09-10: David Anderson
* checkexamples.c,dwarf_die_deliv.c,dwarf_form.c,
dwarf_line_table_reader_common.h,dwarf_query.c,
dwarf_ranges.c,dwarf_str_offset.c,dwarf_tied.c:
Remove trailing whitespace. Fix indentation.
2020-09-09: David Anderson
* dwarf_alloc.c: dwarf_dealloc_error(dbg,error)
and dwarf_dealloc(dbg,error,DW_DLA_ERROR)
should now be called with a null dbg if
the failing libdwarf was one of the dwarf_init*()
or dwarf_elf_init*() functions and the storage
in the error will be freed.
See libdwarf2.1.pdf rev 3.08 or later for
details.
With DEBUG set additional allocation details are
revealed.
* dwarf_error.c: Repair a comparison with NULL.
* dwarf_finish.c(dwarf_finish): Simplify the !dbg test.
* dwarf_ranges.c: Remove dead code.
* libdwarf2.1.mm: Version 3.08. The Table of
Contents points to returns from dwarf_init*
calls (around page 28) now.
* libdwarf2.1.pdf: Generated Version 3.08.
2020-09-08: David Anderson
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h,libdwarf_version.h: Updated version
string, regenerated files that reference it.
2020-09-07: David Anderson
* dwarf_xu_index.c: We were not checking the
value of N (in the header of .debug_cu/tu_index)
to ensure it was sane. Now we check and error
if insane (the test object is fuzzed to provoke
the error).
* dwarf_elf_access.c: Reformatted commentary so
the lines are not too long.
2020-09-07: David Anderson
* dwarf_opaque.h, dwarf_str_offsets.c: Removed trailing
whitespace.
* dwarf_line_table_reader_common.h: Fixed an accidental
deletion of a crucual _ (underbar) in preceeding commit.
2020-09-07: David Anderson
* dwarf_line_table_reader_common.h: Places needing
additional dealloc in case of error:
lines 1232,2255,2404 (line#s in the updated version).
2020-09-07: David Anderson
* dwarf_tied_decls.h: Removed declaration of
_dwarf_loop_reading_debug_info_for_cu().
* dwarf_tied.c: The return value from dwarf_tsearch() was
not being handled properly. Lead to leaks.
Could, possibly, have lead to coredump.
Other places tsearch return values were done properly.
_dwarf_loop_reading_debug_info_for_cu() is
now static function.
* dwarf_groups.c: Moved _dwarf_grp_destroy_free_node()
down to just before the function that references it.
* dwarf_alloc.c: Removed an abort() call from
#ifdef DEBUG code.
2020-09-05: David Anderson
* dwarf_die_deliv.c: Delete old #if 0 lines.
Pick up Fission data about DW_SECT_STR_OFFSETS
to help find strings.
Merge any helpful base data from the skeleton (tied file)
CU dies into the dwp CU dies.
* dwarf_base_types.h: Add DW_STR_OFFSETS_VERSION4
to help with reading that GNU extension.
* dwarf_form.c: Corrected code reading from
.debug_str_offsets.
* dwarf_opaque.h: Added new fields to the CU context
record to support .debug_str_offsets, and a new
function declaration related to that.
* dwarf_query.c: Deleted no-longer-used functions
(the tied-file attribute merge happens much
earlier) and added
_dwarf_merge_all_base_attrs_of_cu_die().
* dwarf_ranges.c: Better represents using .debug_ranges.dwo
if it's present in the dwp .
* dwarf_str_offsets.c: Refactoring and revising to support
the two formats of .debug_str_offsets: DWARF5 and
GNU DWARF4.
* dwarf_str_offsets.h. New function prototypes for the revised
.debug_str_offsets[.dwo] code.
2020-09-01: David Anderson
* dwarf_loclists.c(internal_load_loclists_contexts): Added
a missing 'return DW_DLV_ERROR' when an error was detected.
2020-08-28: David Anderson
* dwarf_die_deliv.c,dwarf_loc.c,dwarf_util.c:Fixed
indents and trailing whitespace.
2020-08-27: David Anderson
* dwarf_die_deliv.c: Some error messages now have more
detail.
* dwarf_line_table_reader_common.h: In an error condition
(meaning corrupt dwarf) _dwarf_free_chain_entries()
was called twice on the same data, referring to
freed space in doing so. Deleted the extra call.
* dwarf_loc.c(_dwarf_setup_loc): Removed a
bogus _dwarf_error
using DW_DLE_LOC_EXPR_BAD: Let the just-called
function error code be returned.
Some error conditions detected here now report
detailed information on the error.
* dwarf_query.c(dwarf_attrlist): Refined the detailed
error message already present.
* dwarf_util.c:New internal function
_dwarf_create_area_len_error() lets dwarf_util.h
macro report a more detailed error without
bloating the macro.
* dwarf_util.h: Calls that new function rather
than calling _dwarf_error() itself.
2020-08-25: David Anderson
* dwarf_form.c: Previous change failed to show
the actual error string
DW_DLE_STRP_OFFSET_BAD or DW_DLE_STRING_OFFSET_BAD
along with the
details. Oops. Now it shows.
2020-08-23: David Anderson
* dwarf_form.c: Slightly changed the error message
for an error in DW_FORM_strp.
2020-08-23: David Anderson
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h,libdwarf_version.h: Updated version
string, regenerated files that reference it.
2020-08-23: David Anderson
* dwarf_form.c,dwarf_generic_init.c,dwarf_loc.c,
dwarf_loc.h,dwarf_loclists.c,dwarf_query.c, dwarf_rnglists.c,
pro_opaque.h: Remove trailing whitespace. Fix indents.
2020-08-23: David Anderson
* dwarf_form.c: In case an strp offset seems wrong
we get a more detailed error message.
* dwarf_macro5.c: Deleted gratuitous blank line.
2020-08-22: David Anderson
* dwarf_loc.c,dwarf_rnglists.c: call
_dwarf_look_in_local_and_tied_by_index
not _dwarf_extract_address_from_debug_addr so
.debug_addr in the tied file will be found.
* dwarf_opaque.h,dwarf_query.c: Make
_dwarf_look_in_local_and_tied_by_index global,not
_dwarf_extract_address_from_debug_addr.
2020-08-22: David Anderson
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h,libdwarf_version.h: Updated version
string, regenerated files that reference it.
2020-08-21: David Anderson
* dwarf_init_finish.c(insert_sht_list_in_group_map):
Added checks of dss_data_was_malloc around
a couple of calls saying free(secdata.dss_data).
The missing checks could only result in duplicate
free with user calls that allocated their
own section data to load a section and a certain
error arising during the call.
* dwarf_loc.c: To elminate ambiguity, renamed
some fields from lowpc to rawlowpc (for example).
* dwarf_loclists.c(build_array_of_lle): Removed
a block of code duplicating work done in dwarf_loc.c.
Fixed arguments passing ld_lopc, ld_highpc
to pass ld_rawlow, ld_rawhigh for correctness.
2020-08-21: David Anderson
* libdwarf2.1.mm: Rev 3.07. Corrected quote mismatches
in the mm commands, and a couple of stray
characters after a .P command
* libdwarf2.1.pdf: Rev 3.07. Regenerated.
2020-08-18: David Anderson
* checkexamples.c: Corrected example_rnglist_for_attribute()
example.
* dwarf_ranges.c: Corrected a comment and removed #if 0
code as it is obsolete.
* dwarf_rnglists.c(dwarf_get_rnglists_entry_fields_a):
Allow the pointer-arguments used to return data to
the caller to be null pointers safely, as libdwarf2.1.pdf
suggested that was legal.
* libdwarf2.1.mm: Version 3.06. Corrected the example
calling dwarf_get_rnglists_entry_fields_a().
* libdwarf2.1.pdf: Regenerated, Version 3.06
2020-08-10: David Anderson
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h,libdwarf_version.h: Updated version
string, regenerated files that reference it.
2020-08-10: David Anderson
* dwarf_elf_defines.h,dwarf_elfread.c: A linux kernel used a
R_X86_64_NONE (which means ignore the relocation) and
now we deal with it properly for EM_X86_64.
2020-08-02: David Anderson
* dwarf_alloc.c: Added a constructor for Dwarf_Locdesc_c
(DW_DLA_LOCDESC_C) so fields ld_lle_value and
ld_kind get non-zero and
erroneous initial values so
the values can be checked later for correctness.
* dwarf_errmsg_list.h: Added error DW_DLE_LOCATION_ERROR.
* dwarf_loc.c: Now we rigorously set and check the fields
ld_lle_value and ld_kind.
_dwarf_locdesc_c_constructor() sets those two fields
so we can check correctness and in case of error,
report the details.
* dwarf_loc.h: Added constructor prototype and a special
DW_LLE_VALUE_BOGUS initial value (invisible to
library callers).
* dwarf_loclists.c: After malloc use the Dwarf_Locdesc_c
constructor so later error checking possible.
* libdwarf.h.in: Added error DW_DLE_LOCATION_ERROR.
* libdwarf2.1.mm: Rev 3.05. Additional detail on
return values for dwarf_get_locdesc_entry_d()
and documented dwarf_get_locdesc_entry_c()
(recommending use of dwarf_get_locdesc_entry_d()
instead)
* libdwarf2.1.pdf: Rev 3.05. Regenerated.
2020-07-28: David Anderson
* dwarf_locationop_read.c: Added DW_OP_GNU_variable_value.
* dwarf_names.c, dwarf_names_enum.h: Regenerated.
* dwarf.h: Added in GNU names that had been accidentally
ommitted: DW_AT_GNU_deleted,DW_AT_GNU_locviews,
DW_AT_GNU_entry_view,DW_OP_GNU_variable_value.
These caused the regeneration of dwarf_names.h.
2020-07-22: David Anderson
* dwarf_abbrev.c,dwarf_debug_names.c, dwarf_debuglink.c,
dwarf_dsc.c,dwarf_error.c,dwarf_form.c,dwarf_funcs.c,
dwarf_gdbindex.c,dwarf_harmless.c,dwarf_init_finish.c,
dwarf_leb.c,dwarf_leb_test.c,dwarf_line.c,dwarf_macro.c,
dwarf_macro5.c,dwarf_original_elf_init.c,dwarf_pubtypes.c,
dwarf_str_offsets.c,dwarf_stringsection.c,dwarf_stubs.c,
dwarf_test_errmsg_list.c,dwarf_types.c,dwarf_vars.c,
dwarf_weaks.c,dwarf_xu_index.c,gennames.c,malloc_check.c,
pro_arange.c,pro_encode_nm.c,pro_error.c,pro_finish.c,
pro_forms.c,pro_funcs.c,pro_line.c,pro_macinfo.c,
pro_pubnames.c,pro_reloc.c,pro_reloc_stream.c,
pro_reloc_symbolic.c,pro_types.c,pro_vars.c,pro_weaks.c:
Updated copyright date. Reformatted copyright to
have slightly shorter lines, no change in content.
2020-07-22: David Anderson
* libdwarf2.1.mm: Now Rev 3.04. Revised the
Error Handling section for greater clarity.
Revised dwarf_init_path() to correct formatting
errors.
* libdwarf2.1.pdf: Regenerated as rev 3.04 .
* dwarf_generic_init.c(dwarf_init_pathh): Removed
the error-handling so when the call fails the
Dwarf_Debug argument is not touched.
For the PE case return the DW_DLV_ERROR or
DW_DLV_NO_ENTRY (return left off by accident).
* dwarf_arange.c: Reformatted the copyright
to have shorter lines.
2020-07-17: David Anderson
* libdwarf/libdwarf_version.h: Version string updated.
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h,libdwarf_version.h : regenerated
with latest version string
2020-07-17: David Anderson
* dwarf_frame.c: rearrange comments a little and
add a web reference as documentation.
* pro_debug_sup.c,pro_section.c: Remove trailing
whitespace. Fix indents.
2020-07-15: David Anderson
* dwarf_alloc.c: Improved printf if DEBUG
is turned on, with #undef DEBUG in source so
necessary to modify the source and rebuild
to get the voluminous alloc/dealloc debugging
printf turned on.
2020-07-14: David Anderson
* libdwarf2.1.mm: Version 3.02. Documents the new call
dwarf_get_debug_sup() to access the DWARF5
.debug_sup section.
* libdwarf2p.1.mm: Version 1.51. Documents the new
call dwarf_add_debug_sup() to create the DWARF5
.debug_sup section.
* libdwarf2.1.pdf,libdwarf2p.1.pdf: Regenerated.
2020-07-14: David Anderson
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h,libdwarf_version.h: Regenerated
with new version string.
2020-07-13: David Anderson
* CMakeLists.txt, Makefile.am: Added dwarf_debug_sup.c
* Makefile.in: Regenerated.
* dwarf_errmsg_list.h: Added DW_DLE_DEBUG_SUP_STRING_ERROR
and DW_DLE_DEBUG_SUP_ERROR.
* dwarf_names.c dwarf_names_enum.h: Reflects correction
of value of
DW_GNUIVIS_static (a new non-standard name in dwarf.h)
* generated_libdwarf.h.in,libdwarf.h.in: With the
two new errors and declaration of
dwarf_add_debug_sup() to produce .debug_sup
and dwarf_get_debug_sup() to retrieve the section values..
* pro_finish.c: Support for creating .debug_sup.
* pro_opaque.h: Support for creating .debug_sup.
* pro_section.c: Support for creating .debug_sup.
* dwarf_debug_sup.c: New, for .debug_sup access.
* pro_debug_sup.c: New. for .debug_sup creation.
2020-07-10: David Anderson
* dwarf_die_deliv.c: Handle
DW_AT_GNU_ranges_base in a CU DIE.
* dwarf_opaque.h: Added 2lines of comment
about cc_debug_offset.
* dwarf_query.c(_dwarf_get_ranges_base_attr_value):
Simplified as the cu_context
has the base values, no need to read
DIEs/Attributes here.
2020-07-09: David Anderson
* dwarf_opaque.h: Changing a comment about libdwarf
and the tied file (if any).
2020-07-08: David Anderson
* libdwarf2.1.mm: Added documentation of
.debug_gnu_pybtypes and .debug_gnu_pubnames.
See dwarf_get_gnu_index_head() in the document.
# libdwarf2.1.pdf: Regenerated. Rev 3.01
2020-07-08: David Anderson
* dwarf_init_finish.c: setup of .debug_names was
done twice (not harmful but the duplicate removed now).
2020-07-08: David Anderson
* dwarf_elf_load_headers.c,dwarf_gdbindex.c,dwarf_gnu_index.c,
dwarf_gnu_index.h,dwarf_init_finish.c,
dwarf_locationop_read.c: Fixed indents and trailing
whitespace.
2020-07-08: David Anderson
* dwarf.h: Fixed error in DW_GNUIVIS values.
* dwarf_debug_names.h: Arranging shorter
lines in a block of comments.
* dwarf_elfread.c( find_section_to_relocate): Added
de_debug_gnu_pubnames, de_dbug_gnu_pubtypes to sections
that can have relocations (in a dwo.o before linking).
* dwarf_gnu_index.c: Now loads debug_info so that
in near future correctness of offsets in
.debug_gnu_pubnames/pubtypes can be checked.
2020-07-08: David Anderson
* dwarf_gnu_index.c: Remove debug printf. Small corrections
to the section reading.
2020-07-06: David Anderson
* dwarf_loc.c: Too-long lines in comments adjusted shorter.
* dwarf_loc.h: Renamed _dwarf_free_loclists_head to
_dwarf_free_loclists_head_content for clarity.
* dwarf_loclists.c: Deleted dead code. Renamed that
function here too. Corrected a bug in
_dwarf_free_loclists_head()
* dwarf_gnu_index.c,dwarf_gnu_index.h: New files
to handle sections .debug_gnu_pubnames and
.debug_gnu_pubtypes
* dwarf_init_finish.c: Added the new sections to
enter_section_in_de_debug_sections_array().
* CMakeLists.txt,Makefile.am: Added dwarf_gnu_index.c and
dwarf_gnu_index.h
* Makefile.in: Regenerated.
* dwarf.h: Added new nonstandard DW_GNUIVIS* and
DW_GNUIKIND* in support of these sections.
* dwarf_alloc.c: New record type DW_DLA_GNU_INDEX_HEAD
for these new sections.
* dwarf_errmsg_list.h: New errors
* dwarf_names.c, dwarf_names.h: Regenerated with
DW_GNUIVIS and DW_GNUIKIND name functions.
* dwarf_names_enum.h: Regenerated this too.
* dwarf_names_new.h: Regenerated this.
* libdwarf.h.in: Added Dwarf_Gnu_Index_Head type
and new functions and new error codes. Dropped
a dead DLA type and assigned it to be for
DW_DLA_GNU_INDEX_HEAD. Added new functions
dwarf_get_gnu_index_head()
dwarf_gnu_index_dealloc()
dwarf_get_gnu_index_block()
dwarf_get_gnu_index_block_entry() allowing
access to the data in .debug_gnu_pubtypes
and .debug_gu_pubnames.
* generated_libdwarf.h.in: Regenerated.
2020-07-04: David Anderson
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h,libdwarf_version.h: new version string.
2020-07-03: David Anderson
* CMakeLists.txt, Makefile.am: renamed dwarf_dnames.h ->
dwarf_debug_names.h and dwarf_dnames.c to
dwarf_debug_names.c.
* Makefile.in: Regenerated.
* dwarf_alloc.c, dwarf_debug_names.c: Include
name updated dwarf_dnames.h to dwarf_debug_names.h .
* dwarf_elfread.c(_dwarf_elf_object_access_internals_init):
In case of a null gh_namestring we notice and skip
over it.
* dwarf_init_finish.c(_dwarf_load_section): Added to
the comment on zero-size sections.
2020-07-02: David Anderson
* dwarf_gdbindex.h: Removed gdbindex_offset_type typedef
as it is not used anywhere.
* dwarf_global.c(dwarf_get_cu_die_offset_given_cu_header_offset):
Updated a commment to reflect handling of DWARF5 and more.
* dwarf_util.h: Removed SKIP_LEB128_WORD_CK as it
is no longer used and replaced by a better function.
* dwarf_query.c: Removed comment about that macro.
* dwarf_form.c: Revised the commentary on
DW_AT_str_offsets_base to match the final DWARF5.
2020-07-02: David Anderson
* libdwarf.h.in: Added DW_DLE_GDBINDEX_STRING_ERROR.
* generated-libdwarf.h.in: Regenerated.
* dwarf_errmsg_list.h: Added DW_DLE_GDBINDEX_STRING_ERROR.
* dwarf_gdbindex.c(dwarf_gdbindex_addressarea_entry): Now
checks its arguments and the return string for problems.
2020-07-01: David Anderson
* libdwarf.h.in: Comment now deprecates
dwarf_get_loclist_entry().
* generated_libdwarf.h.in: regenerated.
* libdwarf2.1.mm: Deprecates dwarf_get_loclist_entry().
* libdwarf2.1.pdf: Regenerated, version 2.99.
* dwarf_locationop_read.c: Pass real address-size to
read_encoded_addr() so it will work properly.
2020-06-29: David Anderson
* dwarf_elf_load_headers.c: Added sanity checks
on section size of the section strings and
the symbol strings.
All the section-size errors now use
the new error code DW_DLE_SECTION_SIZE_OR_OFFSET_LARGE.
* dwarf_errmsg_list.h: Added string for
DW_DLE_SECTION_SIZE_OR_OFFSET_LARGE.
* libdwarf.h.in: Added DW_DLE_SECTION_SIZE_OR_OFFSET_LARGE.
* generated_libdwarf.h.in: Regenerated.
2020-06-29: David Anderson
* libdwarf_version.h: updated version string.
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h: Regenerated.
2020-06-29: David Anderson
* dwarf_elfread.c: Added checks on section sizes
and offsets to ensure they don't exceed file size
(but only check when we try to read them, we
want to read dwarf even if sections we do not
care about have damaged section headers).
* dwarf_peread.c: Fixed indentation mistake.
2020-06-28: David Anderson
* dwarf_elf_defines.h: Adding R_386_GOTPC
so we don't rely on /usr/include to have the
ones we need.
* dwarf_elf_rel_detector.c: Adding R_386_GOTPC
to identify the relocation as 32bit.
2020-06-27: David Anderson
* dwarf_alloc.c(_dwarf_free_all_of_one_debug): If space
for debug_rnglists or
debug_loclists was malloc'd (relocations
or compressed sections force malloc) we
now call the function that frees that
data. That function renamed:
rela_free->malloc_section_free.
2020-06-25: David Anderson
* dwarf_loc.c: Corrected indents.
* dwarf_loclists.c: Corrected indents, removed
trailing whitespace.
* dwarf_peread.c: Removed trailing whitespace.
* dwarf_rnglists.c: Removed trailing whitespace.
* libdwarf2.1.mm: Rev 2.98. Added documentation
on the .debug_names section printing functions.
These intended for debugging .debug_names
(that is, by dwarfdump),
not things user code are likely to want to use.
Documented the new function
dwarf_get_rnglists_entry_fields_a() as the original
dwarf_get_rnglists_entry_fields()
(which is still there and works as well as before)
left off a field important to callers.
* libdwarf2.1.pdf: Rev 2.98. Regenerated.
2020-06-22: David Anderson
* dwarf_loc.c: Using knowledge of the base address status
improve messaging while reducing execution time.
* dwarf_loclists.c: Properly deal with setting
up for output in case .debug_addr missing (fixing
an omission).
* dwarf_peread.c: In load_optional_header64() we were
failing to read hdr.ImageBase which caused addresses
to be wrong (base address needed to be set).
* dwarf_rnglists.c: Based on knowledge of lack/presence
of .debug_addr improve messaging and reduce
cpu-time spent.
* dwarf_rnglists.h: Added 2 line commentary.
* libdwarf.h.in,generated_libdwarf.h.in: Added
dwarf_get_rnglists_entry_fields_a(), the original
function was inadequate.
2020-06-19: David Anderson
* dwarf_reloc_x86_64.hr,dwarf_reloc_x86_64.h: Added in
R_X86_64_PC64 relocation as llvm is using it.
2020-06-17: David Anderson
* dwarf_elf_load_headers.c: Catch a potential division by
zero error.
* dwarf_peread.c: Added comments.
2020-06-17: David Anderson
* dwarf_loclists.c, dwarf_rnglists.c: Rename
length_size->offset_size
for clarity and correct the computation of the
length of the offsets array.
2020-06-17: David Anderson
* dwarf_die_deliv.c: Pick up CU DIE base fields
always. Not just for DWARF4,5.
* dwarf_loc.c: Clarify the flow. A comment added.
* dwarf_form.c: Added missing DW_FORM_loclistx from
a switch.
2020-06-16: David Anderson
* dwarf_query.c, dwarf_util.c: Remove trailing whitespace.
Changed indents and line lengths in a small area to match
the usual look.
2020-06-16: Jorge Gorbe Moya
* dwarf_query.c, dwarf_util.c: Correct the handling
of DW_UT initializations.
2020-06-16: David Anderson
* dwarf_die_deliv.c,dwarf_frame2.c,dwarf_loc.c:
Remove trailing whitespace.
2020-06-14: David Anderson
* libdwarf1.1.mm: Added examples to the Error Handling
section as the previous version was pretty vague
about the best way to call libdwarf to deal
with errors.
* libdwarf1.1.pdf: Generated version 2.97.
2020-06-14: David Anderson
* dwarf_die_deliv.c: Adds the highest known
abbrev code to certain error messages.
* dwarf_die_deliv.h: Corrected a comment.
* dwarf_frame2.c: Now uses (uintptr_t) to avoid
warnings from certain compiler/pointer-size
environments.
* dwarf_loc.c: Update the loclist head
structure ll_bytes_total
field with DWARF 2,3,4 loclists too.
* dwarf_opaque.h: Add cc_highest_known_code
to Dwarf_CU_Context_s for better
error reporting and align some field names
for a better appearance.
* dwarf_query.c: Improved error reporting
when an abbrev code missing.
* dwarf_util.c: Keep track of highest abbrev
code seen (per compilation unit).
* dwarf_util.h: Internal function declaration
changed to allow reporting of highest
abbrev code.
2020-06-12: David Anderson
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h,libdwarf_version.h: updated
version string.
2020-06-12: David Anderson
* checkexamples.c,dwarf_alloc.c,dwarf_arange.c,
dwarf_frame.c,dwarf_line.c,dwarf_line_table_reader_common.h,
dwarf_loc.c,dwarf_loc.h,dwarf_locationop_read.c,
dwarf_loclists.c,dwarf_query.c,dwarf_rnglists.c,
dwarf_util.c,libdwarf.h.in: Fixed indents
and removed trailing whitespace.
2020-06-12: David Anderson
* dwarf_alloc.c: Added free of loclists to
_dwarf_free_all_of_one_debug().
* dwarf_loc.c: Created _dwarf_free_op_chain()
and call it so even in case of error nothing leaks.
Some adjustments to indents.
* dwarf_loclists.c: _dwarf_dealloc_loclists ->
_dwarf_dealloc_loclists_context for clarity.
Modified _dwarf_free_loclists_head() to get
leak-free behavior.
* dwarf_opaque.h: Reflects above name change.
* libdwarf2.1.mm: Corrected and amplified
words on the new functions.
* libdwarf2.1.pdf: Regenerated.
2020-06-10: David Anderson
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h,libdwarf/libdwarf_version.h:
updated version string.
2020-06-09: David Anderson
* CMakeLists.txt,Makefile.am : Deleted dwarf_loc2.h reference.
Added dwarf_locationop_read.c, dwarf_loclists.c.
* Makefile.in: Regenerated.
* dwarf_alloc.c: Corrected a comment about reserved numbers.
Reflects name change from struct Dwarf_Loc_c_s to
struct Dwarf_Loc_Expr_Op_s.
* dwarf_errmsg_list.h: Added DW_DLE_LOCLISTS_ERROR.
* dwarf_form.c: Added arguments to the library
internal function _dwarf_formblock_internal()
for better support of DWARF5 loclist creation.
* dwarf_frame2.c: Changed a local from unsigned
to Dwarf_Unsigned as well as changing pointer
casts from 'unsigned long' to Dwarf_Unsigned.
* dwarf_loc.c: Lots of refactoring to make
the flow easier to understand.
Moved _dwarf_read_loc_expr_op() to
a new file dwarf_locationop_read.c as the
function is quite large.
Renamed other functions so the names are not
so much alike.
* dwarf_loc.h: New fields in Dwarf_Loc_Chain_s
to support the raw vs. cooked values of location
low/high. New fields to support DWARF 5 loclists
* dwarf_loc2.h: Deleted. Relevant contents in
dwarf_loc.c and dwarf_loclists.c
* dwarf_locationop_read.c: Existing code
to read location ops refactored to a routine
by themselves. Long enough by itself
* dwarf_loclists.c: New file with .debug_loclists
support.
* dwarf_loclists.h: Nothing here. will be deleted.
* dwarf_opaque.h: New functions and arguments
for internal debug_loclists data.
* dwarf_rnglists.c: Changed certain arguments
to Dwarf_Half (address_size etc) where that
makes sense.
* dwarf_util.c: Now dwarf_load_debug_info()
loads the base data from .debug_rnglists
and .debug_loclists (DWARF5)
* libdwarf.h.in: 'unsigned' now 'unsigned int'
existing function unchanged: dwarf_get_loclist_c()
new function dwarf_get_locdesc_entry_d()
new function dwarf_get_loclist_head_basics()
new function dwarf_get_location_op_value_d()
new function dwarf_get_loclist_head_kind()
- Following for printing raw loclists, not
usually used.
new function dwarf_load_loclists()
new function dwarf_get_loclist_context_basics()
new function dwarf_get_loclist_lle()
new function dwarf_get_loclist_offset_index_value()
new function dwarf_get_loclist_raw_entry_detail()
* libdwarf2.1.mm: 2.96, documents the new calls.
* libdwarf2.1.pdf: Version 2.96.
2020-05-23: David Anderson
* dwarf_opaque.h: Defines DWARFSTRING_ALLOC_SIZE 200
* dwarf_form.c: Using DWARFSTRING_ALLOC_SIZE for the
initial allocation, (mostly) avoiding the need
for malloc here. dwarfstring is mainly used
for error messages, so preallocation is rarely useful
* dwarf_line.c(create_fullest_file_path): Corrected
the comments for this function.
2020-05-22: David Anderson
* dwarf_alloc.c: New functions with proper type checking:
dwarf_dealloc_error(), dwarf_dealloc_attribute(),
dwarf_dealloc_die().
* dwarf_arange.c: Now does correct free_aranges_chain()
and ensures chain entry stuff dealloc-d as appropriate.
* dwarf_die_deliv.c: Improved an error message in reports
an address-size error.
* dwarf_frame.c: Initialize more local variables at the
point of declaration. Do all needed dealloc of
the chain entries
when creating the list.
* dwarf_global.c: Now uses the new ch_itemtype
to dealloc properly. Which simplifies the
dealloc_globals_chain() call.
* dwarf_line.c: Now uses the new ch_itemtype
to dealloc properly.
* dwarf_line_table_reader_common.h: Now uses wrappers
for the READ_UNALIGNED_CK DECODE_LEB128_UWORD_CK etc
macros so the code
now deallocs appropriately in case of error.
Most places were not doing full dealloc. Now
all are.
* dwarf_opaque.h: New field ar_dbg so attribute
dealloc is easier. New chain field ch_itemtype
so dealloc is simpler and safer.
* dwarf_query.c: Removed comment about leaking memory,
the leaks are fixed by using the DECODE_LEB128_UWORD_CK
etc wrapper functions.
* libdwarf.h.in: Declares the new dealloc functions
dwarf_dealloc_error(),dwarf_dealloc_die(),
dwarf_dealloc_attribute().
* generated_libdwarf.h.in: Regenerated.
* libdwarf2.1.mm: New documentation of dwarf_dealloc()
as well as documentation of
dwarf_dealloc_error(),dwarf_dealloc_die(),
dwarf_dealloc_attribute().
* libdwarf2.1.pdf: Regenerated. Version 2.94.
2020-05-19: David Anderson
* dwarf_rnglists.c: Ommited a crucial assign to rh_debug so it
leaked if de_alloc_tree absent.
2020-05-19: David Anderson
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,dwarf_names_new.h,
libdwarf_version.h : New version strings.
2020-05-19: David Anderson
* libdwarf.h.in: Revised a couple rnglists functions
by removing unneeded arguments and revising the arguments
to dwarf_rnglists_offset_get_rle_head(),
dwarf_get_rnglist_head_basics(), and
dwarf_get_rnglists_entry_fields()
* generated_libdwarf.h.in: Regenerated.
* dwarf_rnglists.c: Checked a pointer argument for null before using.
Remove the unneeded function arguments (affecting several internal
functions too). Renamed a few internal things for clarity.
* libdwarf2.1.mm: Documented the new rnglists functions
and added examples of use.
* libdwarf2.1.pdf: Regenerated. Version 2.93.
2020-05-17: David Anderson
* dwarf_dnames.c: Improved error reporting of the names generation
when something goes wrong.
* dwarf_elf_access.c,dwarf_elfread.c: Add MATCH_REL_SEC
for the .debug_addr section.
* dwarf_form.c: Improved error reporting by showing specific details.
Now supports DW_FORM_rnglistx. New function
dwarf_addr_form_is_indexed(theform) created, now using
it here and in dwarfdump as needed..
* dwarf_line_table_reader_common.h: Corrected indents.
* dwarf_opaque.h: Small commentary changes, added the
CU Context field cc_dwo_name_present (used for
non-standard DWARF4).
* dwarf_query.c: Simplified some pointlessly messy code.
Now also using dwarf_addr_form_is_indexed() instead of
a list missing some DWARF5 values.
* dwarf_ranges.c: #if 0 some useless code for now.
* dwarf_rnglists.c: The .debug_rnglists code is here.
* dwarf_rnglists.h: For use inside libdwarf. Opaque
to libdwarf callers.
* dwarf_tsearchhash.c: Trivial change. No logic change.
* dwarf_util.c: Removed pointless blank line.
* dwarf_util.h, dwarf_xu_index.h: Fix trailing whitespace.
* libdwarf.h.in: New functions and opaque types for reading
the .debug_rnglists section.
* generated_libdwarf.h.in: Regenerated.
2020-05-05: David Anderson
* dwarf_rnglists.h, dwarf_opaque.h, dwarf_rnglists.c:
Preliminary new fields/code for Rnglists_Context.
2020-05-04: David Anderson
* dwarf_alloc.c: renamed dwarf_dealloc_rnglists
to _dwarf_dealloc_rnglists.
* dwarf_errmsg_list.h: Added DW_DLE_RNGLISTS_ERROR.
* dwarf_opaque.h: Added _dwarf_dealloc_rnglists() prototype.
* dwarf_rnglists.c: Minor corrections of this new code.
* dwarf_rnglists.h: Added a new field for internal use.
Deleted some #if 0 lines.
* dwarf_util.c(_dwarf_load_debug_info): Now also
calls dwarf_load_rnglists as we need that in the
Dwarf_Debug.
* libdwarf.h.in: Added DW_DLE_RNGLISTS_ERROR.
Deleted dwarf_dealloc_rnglists as it is renamed
and made private to libdwarf.
* generated_libdwarf.h.in: Regenerated.
2020-05-02: David Anderson
* libdwarf2.1.mm: Added a note to Changes that
instances of 'length_size' in the code and headers
variable naming will, over time, be changed to
'offset_size' as this name suggests what they really
represent: a 4 or 8 byte offset size.
* libdwarf2.1.pdf: Regenerated, version 2.92
2020-05-02: David Anderson
* CMakeLists.txt, Makefile.am: Added dwarf_rnglists.h,
dwarf_rnglists.c
* Makefile.in: Regenerated.
* dwarf_alloc.c: Now calls dwarf_dealloc_rnglists() at
finish to clean up rnglists data, if any.
* dwarf_arange.c: Deleted some blank lines and added one.
* dwarf_opaque.h: Added de_rnglists_context_count and
de_rnglists_context to support rnglists.
* dwarf_rnglists.h: Defines the Dwarf_Rnglists_Context
structure.
* dwarf_rnglists.c: Implements initial support of the
.debug_rnglists section.
* libdwarf.h.in: Declares new rnglist-related functions
and an opaque struct Dwarf_Rnglists_Context_s.
* generated_libdwarf.h.in: Regenerated.
2020-04-26: David Anderson
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h,libdwarf_version.h: Updated
version string.
2020-04-25: David Anderson
* dwarf_abbrev.c: Fix trailing whitespace.
* dwarf_arange.c: Delete macro READ_UNALIGNED_CK
use an just use _dwarf_read_unaligned_ck_wrapper.
* dwarf_die_deliv.c: Uses wrapper instead
of READ_UNALIGNED_CK where necessary.
Delete commented-out lines.
* dwarf_error.c: Remove unwanted debug code.
* dwarf_form.c: Remove trailing whitespace.
* dwarf_global.c: Rename some arguments for greater
clarity.
* dwarf_line.c: Fix line handling so both DW5
and earlier handled better. Improve some error
messages.
* dwarf_macro5.c: Use wrapper() funcs, not
READ_UNALIGNED_CK and fix a couple local
variables so that works.
* dwarf_ranges.c: Remove trailing whitespace.
* dwarf_util.c: Remove trailing whitespace.
2020-04-24: David Anderson
* dwarf_die_deliv.c: Now using wrappers so that
errors do not lead to a temporary leak.
* dwarf_global.c: Now ensures that an error
in reading globals does not lead to temporary
leaks that rely on dwarf_finish() to clean up.
2020-04-24: David Anderson
* dwarf_names.c,dwarf_names.h, dwarf_names_enum.h,
dwarf_names_new.h, libdwarf_version.h:
updated version string.
2020-04-23: David Anderson
* dwarf_arange.c: Using new wrapper() code
so that the reader macros do not interfere
with doing appropriate dealloc.
* dwarf_util.c: Implement new wrapper functions
_dwarf_read_unaligned_ck_wrapper() and
_dwarf_read_area_length_ck_wrapper.
* dwarf_util.h: Declare the new functions.
2020-04-22: David Anderson
* libdwarf.h.in: Added DW_DLE_USER_DECLARED_ERROR
and the dwarf_error_creation() function that creates
the Dwarf_Error.
* generated_libdwarf.h.in: Regenerated.
2020-04-20: David Anderson
* dwarf_form.c: Split a too-long comment line.
2020-04-16: David Anderson
* dwarf_line_table_reader_common.h: more detailed error
messages in a few cases.
* dwarf_print_lines.c: Added dwarf_check_lineheader_b()
as dwarf_check_lineheader() did not return error
details.
* libdwarf.h.in: defined prototype for
dwarf_check_lineheader_b();
* generated_libdwarf.h.in: regenerated.
2020-04-14: David Anderson
* libdwarf2.1.mm: Fixed wording
of dwarf_get_fde_info_for_cfa_reg3_b()
which had the 1/0 value of has_more_rows
backwards.
Corrected several misspellings.
* libdwarf2.1.pdf: Regenerated, v2.91.
2020-04-13: David Anderson
* dwarf_abbrev.c: Various errors now show additional detail
about what exactly is wrong.
2020-04-11: David Anderson
* dwarf_die_deliv.c,dwarf_xu_index.c: Each had
a single trailing space. Removed.
2020-04-11: David Anderson
* dwarf_global.c: Changed break to continue
so we don't stop the loop too early, yet
still avoid leaking a useless.
2020-04-10: David Anderson
* debug-cu-tu-indexes-layout.odg: The Split-Dwarf
(aka debugfission) table layout is simple, but
this is an introduction to the
layout of the arrays. LibreOffice Draw document.
* dwarf_init_finish.c: Small enhancements of error messages.
* dwarf_util.c: Reformatted a macro here
(READ_UNALIGNED_CK) so the lines are not so long
and the backslashes are easily seen as complete.
* dwarf_xu_index.c: There was some confusion in the
code which prevented it from working.
Interfaces remain the same, but things work now.
The first part is a 20 line (or so) explanation
of some of the internal handling of the tables.
Now things work. Many error messges get
detailed information.
* dwarf_xu_index.h: Added new fields and relabeled
the N U S fields in the header to match the
DWARF5 standard.
* libdwarf2.1.mm: Rev 2.90 10 April 2020.
A little bit of reformatting to shorten the lines
here. Has little or no effect on the output pdf.
corrected the wording about the
dwarf_get_xu_section_offset() function.
* libdwarf2.1.pdf: Regenerated Rev 2.90.
2020-04-07: David Anderson
* dwarf_alloc.c: Deleted useless comment and added
a blank line to separate declarations from code.
* dwarf_frame2.c: Fixed a too-long line.
* dwarf_query.c: Now DW_DLE_ALLOC_FAIL has a meaningful
error string attached.
* dwarf_util.c: Added comment before CHECK_DIE macro.
2020-04-03: David Anderson
* dwarf_arange.c: Deleted a useless blank line.
Removed useless () around a return value.
2020-04-03: David Anderson
* dwarf_form.c,dwarf_frame2.c,dwarf_query.c: Fix indents and
remove trailing whitespace.
2020-04-02: David Anderson
* dwarf_die_deliv.c: Better text printed for an address size error
including reporting the actual addrss-size found by libdwarf.
* dwarf_frame2.c: Deleted a static version of
_dwarf_create_address_size_dwarf_error() and use
the global one. Revised some error messages to
have specific details. Each instance of
DW_DLE_DEBUG_FRAME_LENGTH_BAD now reports something
specific about each case.
* dwarf_opaque.h: Added a declaration of
_dwarf_create_address_size_dwarf_error().
2020-03-28: David Anderson
* dwarf_global.c: dwarf_return_empty_pubnames() revised
so it cannot fail.
* libdwarf.h.in: Revised comments attached to
dwarf_return_empty_pubnames() function prototype.
* generated_libdwarf.h.in: Regenerated.
2020-03-27: David Anderson
* dwarf_names.c,dwarf_names.h, dwarf_names_enum.h,
dwarf_names_new.h, libdwarf_version.h:
updated version string.
2020-03-27: David Anderson
* dwarf_form.c,dwarf_query.c,dwarf_ranges.c: Improve various
error messages with specific information about the
error.
2020-03-27: David Anderson
* dwarf_ranges.c: Properly detect end-of-section
again.
2020-03-27: David Anderson
* dwarf_alloc.c, dwarf_form.c: Removed
trailing whitespace.
2020-03-27: David Anderson
* dwarf_alloc.c: The (static) list of DW_DLA
initializers was very messy and hard to read.
Cleaned up its appearance.`
Added the 'type' to the fields that -DDEBUG
prints.
* dwarf_form.c,dwarf_util.c: The DW_DLE_FORM_BLOCK_LENGTH_ERROR
error messages now have a longer and more
complete error string.
2020-03-26: David Anderson
* dwarf_alloc.c,dwarf_error.c: Changed spelling of the
-DDEBUG prefixes to "libdwarfdetector"
* libdwarf2.1.mm: Documented hints on finding libdwarf
and libdwarf-caller memory leaks. Section 6.33
* libdwarf2.1.pdf: Regenerated, version 2.89
2020-03-26: David Anderson
* dwarf_alloc.c,dwarf_error.c: Now DEBUG can be turned on via
CFLAGS at configure time. Or left off by default.
Changed all the fprintf here (debug stuff) to
do printf instead.
* dwarf_die_deliv.c,dwarf_frame2.c: Altered the
DW_DLE_ADDRESS_SIZE_ERROR
strings so the 3 cases can be distinquished easily
(just a convenience for debugging).
* dwarf_globals.c: Removed one superfluous ().
* dwarf_query.c: Reforatted lgpl text for shorter
lines (no change in the content).
Removed one superfluous ().
2020-03-25: David Anderson
* dwarf_alloc.c, dwarf_error.c: Revised the debug
output created if DEBUG is defined.
2020-03-25: David Anderson
* dwarf_die_deliv.c: Fix trailing whitespace.
* dwarf_frame2.c: Fix trailing whitespace.
2020-03-24: David Anderson
* dwarf_line.c: Deleted useless blank line.
2020-03-24: David Anderson
* dwarf_alloc.c: Now with #ifdef DEBUG of debug messages in
various places as thise get needed over and over.
* dwarf_die_deliv.c: Working toward complete dealloc
of resources to eliminate the dependence on de_alloc_tree.
* dwarf_error.c: #if 0 a debug message.
* dwarf_form.c: Remove superflous ().
* dwarf_global.c(_dwarf_internal_globals_dealloc):
Recreated and documented critical dealloc code
so Dwarf_Global_Context gets dealloc-c.
* dwarf_line.c: Add a return DW_DLV_ERROR after
an error Dwarf_Error is created..
2020-03-23: David Anderson
* dwarf_die_deliv.c,dwarf_frame2.c: Some error messages
are now far more precise (showing values).
* dwarf_global.c: Correcting leakage and making
some error messages more precise.
* dwarf_print_lines.c: Correcting leakages.
* dwarf_pubtypes.c: Minor readability change.
2020-03-21: David Anderson
* dwarf_abbrev.c Move leb wrapper functions to dwarf_util.[ch]:
and rename as _dwarf.....
Make certain error conditions more explicit (better
text in the error string).
* dwarf_die_deliv.c: Move leb wrapper functions to dwarf_util.[ch]
and rename as _dwarf.....
* dwarf_frame2.c: Add {} for the few 'if' missing same.
* dwarf_line.c: In case of form error make the error
text more useful.
* dwarf_query.c: Move leb wrapper functions to dwarf_util.[ch]
and rename as _dwarf.....
* dwarf_util.c, dwarf_util.h: Add the renamed
_dwarf_leb128_uword_wrapper() and
_dwarf_leb128_sword_wrapper() for general use
where better error messages are advisable.
* dwarf_init_finish.c: Removed a single trailing blank.
* libdwarf.h.in: Removed trailing spaces.
* generated_libdwarf.h.in: Regenerated.
2020-03-20: David Anderson
* dwarf_arange.c: In case of error, was failing
to clean up all allocations.
* dwarf_macro5.c: Was preventing some dwarf_dealloc().
Fixed.
2020-03-19: David Anderson
* dwarf_abbrev.c: Generates a more useful and specific
message in case a TAG is corrupt.
* dwarf_line.c: After dealloc assign 0 to the pointer.
* dwarf_die_deliv.c: Improved insert_into_context_list()
for clarity and correctness.
* dwarf_error.c: Removed a couple "!= NULL" in if
conditions.
* dwarf_query.c: Uses local variable now to
satisfy the usual libdwarf convention that in case
of DW_DLV_NO_ENTRY or DW_DLV_ERROR only the
Dwarf_Error argument is altered, not other
pointer args.
* dwarf_util.h: Declaration for _dwarf_format_TAG_err_msg()
* dwarf_util.c: Generates a more useful and specific
message in in _dwarf_format_TAG_err_msg()
in case a TAG is corrupt.
2020-03-18: David Anderson
* dwarf_die_deliv.c: Rewrote the function that
keeps the cu_context list in the proper order.
For clarity and correctness.
2020-03-16: David Anderson
* dwarf_alloc.c: A recent change had the wrong
test during initial Dwarf_Debug
struct setup meaning dwarf_finish() was not cleaning
up allocations. This made the runtimes better
than they should be. Important correction here.
* dwarf_die_deliv.c: Drop use of the dwarf_dieoff()
context list, that was never appropriate. Now
again with one list.
* dwarf_opaque.h: Removed a list of Dwarf_CU_Contexts,
that was never correct to have dwarf_offdie maintain
a list separate from iterating through CUs.
* dwarf_query.c (dwarf_attrlist): Add a
dwarf_dealloc on abbrev_list
in an error case.
* dwarf_util.c: Make the lines look a tiny bit
better avoiding too-long lines.
2020-03-15: David Anderson
* dwarf_frame2.c: On an internal error (bad dwarf)
the necessary cleanup function was not being called
in two places.
2020-03-15: David Anderson
* dwarf_alloc.c: Now with configure-time options
for tracking the alloc/dealloc actions in detail.
2020-03-15: David Anderson
* dwarf_alloc.c: Now with the de_alloc_tree tests
in final form. Respecting dwarf_set_de_alloc_flag().
2020-03-14: David Anderson
* dwarf_alloc.c: Now adds an optional DEBUG
macro that libdwarf developers may find useful.
Revised the dwarf_dealloc code to not require de_alloc_tree.
* dwarf_line.c: Now dwarf_srcfiles() and dwarf_filename()
always allocate DW_DLA_STRINGS. Whereas earlier some
of the strings were actually in a .debug section,
not allocated.
* libdwarf2.1.mm: Now dwarf_diename() and
dwarf_die_text are documented
as returning static strings that are not be be
freed or dwarf_dealloc'd. This was always true
but the documentation said dwarf_dealloc() was
required. Don't use dwarf_dealloc on these returned
strings.
* libdwarf2.1.pdf: Regenerated, version 2.88
* dwarf_loc.c: Was incorrectly passing NULL instead
of dbg to _dwarf_get_alloc in a few places.
* dwarf_util.c, dwarf_global.c: Now checks more for
incomplete setup
of an internal structure to avoid calling dwarf_dealloc
with NULL as the space to be freed.
2020-03-13: David Anderson
* dwarf_abbrev.c: Remove erroneous dwarf_dealloc
introduced yesterday. Caused a coredump
in FreeBSD 64bit dwarfdump testing.
* dwarfstring.c: Introduced an extra zero initializer in
the dwarfstring_destructor() as safe and harmless.
2020-03-12: David Anderson
* dwarf_abbrev.c: Use a wrapper on macro
DECODE_LEB128_UWORD_CK
so we can dwarf_dealloc in case of a problem.
And be more thorough in various places
for those dwarf_dealloc.
2020-03-12: David Anderson
* dwarf_die_deliv.c: A local function now explicitly
static (_dwarf_siblingof_internal).
Following dwarf_dealloc of cudie we assign 0 to it.`
New function local_dealloc_cu_context() enables
accurate and full dealloc of a cu context
(which means there was some error fount) in
an easy and complete way.
local_attrlist_dealloc() does similarly for attrlists.
A DECODE_LEB128_UWORD_CK now in a wrapper so on error
we can dwarf_dealloc a DIE.
* dwarf_macro5.c: Now dwarf_dealloc_macro_context() is safe
if called with a null argument (and in that case there
is nothing to do).
* dwarf_opaque.h: Removed _dwarf_siblingof_internal()
from the declared functions.
2020-03-12: David Anderson
* dwarf_alloc.h, dwarf_opaque.h: Removed trailing whitespace.
Shortened the lines of the LGPL text (the text
is unchanged).
2020-03-12: David Anderson
* dwarf_str_offsets.c,dwarf_util.c: Removed trailing whitespace
and fixed indent mistakes.
2020-03-12: David Anderson
* dwarf_query.c: Adds wrapper code around some
dwarf_util.h macros
so in case of a serious DWARF error we can
free locally allocated things.
2020-03-12: David Anderson
* dwarf_errmsg_list.h: Corrected DW_DLE_STR_OFFSETS_EXTRA_BYTES
text. The error messages have more detail due to
the dwarf_str_offsets.c changes below, so fixed
the string here.
2020-03-12: David Anderson
* dwarf_macro5.c: Do proper dwarf_dealloc, avoiding
a pointless dependency on de_alloc_tree freeing
things.
2020-03-12: David Anderson
* dwarf_alloc.c: Minor cleanup that assigns
zero after dwarf_dealloc so dead pointers
not left around.
2020-03-12: David Anderson
* dwarf_str_offsets.c: Improve messages in case of
a serious DWARF error, reporting what is wrong
more precisely and allowing a few bytes of all-zero-bits
to be allowed at end of section (no error needed).
2020-03-12: David Anderson
* dwarf_util.c: Revise too-long lines and checks for NULL
pointers for moderm readability.
Improve _dwarf_free_abbrev_hash_table_contents() so
it can safely free an incompletely set up hash table.
2020-03-09: David Anderson
* dwarf_alloc.c: Implements optional (at run time)
reduced use of the de_alloc_tree search tree
as a performance enhancement (see libdwarf2.1.mm/pdf).
* dwarf_alloc.h: Declares _dwarf_alloc_tree_counts(),
a new hidden function.
* libdwarf_version.h: New date string
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h: New date string so regenerated
these.
* libdwarf.h.in: New function dwarf_set_de_alloc_flag()
declared.
* generated_libdwarf.h.in: Regenerated
2020-03-02: David Anderson
* dwarf_print_lines.c: Removed one-line #if 0
code that serves no purpose.
2020-02-25: David Anderson
* dwarf_print_lines.c: Removed space character just before newline
as it has no useful prupose. 3 places.
2020-02-25: David Anderson
* dwarf_names.c,dwarf_names.h, dwarf_names_enum.h,
dwarf_names_new.h:
libdwarf_version.h: updated version string.
2020-02-25: David Anderson
* dwarf_line_table_reader_common.h: Now with dwarfstring
containers in local scopes and easily evaluated
as to lifetime and correctness.
2020-02-25: David Anderson
* dwarf_elfread.c: Deleted a #if 0 ...#endif few lines.
* dwarf_line.c: Fixed trailing whitespace.
* dwarf_line_table_reader_common.h: Removed all use of the
old dwarf_printf varargs code. Instead using dwarfstring
and dwarfstring_append_printf_i() etc.
And a far simpler _dwarf_printf().
No longer any sprintf/snprintf/vsnprintf here.
* dwarf_opaque.h: Remove trailing whitespace.
* dwarf_print_lines.c: Removed all use of the
old dwarf_printf varargs code.
No longer any sprintf/snprintf/vsnprintf here.
* dwarf_util.c: Delete unused buffersetsize function.
Delete now-unuised dwarf_printf()
* dwarfstring.c: Now using TRUE FALSE, not DW_DLV anything.
No one will be testing the integer return value anyway.
Fixed the code where %-4s was truncating if the string
to be processed was longer than 4 characters.
* dwarfstring.h: Added commentary.
* test_dwarfstring.c: New testcase for dwarfstring
2020-02-21: David Anderson
* dwarf_arange.c,dwarf_debuglink.c,dwarf_frame2.c:
removed the last sprintf/snprintf, changed to
use dwarfstring.h functions.
2020-02-18: David Anderson
* dwarf_line.c: Added free() calls to delete_line_context_itself
to avoid a leak that was created in last commit..
* dwarf_line.h: Deleted a now-spurious comment.
* dwarf_line_table_reader_common.h: Removed an == NULL
comparison in favor of a !filename_entry_pairs.
2020-02-16: David Anderson
* libdwarf2.1.mm: Now explains how dwarf_srcfiles()
name arrays differ in DWARF5 from earlier
debug_info versions. So callers can use
the srcfiles array properly.
* libdwarf2.1.pdf: Now version 2.87, dated 16 February 2020.
* dwarf_line.c, dwarf_line.h,dwarf_print_lines.c,
dwarf_line_table_reader_common.h: Recording DW5 line table
header data more fully so lines print verbose
prints more of the actual line table header.
2020-02-15: David Anderson
* dwarf_elf_access.c,dwarf_init_finish.c: With libelf
in use there was a mistake that broke dumping some objects that
needed relocations.
* dwarf_opaque.h: Corrected a is_rela to r_is_rela
2020-02-13: David Anderson
* dwarf_elfread.c,dwarf_errmsg_list.h: Removed
trailing whitespace.
2020-02-13: David Anderson
* libdwarf_version.h: New version string
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h: Regenerated with new
version string.
2020-02-13: David Anderson
* libdwarf/libdwarf.h.in: Added a new error code to
properly distinguish between distinct elf section
header issues related to relocations versus
other section header issues.
* libdwarf/generated_libdwarf.h.in: regenerated
* dwarf_elf_access.c: Adding local READ_UNALIGNED_SAFE
so we can do libelf relocations properly; .rel and .rela.
* dwarf_elf_defines.h: Adding R_386_PC32 to the
applicable relocation sets.
* dwarf_elf_load_headers.c: Now we deal with .rel.
and .rela. relocations for better completeness.
Removed some code duplication and complexity
too.
* dwarf_elf_rel_detector.c: Deals with R_386_PC32 now.
* dwarf_elfread.c: Add READ_UNALIGNED_SAFE so we can
do no-libelf relocations properly; .rel and .rela
* dwarf_elfread.h: Added gr_is_rela field and
two enums RelocRela and RelocOffsetSize so we have
type-safety in the argument lists.
* dwarf_init_finish.c: A new function ensures we
skip various sections we know we do not want to
look at.
* dwarf_opaque.h: Declare _dwarf_ignorethissection()
so libelf and non-libelf can ignore the unwanted
sections.
* dwarf_errmsg_list.h: Entry added for the new
DW_DLE error code.
2020-02-11: David Anderson
* dwarf_elf_access.c,dwarf_line_table_reader_common.h,
dwarf_tied_decls.h:
removed trailing whitespace and final blank line.
2020-02-11: David Anderson
* dwarf_init_finish.c: Removed code that was #if 0 #endif
2020-02-10: David Anderson
* dwarf_elf_access.c: Now allows for .rel and .rela.
* dwarf_elf_defines.h: Now allows for .rel and .rela.
* dwarf_init_finish.c: Now allows for .rel and .rela.
* dwarf_opaque.h: Adding dss_is_rela so we can
process .rel. sections too.
2020-01-25: David Anderson
* dwarf_form.c: DW_FORM_rnglistx was ommitted from a switch statement.
Adding it in fixed the resulting errors in a DWARF5 object file
built by clang 9.0.0.0
2020-01-16: David Anderson
* dwarf_alloc.c,dwarf_die_deliv.c,dwarf_form.a,
dwarf_query.c,dwarfstring.c,
pro_reloc.c,pro_reloc_stream.c,pro_reloc_symbolic.c,
pro_section.c,pro_types.c,pro_vars.c,pro_weaks.c,
test_dwarfstring.c: Fixed indentations and
removed trailing whitespace.
* dwarf_xu_index.c: Ensure local Dwarf_Sig8 variables
are always initialized. Does not fix any bug but
does make it easier to read the code.
Fixes indentation and removes trailing whitespace too.
2020-01-14: David Anderson
* dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
dwarf_names_new.h,libdwarf_version.h: Updated version string.
2020-01-05: David Anderson
* dwarf_query.c(dwarf_offset_list): Coverity Scan CID 206598.
Now checks for DW_DLV_ERROR where it failed to do so before,
and returns an error instead of letting it slip through.
2020-01-03: David Anderson
* dwarf_load_elf_headers.c(dwarf_elf_load_rela_32):
Coverity Scan uncovered a memory leak in one
case. CID 206524
|