Home | History | Annotate | Download | only in libsframe

Lines Matching refs:fre

76    some checks on the FRE start address.
258 /* Get the FRE start address size, given the FRE_TYPE. */
330 includes the starting address, FRE info, and all the offsets. */
401 /* For FDEs for repetitive pattern of insns, we need to return the FRE
424 /* Advance the buffer pointer to where the FRE info is. */
428 /* FRE info is uint8_t. No need to flip. */
562 /* Get IDX'th offset from FRE. Set errp as applicable. */
565 sframe_get_fre_offset (sframe_frame_row_entry *fre, int idx, int *errp)
569 if (fre == NULL || !sframe_fre_sanity_check_p (fre))
572 offset_cnt = sframe_fre_get_offset_count (fre->fre_info);
573 offset_size = sframe_fre_get_offset_size (fre->fre_info);
583 int8_t *sp = (int8_t *)fre->fre_offsets;
588 int16_t *sp = (int16_t *)fre->fre_offsets;
593 int32_t *ip = (int32_t *)fre->fre_offsets;
647 /* Get the FRE type given the function size. */
665 /* Get the base reg id from the FRE info. Set errp if failure. */
668 sframe_fre_get_base_reg_id (sframe_frame_row_entry *fre, int *errp)
670 if (fre == NULL)
673 uint8_t fre_info = fre->fre_info;
677 /* Get the CFA offset from the FRE. If the offset is invalid, sets errp. */
681 sframe_frame_row_entry *fre, int *errp)
683 return sframe_get_fre_offset (fre, SFRAME_FRE_CFA_OFFSET_IDX, errp);
686 /* Get the FP offset from the FRE. If the offset is invalid, sets errp. */
690 sframe_frame_row_entry *fre, int *errp)
710 return sframe_get_fre_offset (fre, fp_offset_idx, errp);
713 /* Get the RA offset from the FRE. If the offset is invalid, sets errp. */
717 sframe_frame_row_entry *fre, int *errp)
729 /* Otherwise, get the RA offset from the FRE. */
730 return sframe_get_fre_offset (fre, SFRAME_FRE_RA_OFFSET_IDX, errp);
737 sframe_frame_row_entry *fre, int *errp)
739 if (fre == NULL || !sframe_fre_sanity_check_p (fre))
742 return sframe_get_fre_ra_mangled_p (fre->fre_info);
758 /* Decode the SFrame FRE start address offset value from FRE_BUF in on-disk
802 /* Decode a frame row entry FRE which starts at location FRE_BUF. The function
803 updates ESZ to the size of the FRE as stored in the binary format.
810 sframe_decode_fre (const char *fre_buf, sframe_frame_row_entry *fre,
819 if (fre_buf == NULL || fre == NULL || esz == NULL)
822 /* Copy over the FRE start address. */
823 sframe_decode_fre_start_address (fre_buf, &fre->fre_start_addr, fre_type);
826 fre->fre_info = *(uint8_t *)(fre_buf + addr_size);
828 sframe_assert (sizeof (fre->fre_info) == sizeof (uint8_t));
832 memset (fre->fre_offsets, 0, MAX_OFFSET_BYTES);
834 stack_offsets_sz = sframe_fre_offset_bytes_size (fre->fre_info);
835 stack_offsets = fre_buf + addr_size + sizeof (fre->fre_info);
836 memcpy (fre->fre_offsets, stack_offsets, stack_offsets_sz);
838 /* The FRE has been decoded. Use it to perform one last sanity check. */
839 fre_size = sframe_fre_entry_size (fre, fre_type);
840 sframe_assert (fre_size == (addr_size + sizeof (fre->fre_info)
958 debug_printf ("%u total fre bytes\n", fre_bytes);
1080 /* Get the end IP offset for the FRE at index i in the FDEP. The buffer FRES
1081 is the starting location for the FRE. */
1092 /* Get the start address of the next FRE in sequence. */
1099 /* The end IP offset for the FRE needs to be deduced from the function
1127 /* Find the FDE which contains the PC, then scan its fre entries. */
1148 /* First FRE's start_ip must be more than pc for regular SFrame FDEs. */
1240 /* Get the FRE_IDX'th FRE of the function at FUNC_IDX'th function
1248 sframe_frame_row_entry *fre)
1258 if (ctx == NULL || fre == NULL)
1268 /* Now scan the FRE entries. */
1272 /* Decode the FRE at the current position. Return it if valid. */
1279 sframe_frame_row_entry_copy (fre, &ifre);
1282 sframe_assert (fre->fre_start_addr < fdep->sfde_func_size);
1285 sframe_assert (fre->fre_start_addr == fdep->sfde_func_size);
1289 /* Next FRE. */
1434 /* Add an FRE to function at FUNC_IDX'th function descriptor entry in
1660 /* Write the SFrame FRE start address from the in-memory FRE_START_ADDR
1715 /* The FRE start address must be encodable in the available number of
1782 /* Write out the FRE table first.
1785 FDE; the latter stores the information about the FRE type record used for
1787 in which FREs are stored in the SFrame's FRE sub-section. This means
1868 Entries section and the FRE section. */
1878 /* SFrame FRE section follows immediately after the SFrame FDE section. */
1884 /* Write out the FDE Index and the FRE table in the sfe_data. */