Hello Martin,
On 23/11/2020 15:30, Martin Liška wrote:
+/* Convert the gcov info to a gcda data stream. This function does
not support
+ whole program statistics and top counters. It is intended for
free-standing
+ environments which do not support the C library file I/O. For the
data
+ format, see also write_one_data(). */
+
+void
+__gcov_info_to_gcda (const struct gcov_info *gi_ptr,
+ void (*filename) (const char *, void *),
+ void (*dump) (const void *, unsigned, void *),
+ void *arg)
Hello.
I would prefer a better names for the hooks. What about something like
open_filename_hook and write_data_hook?
+{
+ (*filename) (gi_ptr->filename, arg);
+ gcov_unsigned_t word = GCOV_DATA_MAGIC;
+ (*dump) (&word, sizeof (word), arg);
And I would add a new macro like
#define GCOV_WRITE_DATA(data) (*write_data_hook) (&DATA, sizeof
(DATA), arg
What do you think?
sounds good.
Note that we already entered a code freeze before the patch was sent
to the mailing list.
That means we can install it in the next stage1.
If I have to wait for next stage 1, I can also try to refactor
write_one_data() after your patch which removes the buffering. This
would avoid some duplicated code, however, it would require some changes
in existing code. Is it allowed to remove external (hidden?) symbols
from libgcov?
--
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax: +49-89-18 94 741 - 08
PGP: Public key available on request.
embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/