Is it possible to read debug information generated by gcc for an Atmel AVR device using FPC/Lazarus library or component?
I'm able to read binary file
my_file.bin into lazarus, and them emulate the instructions in a simple gui.
It would be great to be able to match the
my_file.c source code to the instructions.
I found info on generating debug info here:
from gcc
https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.htmlfrom Atmel
http://www.atmel.com/webdoc/atmelstudio/atmelstudio.sectionObjectFileForDebugging_SupportedDebugFormats.htmlThey both mention DWARF2 so I guess that is the way to go?
add to compiler options
-gdwarf-2 and get the output from
*.elf I can examine the elf file from the command line using this
readelf.exe that ships with gcc but this is where I need more help..
Am I correct in assuming that generating DWARF2 via -gdwarf2 option and reading the .elf file will get the info I need to "connect" my source file to my binary file?
And if so, how do I go about reading the elf file from lazarus?
Or, maybe I'm going down the wrong path and there is another way?
Thanks