addr2line for RTEMS Tools C++ Program?
chrisj at rtems.org
Wed Aug 28 01:38:21 UTC 2019
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.
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.
- 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 ...
- 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 ...
It should also move to misc.
I hope these help.
More information about the devel