? all.patch
? ciePtr.patch
? encrypt.patch
? gdb72.config
? gdb72.creator
? gdb72.creator.user
? gdb72.files
? gdb72.includes
? mac.patch
? machoMmap.patch
? printf.patch
? printf2.patch
? rest.patch
? routines.patch
RCS file: /cvs/src/src/bfd/mach-o.c,v
retrieving revision 1.56
diff -u -r1.56 mach-o.c
|
|
|
2524 | 2524 | case BFD_MACH_O_LC_FVMFILE: |
2525 | 2525 | case BFD_MACH_O_LC_PREPAGE: |
2526 | 2526 | case BFD_MACH_O_LC_ROUTINES: |
| 2527 | case BFD_MACH_O_LC_ROUTINES_64: |
2527 | 2528 | break; |
2528 | 2529 | case BFD_MACH_O_LC_SUB_FRAMEWORK: |
2529 | 2530 | case BFD_MACH_O_LC_SUB_UMBRELLA: |
RCS file: /cvs/src/src/gdb/dwarf2-frame.c,v
retrieving revision 1.113.2.1
diff -u -r1.113.2.1 dwarf2-frame.c
|
|
|
1654 | 1654 | #define DW64_CIE_ID ~0 |
1655 | 1655 | #endif |
1656 | 1656 | |
| 1657 | enum eh_frame_type{ |
| 1658 | eh_cie_type_id=1, |
| 1659 | eh_fde_type_id=2, |
| 1660 | eh_cie_or_fde_type_id=3 |
| 1661 | }; |
| 1662 | |
1657 | 1663 | static gdb_byte *decode_frame_entry (struct comp_unit *unit, gdb_byte *start, |
1658 | 1664 | int eh_frame_p, |
1659 | 1665 | struct dwarf2_cie_table *cie_table, |
1660 | | struct dwarf2_fde_table *fde_table); |
| 1666 | struct dwarf2_fde_table *fde_table, |
| 1667 | enum eh_frame_type entry_type); |
1661 | 1668 | |
1662 | 1669 | /* Decode the next CIE or FDE. Return NULL if invalid input, otherwise |
1663 | 1670 | the next byte to be processed. */ |
1664 | 1671 | static gdb_byte * |
1665 | 1672 | decode_frame_entry_1 (struct comp_unit *unit, gdb_byte *start, int eh_frame_p, |
1666 | 1673 | struct dwarf2_cie_table *cie_table, |
1667 | | struct dwarf2_fde_table *fde_table) |
| 1674 | struct dwarf2_fde_table *fde_table, enum eh_frame_type entry_type) |
1668 | 1675 | { |
1669 | 1676 | struct gdbarch *gdbarch = get_objfile_arch (unit->objfile); |
1670 | 1677 | gdb_byte *buf, *end; |
… |
… |
|
1715 | 1722 | char *augmentation; |
1716 | 1723 | unsigned int cie_version; |
1717 | 1724 | |
| 1725 | gdb_assert((entry_type & eh_cie_type_id)!=0); |
| 1726 | |
1718 | 1727 | /* Record the offset into the .debug_frame section of this CIE. */ |
1719 | 1728 | cie_pointer = start - unit->dwarf_frame_buffer; |
1720 | 1729 | |
… |
… |
|
1879 | 1888 | /* This is a FDE. */ |
1880 | 1889 | struct dwarf2_fde *fde; |
1881 | 1890 | |
| 1891 | gdb_assert((entry_type & eh_fde_type_id)!=0); |
| 1892 | |
1882 | 1893 | /* In an .eh_frame section, the CIE pointer is the delta between the |
1883 | 1894 | address within the FDE where the CIE pointer is stored and the |
1884 | 1895 | address of the CIE. Convert it to an offset into the .eh_frame |
… |
… |
|
1900 | 1911 | if (fde->cie == NULL) |
1901 | 1912 | { |
1902 | 1913 | decode_frame_entry (unit, unit->dwarf_frame_buffer + cie_pointer, |
1903 | | eh_frame_p, cie_table, fde_table); |
| 1914 | eh_frame_p, cie_table, fde_table,eh_cie_type_id); |
1904 | 1915 | fde->cie = find_cie (cie_table, cie_pointer); |
1905 | 1916 | } |
1906 | 1917 | |
… |
… |
|
1945 | 1956 | static gdb_byte * |
1946 | 1957 | decode_frame_entry (struct comp_unit *unit, gdb_byte *start, int eh_frame_p, |
1947 | 1958 | struct dwarf2_cie_table *cie_table, |
1948 | | struct dwarf2_fde_table *fde_table) |
| 1959 | struct dwarf2_fde_table *fde_table,enum eh_frame_type entry_type) |
1949 | 1960 | { |
1950 | 1961 | enum { NONE, ALIGN4, ALIGN8, FAIL } workaround = NONE; |
1951 | 1962 | gdb_byte *ret; |
… |
… |
|
1954 | 1965 | while (1) |
1955 | 1966 | { |
1956 | 1967 | ret = decode_frame_entry_1 (unit, start, eh_frame_p, |
1957 | | cie_table, fde_table); |
| 1968 | cie_table, fde_table,entry_type); |
1958 | 1969 | if (ret != NULL) |
1959 | 1970 | break; |
1960 | 1971 | |
… |
… |
|
2109 | 2120 | frame_ptr = unit->dwarf_frame_buffer; |
2110 | 2121 | while (frame_ptr < unit->dwarf_frame_buffer + unit->dwarf_frame_size) |
2111 | 2122 | frame_ptr = decode_frame_entry (unit, frame_ptr, 1, |
2112 | | &cie_table, &fde_table); |
| 2123 | &cie_table, &fde_table, eh_cie_or_fde_type_id); |
2113 | 2124 | |
2114 | 2125 | if (cie_table.num_entries != 0) |
2115 | 2126 | { |
… |
… |
|
2129 | 2140 | frame_ptr = unit->dwarf_frame_buffer; |
2130 | 2141 | while (frame_ptr < unit->dwarf_frame_buffer + unit->dwarf_frame_size) |
2131 | 2142 | frame_ptr = decode_frame_entry (unit, frame_ptr, 0, |
2132 | | &cie_table, &fde_table); |
| 2143 | &cie_table, &fde_table, eh_cie_or_fde_type_id); |
2133 | 2144 | } |
2134 | 2145 | |
2135 | 2146 | /* Discard the cie_table, it is no longer needed. */ |
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.409.2.5
diff -u -r1.409.2.5 dwarf2read.c
|
|
|
1359 | 1359 | |
1360 | 1360 | if (info->size > 4 * pagesize && (sectp->flags & SEC_RELOC) == 0) |
1361 | 1361 | { |
1362 | | off_t pg_offset = sectp->filepos & ~(pagesize - 1); |
1363 | | size_t map_length = info->size + sectp->filepos - pg_offset; |
| 1362 | off_t filePos = (off_t)sectp->filepos+((abfd->my_archive == NULL)?0:abfd->origin); |
| 1363 | off_t pg_offset = filePos & ~((off_t)pagesize - 1); |
| 1364 | size_t map_length = info->size + filePos - pg_offset; |
1364 | 1365 | caddr_t retbuf = bfd_mmap (abfd, 0, map_length, PROT_READ, |
1365 | 1366 | MAP_PRIVATE, pg_offset); |
1366 | 1367 | |
1367 | 1368 | if (retbuf != MAP_FAILED) |
1368 | 1369 | { |
1369 | 1370 | info->was_mmapped = 1; |
1370 | | info->buffer = retbuf + (sectp->filepos & (pagesize - 1)) ; |
| 1371 | info->buffer = retbuf + (filePos - pg_offset) ; |
1371 | 1372 | #if HAVE_POSIX_MADVISE |
1372 | 1373 | posix_madvise (retbuf, map_length, POSIX_MADV_WILLNEED); |
1373 | 1374 | #endif |