MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / read_function_info

Function read_function_info

Source/ThirdParty/tracy/libbacktrace/dwarf.cpp:3821–3901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3819 through the whole unit looking for function tags. */
3820
3821static void
3822read_function_info (struct backtrace_state *state, struct dwarf_data *ddata,
3823 const struct line_header *lhdr,
3824 backtrace_error_callback error_callback, void *data,
3825 struct unit *u, struct function_vector *fvec,
3826 struct function_addrs **ret_addrs,
3827 size_t *ret_addrs_count)
3828{
3829 struct function_vector lvec;
3830 struct function_vector *pfvec;
3831 struct dwarf_buf unit_buf;
3832 struct function_addrs *p;
3833 struct function_addrs *addrs;
3834 size_t addrs_count;
3835
3836 /* Use FVEC if it is not NULL. Otherwise use our own vector. */
3837 if (fvec != NULL)
3838 pfvec = fvec;
3839 else
3840 {
3841 memset (&lvec, 0, sizeof lvec);
3842 pfvec = &lvec;
3843 }
3844
3845 unit_buf.name = ".debug_info";
3846 unit_buf.start = ddata->dwarf_sections.data[DEBUG_INFO];
3847 unit_buf.buf = u->unit_data;
3848 unit_buf.left = u->unit_data_len;
3849 unit_buf.is_bigendian = ddata->is_bigendian;
3850 unit_buf.error_callback = error_callback;
3851 unit_buf.data = data;
3852 unit_buf.reported_underflow = 0;
3853
3854 while (unit_buf.left > 0)
3855 {
3856 if (!read_function_entry (state, ddata, u, 0, &unit_buf, lhdr,
3857 error_callback, data, pfvec, pfvec))
3858 return;
3859 }
3860
3861 if (pfvec->count == 0)
3862 return;
3863
3864 /* Allocate a trailing entry, but don't include it in
3865 pfvec->count. */
3866 p = ((struct function_addrs *)
3867 backtrace_vector_grow (state, sizeof (struct function_addrs),
3868 error_callback, data, &pfvec->vec));
3869 if (p == NULL)
3870 return;
3871 p->low = 0;
3872 --p->low;
3873 p->high = p->low;
3874 p->function = NULL;
3875
3876 addrs_count = pfvec->count;
3877
3878 if (fvec == NULL)

Callers 1

dwarf_lookup_pcFunction · 0.85

Calls 6

memsetFunction · 0.85
read_function_entryFunction · 0.85
backtrace_vector_growFunction · 0.85
backtrace_vector_releaseFunction · 0.85
backtrace_vector_finishFunction · 0.85
backtrace_qsortFunction · 0.85

Tested by

no test coverage detected