<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> <br>
> Have made changes. Simplified the code.<br>
> <a href="https://github.com/rmeena840/rtems-tools/commit/9e09be40db85e4e903118f8eb5eb1ea1e41baf46" rel="noreferrer" target="_blank">https://github.com/rmeena840/rtems-tools/commit/9e09be40db85e4e903118f8eb5eb1ea1e41baf46</a><br>
<br>
Yes, this moves into the right direction:<br>
<br>
+ for( i = 0; i < THREAD_NAME_SIZE - 1; i++ ){<br>
+ if( cctx->thread_names[ api_id ][ thread_id ][ i ] == 0x00 ){<br>
+ cctx->thread_names[ api_id ][ thread_id ][ i ] = ( <br>
thread_name & 0xff );<br>
+ thread_name = ( thread_name >> 8 );<br>
+ }<br>
+ }<br>
<br>
On a 32-bit target you may get up to 4 RTEMS_RECORD_THREAD_NAME events, <br>
on a 64-bit target you may get up to 2 RTEMS_RECORD_THREAD_NAME events.<br>
<br>
Your code overwrites the data from previous name events and only the <br>
last one is visible. You have to add the name index (i) to thread_id_name.<br></blockquote><div>The overwrites thing is taken care of by :</div><div>if( cctx->thread_names[ api_id ][ thread_id ][ i ] == 0x00 )</div><div><br></div><div>If thread_name is received for the same api_id and thread_id then it will write only in empty char position.</div><div>I checked the value with the provided output. The value is the same but in reverse order.</div></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font size="4"><b>Ravindra Kumar Meena</b></font>,<div><span style="color:rgb(102,102,102)">B. Tech. Computer Science and Engineering,<br></span></div><div><span style="color:rgb(102,102,102)"><a href="https://www.iitism.ac.in/" style="color:rgb(17,85,204)" target="_blank">Indian Institute of Technology (Indian School of Mines)</a>, Dhanbad</span></div></div></div></div></div></div>