How do I create a debug map file for an Android application in Delphi XE6?
I have applied backtrace to my Android application compiled in XE6 using Posix.Backtrace from https://bitbucket.org/shadow_cs/delphi-arm-backtrace . As of now, I am getting back line, but not line numbers.
I'm looking to create a map file for my android.so so that I can feed the addresses at runtime to addr2line so that my bug report contains the line numbers.
I was looking for an IDE to generate a map file, just like for a Win32 Delphi application by choosing
Project> Options> Delphi Compiler> Linking.
There is no option for a map file if the Android platform is selected. All Android configurations are explicitly excluded: Map File ARM, iOS device platform only; Map file, 32-bit Windows, OSx, iOS only. I tried optimization anyway, debugged and didn't get the .map file.
Is there a way to create a .map file for an Android application in Delphi?
Thank!
source to share
If you start RAD Studio command line and call dccaarm.exe, you will see that even though the IDE does not pop up, the compiler supports command line switches -G
and -GD
, both of which emit a map file.
Call the project parameters dialog box ( Ctrl+Shift+F11
), and in the options tree select Delphi Compiler, Compiling. Now select "More options", "More options" to go to the compiler and type-G
Recompile your project and a map file will be generated, eg. project_folder \ Android \ Debug \ libProject1.so.map
Note. Delphi 10.1 Berlin still lacks the IDE linker option I'm looking at - the question is in Delphi XE7, so some of the specifics of the steps above may require minor customization.
source to share