On 7/23/21 9:06 AM, Sebastian Huber wrote:
On 23/07/2021 08:52, Martin Liška wrote:
+#ifdef NEED_L_GCOV_INFO_TO_GCDA
+/* Convert the gcov info to a gcda data stream. It is intended for
+ free-standing environments which do not support the C library file I/O. */
+
+void
+__gcov_info_to_gcda (const struct gcov_info *gi_ptr,
+ void (*filename) (const char *, void *),
What about begin_finaname_fn?
+ void (*dump) (const void *, unsigned, void *),
+ void *(*allocate) (unsigned, void *),
+ void *arg)
+{
+ (*filename) (gi_ptr->filename, arg);
+ write_one_data (gi_ptr, NULL, dump, allocate, arg);
+}
+#endif /* NEED_L_GCOV_INFO_TO_GCDA */
About gcov_write_summary: it should be also dumped in order to have a complete
.gcda file, right?
How can I get access to the summary information? Here it is not available:
You only need to change gcov_write_summary in gcov-io.c.
Sorry, I still don't know how I can get the summary information if I only have
a pointer to the gcov_info structure which does not contain a summary member.
You're right, sorry! But in your case, it will be simple to re-created it by
the script at a host system.
gcov_write_summary (gcov_unsigned_t tag, const struct gcov_summary *summary)
{
gcov_write_tag_length (tag, GCOV_TAG_SUMMARY_LENGTH);
gcov_write_unsigned (summary->runs);
gcov_write_unsigned (summary->sum_max);
}
Where summary->runs will be 1 and sum_max is maximum counter during the run.
Cheers,
Martin