GSoC Project | Basic Support for Trace Compass

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Aug 8 06:50:03 UTC 2019


On 08/08/2019 08:43, Ravindra Kumar Meena wrote:
>     No, not a typedef. Something like this:
> 
>     diff --git a/misc/record/record-main.c b/misc/record/record-main.c
>     index 314bb78..b5d1a66 100644
>     --- a/misc/record/record-main.c
>     +++ b/misc/record/record-main.c
>     @@ -422,19 +422,28 @@ static rtems_record_client_status handler(
>          return RTEMS_RECORD_CLIENT_SUCCESS;
>        }
> 
>     +static const char metadata[] =
>     +"/* CTF 1.8 */\n"
>     +"\n"
>     +"typealias integer { size = 5; align = 1; signed = false; } :=
>     uint5_t;\n"
>     +"typealias integer { size = 8; align = 8; signed = false; } :=
>     uint8_t;\n"
>     +"typealias integer { size = 32; align = 8; signed = false; } :=
>     uint32_t;\n"
>     +"typealias integer { size = 64; align = 8; signed = false; } :=
>     uint64_t;\n"
>     +"typealias integer { size = 64; align = 8; signed = false; } :=
>     unsigned long;\n";
>     +
>        void generate_metadata(){
>     -  FILE *metadata = fopen("metadata","w");
>     +  FILE *file = fopen("metadata","w");
>          assert( metadata !=  NULL );
> 
>     -  fprintf(metadata, "/* CTF 1.8 */\n\n");
>     -  fprintf(metadata, "typealias integer { size = 5; align = 1; signed =
>     false; } := uint5_t;\
>     +  fwrite( metadata, sizeof( metadata ), 1, file );
> 
> Okay.
> https://github.com/rmeena840/rtems-tools/commit/6ee5468224d70eda4147fb7739571ea91eac7b9c 
> 
> 
> Should I include whole metadata content in that char metadata[]?

Yes, if everything is constant.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list