Lines Matching refs:readp
4528 ptrdiff_t offset, unsigned char **readp, unsigned char *endp)
4539 || p->offset >= (Dwarf_Off) (endp - *readp + offset))
4541 *readp = endp;
4549 *readp += p->offset - offset;
4718 unsigned char *readp = data->d_buf;
4719 while (readp < endp)
4721 ptrdiff_t offset = readp - (unsigned char *) data->d_buf;
4725 offset, &readp, endp))
4738 begin = read_8ubyte_unaligned_inc (dbg, readp);
4739 end = read_8ubyte_unaligned_inc (dbg, readp);
4743 begin = read_4ubyte_unaligned_inc (dbg, readp);
4744 end = read_4ubyte_unaligned_inc (dbg, readp);
4809 print_cfa_program (const unsigned char *readp, const unsigned char *const endp,
4824 while (readp < endp)
4826 unsigned int opcode = *readp++;
4842 get_uleb128 (op1, readp);
4848 *readp, pc += *readp * code_align);
4849 ++readp;
4852 op1 = read_2ubyte_unaligned_inc (dbg, readp);
4857 op1 = read_4ubyte_unaligned_inc (dbg, readp);
4863 get_uleb128 (op1, readp);
4864 get_uleb128 (op2, readp);
4871 get_uleb128 (op1, readp);
4877 get_uleb128 (op1, readp);
4882 get_uleb128 (op1, readp);
4887 get_uleb128 (op1, readp);
4888 get_uleb128 (op2, readp);
4900 get_uleb128 (op1, readp);
4901 get_uleb128 (op2, readp);
4907 get_uleb128 (op1, readp);
4913 get_uleb128 (op1, readp);
4918 get_uleb128 (op1, readp); /* Length of DW_FORM_block. */
4920 print_ops (dwflmod, dbg, 10, 10, version, ptr_size, 0, op1, readp);
4921 readp += op1;
4925 get_uleb128 (op1, readp);
4926 get_uleb128 (op2, readp); /* Length of DW_FORM_block. */
4929 print_ops (dwflmod, dbg, 10, 10, version, ptr_size, 0, op2, readp);
4930 readp += op2;
4934 get_uleb128 (op1, readp);
4935 get_sleb128 (sop2, readp);
4942 get_uleb128 (op1, readp);
4943 get_sleb128 (sop2, readp);
4949 get_sleb128 (sop1, readp);
4954 get_uleb128 (op1, readp);
4955 get_uleb128 (op2, readp);
4961 get_uleb128 (op1, readp);
4962 get_sleb128 (sop2, readp);
4968 get_uleb128 (op1, readp);
4969 get_uleb128 (op2, readp); /* Length of DW_FORM_block. */
4972 print_ops (dwflmod, dbg, 10, 10, version, ptr_size, 0, op2, readp);
4973 readp += op2;
4976 op1 = read_8ubyte_unaligned_inc (dbg, readp);
4985 get_uleb128 (op1, readp);
4999 get_uleb128 (offset, readp);
5126 read_encoded (unsigned int encoding, const unsigned char *readp,
5137 get_uleb128 (*res, readp);
5141 get_sleb128 (*res, readp);
5144 if (readp + 2 > endp)
5146 *res = read_2ubyte_unaligned_inc (dbg, readp);
5149 if (readp + 4 > endp)
5151 *res = read_4ubyte_unaligned_inc (dbg, readp);
5154 if (readp + 8 > endp)
5156 *res = read_8ubyte_unaligned_inc (dbg, readp);
5159 if (readp + 2 > endp)
5161 *res = read_2sbyte_unaligned_inc (dbg, readp);
5164 if (readp + 4 > endp)
5166 *res = read_4sbyte_unaligned_inc (dbg, readp);
5169 if (readp + 8 > endp)
5171 *res = read_8sbyte_unaligned_inc (dbg, readp);
5179 return readp;
5223 const unsigned char *readp = data->d_buf;
5226 while (readp < dataend)
5228 if (unlikely (readp + 4 > dataend))
5238 ptrdiff_t offset = readp - (unsigned char *) data->d_buf;
5240 Dwarf_Word unit_length = read_4ubyte_unaligned_inc (dbg, readp);
5244 if (unlikely (readp + 8 > dataend))
5247 unit_length = read_8ubyte_unaligned_inc (dbg, readp);
5259 ptrdiff_t start = readp - (unsigned char *) data->d_buf;
5260 const unsigned char *const cieend = readp + unit_length;
5261 if (unlikely (cieend > dataend || readp + 8 > dataend))
5267 cie_id = read_4ubyte_unaligned_inc (dbg, readp);
5272 cie_id = read_8ubyte_unaligned_inc (dbg, readp);
5284 version = *readp++;
5285 const char *const augmentation = (const char *) readp;
5286 readp = memchr (readp, '\0', cieend - readp);
5287 if (unlikely (readp == NULL))
5289 ++readp;
5294 if (cieend - readp < 5)
5296 ptr_size = *readp++;
5297 segment_size = *readp++;
5301 get_uleb128 (code_alignment_factor, readp);
5303 get_sleb128 (data_alignment_factor, readp);
5307 readp += ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8;
5311 return_address_register = *readp++;
5314 get_uleb128 (return_address_register, readp);
5335 get_uleb128 (augmentationlen, readp);
5337 if (augmentationlen > (size_t) (dataend - readp))
5344 printf (" %-26s%#x ", hdr, *readp);
5349 fde_encoding = *readp++;
5355 lsda_encoding = *readp++;
5363 const unsigned char *startp = readp;
5364 unsigned int encoding = *readp++;
5366 readp = read_encoded (encoding, readp,
5367 readp - 1 + augmentationlen,
5370 while (++startp < readp)
5389 printf ("(%x)\n", *readp++);
5432 const unsigned char *base = readp;
5434 initial_location = read_ubyte_unaligned_inc (ptr_size, dbg, readp);
5436 = read_ubyte_unaligned_inc (ptr_size, dbg, readp);
5471 get_uleb128 (augmentationlen, readp);
5484 = read_encoded (lsda_encoding, &readp[u],
5485 &readp[augmentationlen],
5487 u = p - readp;
5498 printf (" %-26s%#x\n", hdr, readp[u++]);
5503 readp += augmentationlen;
5508 print_cfa_program (readp, cieend, vma_base, code_alignment_factor,
5511 readp = cieend;
6495 unsigned char *readp = data->d_buf;
6497 while (readp < endp)
6499 ptrdiff_t offset = readp - (unsigned char *) data->d_buf;
6503 offset, &readp, endp))
6516 begin = read_8ubyte_unaligned_inc (dbg, readp);
6517 end = read_8ubyte_unaligned_inc (dbg, readp);
6521 begin = read_4ubyte_unaligned_inc (dbg, readp);
6522 end = read_4ubyte_unaligned_inc (dbg, readp);
6542 uint_fast16_t len = read_2ubyte_unaligned_inc (dbg, readp);
6555 if (endp - readp <= (ptrdiff_t) len)
6562 3 /*XXX*/, address_size, offset_size, len, readp);
6565 readp += len;
6662 const unsigned char *readp = (const unsigned char *) data->d_buf;
6663 const unsigned char *readendp = readp + data->d_size;
6666 while (readp < readendp)
6668 unsigned int opcode = *readp++;
6683 get_uleb128 (u128, readp);
6685 endp = memchr (readp, '\0', readendp - readp);
6696 level, "", (char *) readp, u128);
6699 level, "", (char *) readp, u128);
6701 printf (" #vendor-ext %s, number %u\n", (char *) readp, u128);
6703 readp = endp + 1;
6708 get_uleb128 (u128, readp);
6709 get_uleb128 (u128_2, readp);
6712 size_t macoff = readp - (const unsigned char *) data->d_buf;
6741 if (unlikely (opcode != 0 || readp != readendp))
6843 const unsigned char *readp = data->d_buf;
6847 if (unlikely (readp + 4 > dataend))
6854 unsigned int version = *readp++;
6855 unsigned int eh_frame_ptr_enc = *readp++;
6856 unsigned int fde_count_enc = *readp++;
6857 unsigned int table_enc = *readp++;
6871 readp = read_encoded (eh_frame_ptr_enc, readp, dataend, &eh_frame_ptr,
6873 if (unlikely (readp == NULL))
6888 readp = read_encoded (fde_count_enc, readp, dataend, &fde_count, dbg);
6889 if (unlikely (readp == NULL))
6902 while (fde_count > 0 && readp + 8 <= dataend)
6904 int32_t initial_location = read_4sbyte_unaligned_inc (dbg, readp);
6907 int32_t address = read_4sbyte_unaligned_inc (dbg, readp);
6915 while (0 && readp < dataend)
6945 const unsigned char *readp = data->d_buf;
6946 const unsigned char *const dataend = readp + data->d_size;
6948 if (unlikely (readp + 1 > dataend))
6954 unsigned int lpstart_encoding = *readp++;
6960 readp = read_encoded (lpstart_encoding, readp, dataend, &lpstart, dbg);
6964 if (unlikely (readp + 1 > dataend))
6966 unsigned int ttype_encoding = *readp++;
6973 get_uleb128 (ttype_base_offset, readp);
6975 ttype_base = readp + ttype_base_offset;
6978 if (unlikely (readp + 1 > dataend))
6980 unsigned int call_site_encoding = *readp++;
6984 get_uleb128 (call_site_table_len, readp);
6986 const unsigned char *const action_table = readp + call_site_table_len;
6991 while (readp < action_table)
6997 readp = read_encoded (call_site_encoding, readp, dataend,
7000 readp = read_encoded (call_site_encoding, readp, dataend,
7003 readp = read_encoded (call_site_encoding, readp, dataend,
7006 get_uleb128 (action, readp);
7014 assert (readp == action_table);
7028 get_sleb128 (ar_filter, readp);
7032 get_sleb128 (ar_disp, readp);
7045 while (readp < action_table_end);
7057 readp = ttype_base - max_ar_filter * 2;
7061 readp = ttype_base - max_ar_filter * 4;
7065 readp = ttype_base - max_ar_filter * 8;
7074 readp = read_encoded (ttype_encoding, readp, ttype_base, &ttype,
7078 while (readp < ttype_base);
7107 const unsigned char *readp = data->d_buf;
7108 const unsigned char *const dataend = readp + data->d_size;
7110 if (unlikely (readp + 4 > dataend))
7117 int32_t vers = read_4ubyte_unaligned (dbg, readp);
7128 readp += 4;
7129 if (unlikely (readp + 4 > dataend))
7132 uint32_t cu_off = read_4ubyte_unaligned (dbg, readp);
7135 readp += 4;
7136 if (unlikely (readp + 4 > dataend))
7139 uint32_t tu_off = read_4ubyte_unaligned (dbg, readp);
7142 readp += 4;
7143 if (unlikely (readp + 4 > dataend))
7146 uint32_t addr_off = read_4ubyte_unaligned (dbg, readp);
7149 readp += 4;
7150 if (unlikely (readp + 4 > dataend))
7153 uint32_t sym_off = read_4ubyte_unaligned (dbg, readp);
7156 readp += 4;
7157 if (unlikely (readp + 4 > dataend))
7160 uint32_t const_off = read_4ubyte_unaligned (dbg, readp);
7163 readp = data->d_buf + cu_off;
7166 size_t nr = (nextp - readp) / 16;
7173 while (readp + 16 <= dataend && n < nr)
7175 uint64_t off = read_8ubyte_unaligned (dbg, readp);
7176 readp += 8;
7178 uint64_t len = read_8ubyte_unaligned (dbg, readp);
7179 readp += 8;
7186 readp = data->d_buf + tu_off;
7188 nr = (nextp - readp) / 24;
7195 while (readp + 24 <= dataend && n < nr)
7197 uint64_t off = read_8ubyte_unaligned (dbg, readp);
7198 readp += 8;
7200 uint64_t type = read_8ubyte_unaligned (dbg, readp);
7201 readp += 8;
7203 uint64_t sig = read_8ubyte_unaligned (dbg, readp);
7204 readp += 8;
7212 readp = data->d_buf + addr_off;
7214 nr = (nextp - readp) / 20;
7221 while (readp + 20 <= dataend && n < nr)
7223 uint64_t low = read_8ubyte_unaligned (dbg, readp);
7224 readp += 8;
7226 uint64_t high = read_8ubyte_unaligned (dbg, readp);
7227 readp += 8;
7229 uint32_t idx = read_4ubyte_unaligned (dbg, readp);
7230 readp += 4;
7239 readp = data->d_buf + sym_off;
7241 nr = (nextp - readp) / 8;
7248 while (readp + 8 <= dataend && n < nr)
7250 uint32_t name = read_4ubyte_unaligned (dbg, readp);
7251 readp += 4;
7253 uint32_t vector = read_4ubyte_unaligned (dbg, readp);
7254 readp += 4;