addr2line for RTEMS Tools C++ Program?

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Aug 28 05:15:35 UTC 2019


On 28/08/2019 03:38, Chris Johns wrote:
> On 28/8/19 4:12 am, Sebastian Huber wrote:
>> has someone a hint for me how I can use an addr2line functionality in a C++ program for the RTEMS tools (the stupid solution would be to use the addr2line program via a child process)? I would like to map addresses from trace data to a source/line information together with the ELF file.
>>
> 
>   https://git.rtems.org/rtems-tools/tree/linkers/rtems-addr2line.cpp
> 
> This exists as a simple way to test the address to line functionality of the
> DWARF support in rtemstoolkit.
> 
> I should move this command from linkers to misc how it exists. It did not exist
> when I added the support.
> 
> FYI ...
> 
> - The rtemstoolkit has cross-platform support for calling child processes. The
> symbols tool for libdl is a good example of accessing symbols and then calling
> child processes to do some work. It also has an example of the tmp file support.
> The symbols tool creates a C file and then calls the RTEMS gcc to compile it for
> your target ...
> 
>   https://git.rtems.org/rtems-tools/tree/linkers/rtems-syms.cpp
> 
> - If you need to handle complication units (CU) the executable info tool
> provides a good example. It also shows how to handle sections in an ELF
> executable or object file ...
> 
>   https://git.rtems.org/rtems-tools/tree/linkers/rtems-exeinfo.cpp
> 
> It should also move to misc.
> 
> I hope these help.

Thanks for the hints. This is what I was looking for. It is really great 
what you have created on highly useful infrastructure.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list