<div dir="ltr">Hello,<div><br></div><div>I am getting compilation issues while trying to print bit field values with LTTng.</div><div><br></div><div>Error:</div><div><br></div><div><div>hello.c: In function ‘main’:</div><div>hello.c:36:1: error: ‘typeof’ applied to a bit-field</div><div>hello.c:36:1: error: ‘typeof’ applied to a bit-field</div><div>hello.c:36:1: error: ‘typeof’ applied to a bit-field</div><div>hello.c:36:1: error: ‘sizeof’ applied to a bit-field</div></div><div><br></div><div>Snippet:</div><div><br></div><div><div>struct abc{</div><div>        int a:16;</div><div>        int b:8;</div><div>};</div></div><div><br></div><div>Line 36: tracepoint(hello_world, my_third_tracepoint, aa.a, "welcome");<br></div><div>Line 37: printf("val = %x\n",aa.a);<br></div><div><br></div><div>tracepoint line results in compilation error.</div><div>printf succeeds. </div><div><br></div><div>Tp definition looks like this.</div><div><br></div><div><div>TRACEPOINT_EVENT(</div><div>    hello_world,</div><div>    my_third_tracepoint,</div><div>    TP_ARGS(</div><div>        uint32_t, arg,</div><div>        const char * , my_string_arg</div><div>    ),</div><div>    TP_FIELDS(</div><div>        ctf_integer_hex(uint32_t, my_arg, arg)</div><div>        ctf_string(field, my_string_arg)</div><div>    )</div><div>)</div></div><div><br></div><div>How to print bit field values?</div><div><br></div><div>Thanks</div><div>Chid</div></div>