<div dir="ltr"><div><div><div><div><div>Hi Chris,<br><br></div>Getting some build errors here. It complains about dwarf.h and libdwarf.h so theres 2 packages that I can get them from but both end up producing some problems. 'Elf' has a previous declaration in one and missing typedef for the other. Is there a particular version of these libraries that you are using?<br><br></div>sudo apt-get install libdwarf-freebsd-dev<br><br></div>Theres a typedef error for Dwarf_Handler and Dwarf_Sig8<br><br>cpod@cpod ~/development/rtems/test/rtems-tools $ ./waf<br>Waf: Entering directory `/home/cpod/development/rtems/test/rtems-tools/build'<br>[188/229] Compiling tester/covoar/app_common.cc<br>[189/229] Compiling tester/covoar/CoverageFactory.cc<br>[193/229] Compiling tester/covoar/CoverageReaderBase.cc<br>[194/229] Compiling tester/covoar/CoverageReaderQEMU.cc<br>In file included from ../rtemstoolkit/rld-dwarf.h:29:0,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/CoverageReaderBase.h:10,<br> from ../tester/covoar/CoverageFactory.h:12,<br> from ../tester/covoar/CoverageFactory.cc:13:<br>../rtemstoolkit/rld-dwarf-types.h:39:15: error: ‘Dwarf_Handler’ in namespace ‘::’ does not name a type<br> typedef ::Dwarf_Handler dwarf_handler;<br> ^<br>../rtemstoolkit/rld-dwarf-types.h:50:15: error: ‘Dwarf_Sig8’ in namespace ‘::’ does not name a type<br> typedef ::Dwarf_Sig8 dwarf_sig8;<br> ^<br><br>In file included from ../rtemstoolkit/rld-dwarf.h:29:0,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/CoverageReaderBase.h:10,<br> from ../tester/covoar/CoverageReaderBase.cc:8:<br>../rtemstoolkit/rld-dwarf-types.h:39:15: error: ‘Dwarf_Handler’ in namespace ‘::’ does not name a type<br> typedef ::Dwarf_Handler dwarf_handler;<br> ^<br>../rtemstoolkit/rld-dwarf-types.h:50:15: error: ‘Dwarf_Sig8’ in namespace ‘::’ does not name a type<br> typedef ::Dwarf_Sig8 dwarf_sig8;<br> ^<br><br>In file included from ../rtemstoolkit/rld-dwarf.h:29:0,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/DesiredSymbols.h:17,<br> from ../tester/covoar/app_common.h:11,<br> from ../tester/covoar/app_common.cc:40:<br>../rtemstoolkit/rld-dwarf-types.h:39:15: error: ‘Dwarf_Handler’ in namespace ‘::’ does not name a type<br> typedef ::Dwarf_Handler dwarf_handler;<br> ^<br>../rtemstoolkit/rld-dwarf-types.h:50:15: error: ‘Dwarf_Sig8’ in namespace ‘::’ does not name a type<br> typedef ::Dwarf_Sig8 dwarf_sig8;<br> ^<br><br>In file included from ../rtemstoolkit/rld-dwarf.h:29:0,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/DesiredSymbols.h:17,<br> from ../tester/covoar/app_common.h:11,<br> from ../tester/covoar/CoverageReaderQEMU.cc:14:<br>../rtemstoolkit/rld-dwarf-types.h:39:15: error: ‘Dwarf_Handler’ in namespace ‘::’ does not name a type<br> typedef ::Dwarf_Handler dwarf_handler;<br> ^<br>../rtemstoolkit/rld-dwarf-types.h:50:15: error: ‘Dwarf_Sig8’ in namespace ‘::’ does not name a type<br> typedef ::Dwarf_Sig8 dwarf_sig8;<br> ^<br><br>Waf: Leaving directory `/home/cpod/development/rtems/test/rtems-tools/build'<br>Build failed<br> -> task in 'ccovoar' failed with exit status 1 (run with -v to display more information)<br> -> task in 'ccovoar' failed with exit status 1 (run with -v to display more information)<br> -> task in 'ccovoar' failed with exit status 1 (run with -v to display more information)<br> -> task in 'ccovoar' failed with exit status 1 (run with -v to display more information)<br>--------------------------------------------------------------------------------------------------------------<br><br><br></div>If I chose <br><br></div>sudo apt-get install libdwarf-dev theres a conflict with 'Elf' having a previous declaration.<br><br>Waf: Entering directory `/home/cpod/development/rtems/test/rtems-tools/build'<br>[138/229] Linking build/rtemstoolkit/libdwarf.a<br>[177/229] Linking build/linkers/rtems-ld<br>[179/229] Linking build/linkers/rtems-ra<br>[181/229] Linking build/linkers/rtems-tld<br>[183/229] Linking build/linkers/rtems-syms<br>[189/229] Linking build/linkers/rtems-rap<br>[190/229] Linking build/linkers/rtems-exeinfo<br>[191/229] Compiling tester/covoar/app_common.cc<br>[192/229] Compiling tester/covoar/CoverageFactory.cc<br>[193/229] Compiling tester/covoar/CoverageReaderBase.cc<br>[194/229] Compiling tester/covoar/CoverageReaderQEMU.cc<br>In file included from ../rtemstoolkit/rld-dwarf-types.h:29:0,<br> from ../rtemstoolkit/rld-dwarf.h:29,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/DesiredSymbols.h:17,<br> from ../tester/covoar/app_common.h:11,<br> from ../tester/covoar/app_common.cc:40:<br>/usr/include/libdwarf.h:66:8: error: using typedef-name ‘Elf’ after ‘struct’<br> struct Elf;<br> ^<br>In file included from ../rtemstoolkit/elftoolchain/libelf/gelf.h:32:0,<br> from ../rtemstoolkit/rld-elf-types.h:29,<br> from ../rtemstoolkit/rld.h:72,<br> from ../rtemstoolkit/rld-dwarf.h:28,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/DesiredSymbols.h:17,<br> from ../tester/covoar/app_common.h:11,<br> from ../tester/covoar/app_common.cc:40:<br>../rtemstoolkit/elftoolchain/libelf/libelf.h:43:21: note: ‘Elf’ has a previous declaration here<br> typedef struct _Elf Elf;<br> ^<br>In file included from ../rtemstoolkit/rld-dwarf-types.h:29:0,<br> from ../rtemstoolkit/rld-dwarf.h:29,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/DesiredSymbols.h:17,<br> from ../tester/covoar/app_common.h:11,<br> from ../tester/covoar/app_common.cc:40:<br>/usr/include/libdwarf.h:67:16: error: using typedef-name ‘Elf’ after ‘struct’<br> typedef struct Elf* dwarf_elf_handle;<br> ^<br>In file included from ../rtemstoolkit/elftoolchain/libelf/gelf.h:32:0,<br> from ../rtemstoolkit/rld-elf-types.h:29,<br> from ../rtemstoolkit/rld.h:72,<br> from ../rtemstoolkit/rld-dwarf.h:28,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/DesiredSymbols.h:17,<br> from ../tester/covoar/app_common.h:11,<br> from ../tester/covoar/app_common.cc:40:<br>../rtemstoolkit/elftoolchain/libelf/libelf.h:43:21: note: ‘Elf’ has a previous declaration here<br> typedef struct _Elf Elf;<br> ^<br><br>In file included from ../rtemstoolkit/rld-dwarf-types.h:29:0,<br> from ../rtemstoolkit/rld-dwarf.h:29,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/CoverageReaderBase.h:10,<br> from ../tester/covoar/CoverageFactory.h:12,<br> from ../tester/covoar/CoverageFactory.cc:13:<br>/usr/include/libdwarf.h:66:8: error: using typedef-name ‘Elf’ after ‘struct’<br> struct Elf;<br> ^<br>In file included from ../rtemstoolkit/elftoolchain/libelf/gelf.h:32:0,<br> from ../rtemstoolkit/rld-elf-types.h:29,<br> from ../rtemstoolkit/rld.h:72,<br> from ../rtemstoolkit/rld-dwarf.h:28,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/CoverageReaderBase.h:10,<br> from ../tester/covoar/CoverageFactory.h:12,<br> from ../tester/covoar/CoverageFactory.cc:13:<br>../rtemstoolkit/elftoolchain/libelf/libelf.h:43:21: note: ‘Elf’ has a previous declaration here<br> typedef struct _Elf Elf;<br> ^<br>In file included from ../rtemstoolkit/rld-dwarf-types.h:29:0,<br> from ../rtemstoolkit/rld-dwarf.h:29,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/CoverageReaderBase.h:10,<br> from ../tester/covoar/CoverageFactory.h:12,<br> from ../tester/covoar/CoverageFactory.cc:13:<br>/usr/include/libdwarf.h:67:16: error: using typedef-name ‘Elf’ after ‘struct’<br> typedef struct Elf* dwarf_elf_handle;<br> ^<br>In file included from ../rtemstoolkit/elftoolchain/libelf/gelf.h:32:0,<br> from ../rtemstoolkit/rld-elf-types.h:29,<br> from ../rtemstoolkit/rld.h:72,<br> from ../rtemstoolkit/rld-dwarf.h:28,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/CoverageReaderBase.h:10,<br> from ../tester/covoar/CoverageFactory.h:12,<br> from ../tester/covoar/CoverageFactory.cc:13:<br>../rtemstoolkit/elftoolchain/libelf/libelf.h:43:21: note: ‘Elf’ has a previous declaration here<br> typedef struct _Elf Elf;<br> ^<br><br>In file included from ../rtemstoolkit/rld-dwarf-types.h:29:0,<br> from ../rtemstoolkit/rld-dwarf.h:29,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/CoverageReaderBase.h:10,<br> from ../tester/covoar/CoverageReaderBase.cc:8:<br>/usr/include/libdwarf.h:66:8: error: using typedef-name ‘Elf’ after ‘struct’<br> struct Elf;<br> ^<br>In file included from ../rtemstoolkit/elftoolchain/libelf/gelf.h:32:0,<br> from ../rtemstoolkit/rld-elf-types.h:29,<br> from ../rtemstoolkit/rld.h:72,<br> from ../rtemstoolkit/rld-dwarf.h:28,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/CoverageReaderBase.h:10,<br> from ../tester/covoar/CoverageReaderBase.cc:8:<br>../rtemstoolkit/elftoolchain/libelf/libelf.h:43:21: note: ‘Elf’ has a previous declaration here<br> typedef struct _Elf Elf;<br> ^<br>In file included from ../rtemstoolkit/rld-dwarf-types.h:29:0,<br> from ../rtemstoolkit/rld-dwarf.h:29,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/CoverageReaderBase.h:10,<br> from ../tester/covoar/CoverageReaderBase.cc:8:<br>/usr/include/libdwarf.h:67:16: error: using typedef-name ‘Elf’ after ‘struct’<br> typedef struct Elf* dwarf_elf_handle;<br> ^<br>In file included from ../rtemstoolkit/elftoolchain/libelf/gelf.h:32:0,<br> from ../rtemstoolkit/rld-elf-types.h:29,<br> from ../rtemstoolkit/rld.h:72,<br> from ../rtemstoolkit/rld-dwarf.h:28,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/CoverageReaderBase.h:10,<br> from ../tester/covoar/CoverageReaderBase.cc:8:<br>../rtemstoolkit/elftoolchain/libelf/libelf.h:43:21: note: ‘Elf’ has a previous declaration here<br> typedef struct _Elf Elf;<br> ^<br><br>In file included from ../rtemstoolkit/rld-dwarf-types.h:29:0,<br> from ../rtemstoolkit/rld-dwarf.h:29,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/DesiredSymbols.h:17,<br> from ../tester/covoar/app_common.h:11,<br> from ../tester/covoar/CoverageReaderQEMU.cc:14:<br>/usr/include/libdwarf.h:66:8: error: using typedef-name ‘Elf’ after ‘struct’<br> struct Elf;<br> ^<br>In file included from ../rtemstoolkit/elftoolchain/libelf/gelf.h:32:0,<br> from ../rtemstoolkit/rld-elf-types.h:29,<br> from ../rtemstoolkit/rld.h:72,<br> from ../rtemstoolkit/rld-dwarf.h:28,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/DesiredSymbols.h:17,<br> from ../tester/covoar/app_common.h:11,<br> from ../tester/covoar/CoverageReaderQEMU.cc:14:<br>../rtemstoolkit/elftoolchain/libelf/libelf.h:43:21: note: ‘Elf’ has a previous declaration here<br> typedef struct _Elf Elf;<br> ^<br>In file included from ../rtemstoolkit/rld-dwarf-types.h:29:0,<br> from ../rtemstoolkit/rld-dwarf.h:29,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/DesiredSymbols.h:17,<br> from ../tester/covoar/app_common.h:11,<br> from ../tester/covoar/CoverageReaderQEMU.cc:14:<br>/usr/include/libdwarf.h:67:16: error: using typedef-name ‘Elf’ after ‘struct’<br> typedef struct Elf* dwarf_elf_handle;<br> ^<br>In file included from ../rtemstoolkit/elftoolchain/libelf/gelf.h:32:0,<br> from ../rtemstoolkit/rld-elf-types.h:29,<br> from ../rtemstoolkit/rld.h:72,<br> from ../rtemstoolkit/rld-dwarf.h:28,<br> from ../tester/covoar/ExecutableInfo.h:14,<br> from ../tester/covoar/DesiredSymbols.h:17,<br> from ../tester/covoar/app_common.h:11,<br> from ../tester/covoar/CoverageReaderQEMU.cc:14:<br>../rtemstoolkit/elftoolchain/libelf/libelf.h:43:21: note: ‘Elf’ has a previous declaration here<br> typedef struct _Elf Elf;<br> ^<br><br>Waf: Leaving directory `/home/cpod/development/rtems/test/rtems-tools/build'<br>Build failed<br> -> task in 'ccovoar' failed with exit status 1 (run with -v to display more information)<br> -> task in 'ccovoar' failed with exit status 1 (run with -v to display more information)<br> -> task in 'ccovoar' failed with exit status 1 (run with -v to display more information)<br> -> task in 'ccovoar' failed with exit status 1 (run with -v to display more information)<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 5 May 2018 at 09:40, Chris Johns <span dir="ltr"><<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
The patch series adds a DWARF framework to the rtemstoolkit to access the<br>
source file and line given an address in an executable. This allows<br>
us to remove exec'ing addr2line.<br>
<br>
The patches build and the source line details are loaded from the DWARF<br>
debug info. I however do not have any coverage data to check the change<br>
cleanly replaces the existing addr2line calls.<br>
<br>
If someone can run the existing covoar and then this build of covoar and<br>
confirm the source files and lines match. If there are issues please let<br>
me know.<br>
<br>
Chris<br>
______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/devel</a><br>
</blockquote></div><br></div>