<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 21, 2020 at 1:27 PM Bran S <<a href="mailto:archsbran@gmail.com">archsbran@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 19 Feb 2020 at 22:51, Vijay Kumar Banerjee<br>
<<a href="mailto:vijaykumar9597@gmail.com" target="_blank">vijaykumar9597@gmail.com</a>> wrote:<br>
><br>
><br>
><br>
> On Mon, Feb 17, 2020 at 12:08 AM Bran S <<a href="mailto:archsbran@gmail.com" target="_blank">archsbran@gmail.com</a>> wrote:<br>
>><br>
>> Hi Guys,<br>
>><br>
> Hi Bran!<br>
>><br>
>> I am trying to understand and solve Ticket #3515.<br>
>> <a href="https://devel.rtems.org/ticket/3515" rel="noreferrer" target="_blank">https://devel.rtems.org/ticket/3515</a><br>
>><br>
>> $ /home/user45/quick-start/rtems/5/share/rtems/tester/bin/covoar -vvvv<br>
>> -S /home/user45/quick-start/rtems/5/share/rtems/tester/rtems/testing/coverage/leon3-sis-symbols.ini<br>
>> -O leon3-sis-coverage -E<br>
>> /home/user45/quick-start/rtems/5/share/rtems/tester/rtems/testing/coverage/Explanations.txt<br>
>> -p RTEMS-5 /home/user45/quick-start/build/b-leon3/sparc-rtems5/c/leon3/testsuites/fstests/fsclose01.exe<br>
>><br>
>> The output of the above command is at:<br>
>> <a href="https://gist.github.com/archsbran/7834a931d52311c7b26842c6325d8d9a" rel="noreferrer" target="_blank">https://gist.github.com/archsbran/7834a931d52311c7b26842c6325d8d9a</a><br>
>><br>
>> On the last line it can be seen that absence of `wait` symbol causes the error.<br>
>><br>
>> I made some changes in ExecutableInfo.cc to print out the symbols<br>
>> being added into coverageMap.<br>
>> Added symbols can be seen from line 636 to 7236 at the above link.<br>
>> In those lines we can see that `wait` is not added into coverageMap.<br>
>><br>
> Great work in finding the possible issue.<br>
>><br>
>> I am new so the only thing I know about covoar is that it does<br>
>> coverage analysis.<br>
>> Any ideas on how to move further into solving this ?<br>
><br>
> I added Chris in CC, he'll be able to tell us where to look for the source<br>
> of the error you found.<br>
> In general, you can follow covoar.cc file, which has the main `covoar`<br>
> function in it. That will be a good starting point.<br>
><br>
<br>
<br>
Yeah, I traversed through the code in covoar.cc<br>
<br>
It goes something like:<br>
<br>
In covoar.cc: covar()<br>
at line 382: objdumpProcessor->load( exe, objdumpFile, err );<br>
Here, `exe` points to the executableinfo object, the one in which the<br>
coverageMap was created via createCoverageMap()<br>
<br>
Now inside objdumpProcessor->load()<br>
at line 301: finalizeSymbol() is called which further calls<br>
findCoverageMap() at line 35. This is the point where error occurs, as<br>
`wait` symbol is not found.<br>
<br></blockquote><div>Hi Bran,</div><div><br></div><div>Sorry, I couldn't find time to look into the details and I was hoping someone</div><div>else will join in. You are in the right direction and found the function that is</div><div>getting the error. Now that you have a function to follow, I will suggest you to</div><div>run gdb on covoar and follow this function, especially where it's getting the</div><div>symbols.</div><div>To run covoar on gdb do the following:</div><div>$gdb /path/to/covoar</div><div>(gdb) r -vvvv -S /home/lunatic/development/rtems/rtems-tools/tester/rtems/testing/coverage/leon3-qemu-symbols.ini  \</div>-O leon3-qemu-coverage \<br>-E /home/lunatic/development/rtems/rtems-tools/tester/rtems/testing/coverage/Explanations.txt \<br>-p RTEMS-5 /your/exe.exe</div><div class="gmail_quote"><br></div><div class="gmail_quote">set a breakpoint at findCoverageMap() and see what it is doing.</div><div class="gmail_quote">Most likely, you'll be able to see where is it getting other symbols</div><div class="gmail_quote">from and why is "wait" not there, or if it's there, why is it skipping it.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Best regards,</div><div class="gmail_quote">Vijay<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The objdumpProcessor->load() function searches symbols in<br>
CoverageMap(via finalizeSymbol()) according to the symbols present in<br>
objdump generated at<br>
line 291: getFile( executableInformation->getFileName(), objdumpFile, err );<br>
<br>
The objdump is created using the executableinfo from which we loaded<br>
the symbols into CoverageMap, right ?<br>
Then is it so that the code missed out on the symbol while adding them<br>
into CoverageMap ?<br>
</blockquote></div></div>