Fwd: [PATCH 2/4] covoar: Use DWARF to map addresses to source files and lines.

Vijay Kumar Banerjee vijaykumar9597 at gmail.com
Sun May 6 07:28:24 UTC 2018


On 6 May 2018 at 08:54, Chris Johns <chrisj at rtems.org> wrote:

> On 6/5/18 9:49 am, Chris Johns wrote:
>
>> On 6/5/18 7:54 am, Vijay Kumar Banerjee wrote:
>>
>>> On 6 May 2018 at 03:05, Chris Johns <chrisj at rtems.org <mailto:
>>> chrisj at rtems.org>>
>>> wrote:
>>>
>>>      Could you please check covoar’s wscript has the libdwarf path added?
>>>
>>> the path to elftoolchain/libdwarf is not added in covoar
>>>
>>>
>> Thanks. I am on FreeBSD and it uses the elftoolchain for it's libdwarf so
>> I did
>> not see the error as the header matches the one in the rtemstoolkit's
>> libdwarf.
>>
>>      Also check waf with -v.
>>>
>>>   after adding the path it gives the following error with -v
>>>
>>> --
>>> Waf: Entering directory `/home/lunatic/development/rte
>>> ms/test/rtems-tools/build'
>>> [227/229] Linking build/tester/covoar/trace-converter
>>> 03:22:35 runner ['/usr/bin/g++', 'tester/covoar/TraceConverter.cc.2.o',
>>> 'tester/covoar/TraceList.cc.2.o', 'tester/covoar/TraceReaderBase
>>> .cc.2.o',
>>> 'tester/covoar/TraceReaderLogQEMU.cc.2.o',
>>> 'tester/covoar/TraceWriterBase.cc.2.o', 'tester/covoar/TraceWriterQEMU
>>> .cc.2.o',
>>> '-o/home/lunatic/development/rtems/test/rtems-tools/build/te
>>> ster/covoar/trace-converter',
>>> '-Wl,-Bstatic', '-Ltester/covoar', '-Lrtemstoolkit', '-lccovoar',
>>> '-lrld',
>>> '-ldwarf', '-lelf', '-liberty', '-Wl,-Bdynamic']
>>> [229/229] Linking build/tester/covoar/covoar
>>> 03:22:35 runner ['/usr/bin/g++', 'tester/covoar/covoar.cc.3.o',
>>> '-o/home/lunatic/development/rtems/test/rtems-tools/build/te
>>> ster/covoar/covoar',
>>> '-Wl,-Bstatic', '-Ltester/covoar', '-Lrtemstoolkit', '-lccovoar',
>>> '-lrld',
>>> '-ldwarf', '-lelf', '-liberty', '-Wl,-Bdynamic']
>>> tester/covoar/libccovoar.a(DesiredSymbols.cc.1.o): In function
>>> `Coverage::DesiredSymbols::determineSourceLines(Coverage::Co
>>> verageRanges*,
>>> Coverage::ExecutableInfo*)':
>>> /home/lunatic/development/rtems/test/rtems-tools/build/../te
>>> ster/covoar/DesiredSymbols.cc:413:
>>> undefined reference to
>>> `rld::path::__xpg_basename(std::__cxx11::basic_string<char,
>>> std::char_traits<char>, std::allocator<char> > const&)'
>>> /home/lunatic/development/rtems/test/rtems-tools/build/../te
>>> ster/covoar/DesiredSymbols.cc:415:
>>> undefined reference to
>>> `rld::path::__xpg_basename(std::__cxx11::basic_string<char,
>>> std::char_traits<char>, std::allocator<char> > const&)'
>>> collect2: error: ld returned 1 exit status
>>>
>>
>> Hmm that is a weird error, the waf script looks to me like it has c++11
>> support
>> enabled correctly and the code looks fine to me so I do not understand
>> why this
>> is happening. I do not see this on FreeBSD with clang.
>>
>> Would you please try `waf clean build` to see if rebuilding everything
>> fixes this?
>>
> still getting the same error .
I'm using g++ 7.3.1 on fedora 27.
If you have changed something in the code, can you please send a patch for
the same ?

>
>> I will try the patches on Windows, it has gcc as a compiler.
>>
>>
> The code built on Windows without error. The MSYS2 g++ is 7.2.0 so I am
> not sure about this.
>
> Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20180506/5d3c0f21/attachment-0002.html>


More information about the devel mailing list