Re: [PATCH] gcov: Add __gcov_info_to_gdca()

2021-07-13 Thread Sebastian Huber
On 13/07/2021 15:03, Sebastian Huber wrote: memset (list_sizes, 0, counters * sizeof (unsigned)); Sorry, I just realized that memset() cannot be used if inhibit_libc is defined. I will send a v2 of the patch. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim

[PATCH] gcov: Add __gcov_info_to_gdca()

2021-07-13 Thread Sebastian Huber
Add __gcov_info_to_gcda() to libgcov to get the gcda data for a gcda info in a free-standing environment. It is intended to be used with the -fprofile-info-section option. A crude test program which doesn't use a linker script is (use "gcc -coverage -fprofile-info-section -lgcc test.c" to

Re: [PATCH] gcov: Add __gcov_info_to_gdca()

2020-11-23 Thread Martin Liška
On 11/23/20 3:50 PM, Sebastian Huber wrote: On 23/11/2020 15:49, Martin Liška wrote: On 11/23/20 3:35 PM, Sebastian Huber wrote: 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. Yes, please build your patches on

Re: [PATCH] gcov: Add __gcov_info_to_gdca()

2020-11-23 Thread Sebastian Huber
On 23/11/2020 15:49, Martin Liška wrote: On 11/23/20 3:35 PM, Sebastian Huber wrote: 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. Yes, please build your patches on top of the file buffering removal. Ok. This

Re: [PATCH] gcov: Add __gcov_info_to_gdca()

2020-11-23 Thread Martin Liška
On 11/23/20 3:35 PM, Sebastian Huber wrote: 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. Yes, please build your patches on top of the file buffering removal. This would avoid some duplicated code, however, it

Re: [PATCH] gcov: Add __gcov_info_to_gdca()

2020-11-23 Thread Sebastian Huber
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

Re: [PATCH] gcov: Add __gcov_info_to_gdca()

2020-11-23 Thread Martin Liška
On 11/17/20 10:57 AM, Sebastian Huber wrote: This is a proposal to get the gcda data for a gcda info in a free-standing environment. It is intended to be used with the -fprofile-info-section option. A crude test program which doesn't use a linker script is: #include #include extern

Re: [PATCH] gcov: Add __gcov_info_to_gdca()

2020-11-23 Thread Martin Liška
On 11/23/20 1:25 PM, Sebastian Huber wrote: On 20/11/2020 17:14, Sebastian Huber wrote: On 20/11/2020 16:25, Martin Liška wrote: Apart from these 2 hooks, I bet you will also need gcov_position and gcov_seek functions, can be seen in my sent patch. For what do I need them? I prefer the

Re: [PATCH] gcov: Add __gcov_info_to_gdca()

2020-11-23 Thread Sebastian Huber
On 20/11/2020 17:14, Sebastian Huber wrote: On 20/11/2020 16:25, Martin Liška wrote: Apart from these 2 hooks, I bet you will also need gcov_position and gcov_seek functions, can be seen in my sent patch. For what do I need them? I prefer the way with the 2 extra hooks. Can you please

Re: [PATCH] gcov: Add __gcov_info_to_gdca()

2020-11-20 Thread Sebastian Huber
On 20/11/2020 16:25, Martin Liška wrote: Apart from these 2 hooks, I bet you will also need gcov_position and gcov_seek functions, can be seen in my sent patch. For what do I need them? I prefer the way with the 2 extra hooks. Can you please prepare a patch where the newly added functions

Re: [PATCH] gcov: Add __gcov_info_to_gdca()

2020-11-20 Thread Martin Liška
On 11/20/20 11:11 AM, Sebastian Huber wrote: On 20/11/2020 10:49, Martin Liška wrote: On 11/20/20 10:25 AM, Sebastian Huber wrote: On 20/11/2020 09:37, Martin Liška wrote: On 11/17/20 10:57 AM, Sebastian Huber wrote: This is a proposal to get the gcda data for a gcda info in a

Re: [PATCH] gcov: Add __gcov_info_to_gdca()

2020-11-20 Thread Sebastian Huber
On 20/11/2020 10:49, Martin Liška wrote: On 11/20/20 10:25 AM, Sebastian Huber wrote: On 20/11/2020 09:37, Martin Liška wrote: On 11/17/20 10:57 AM, Sebastian Huber wrote: This is a proposal to get the gcda data for a gcda info in a free-standing environment.  It is intended to be used with

Re: [PATCH] gcov: Add __gcov_info_to_gdca()

2020-11-20 Thread Martin Liška
On 11/20/20 10:25 AM, Sebastian Huber wrote: On 20/11/2020 09:37, Martin Liška wrote: On 11/17/20 10:57 AM, Sebastian Huber wrote: This is a proposal to get the gcda data for a gcda info in a free-standing environment.  It is intended to be used with the -fprofile-info-section option. A crude

Re: [PATCH] gcov: Add __gcov_info_to_gdca()

2020-11-20 Thread Sebastian Huber
On 20/11/2020 09:37, Martin Liška wrote: On 11/17/20 10:57 AM, Sebastian Huber wrote: This is a proposal to get the gcda data for a gcda info in a free-standing environment.  It is intended to be used with the -fprofile-info-section option. A crude test program which doesn't use a linker

Re: [PATCH] gcov: Add __gcov_info_to_gdca()

2020-11-20 Thread Martin Liška
On 11/17/20 10:57 AM, Sebastian Huber wrote: This is a proposal to get the gcda data for a gcda info in a free-standing environment. It is intended to be used with the -fprofile-info-section option. A crude test program which doesn't use a linker script is: Hello. I'm not pretty sure how

[PATCH] gcov: Add __gcov_info_to_gdca()

2020-11-17 Thread Sebastian Huber
This is a proposal to get the gcda data for a gcda info in a free-standing environment. It is intended to be used with the -fprofile-info-section option. A crude test program which doesn't use a linker script is: #include #include extern const struct gcov_info *my_info; static void