ART stack unwinding fixes for libunwind/gdb/lldb.
dex2oat can already generate unwinding and symbol information which allows tools to create backtrace of mixed native and Java code. This is a cherry pick from aosp/master which fixes several issues. Most notably: * It enables generation of ELF-64 on 64-bit systems (in dex2oat, C compilers already produce ELF-64). Libunwind requires ELF-64 on 64-bit systems for backtraces to work. * It enables loading of ELF files with dlopen. This is required for libunwind to be able to generate backtrace of current process (i.e. the process requesting backtrace of itself). * It adds unit test to test the above (32 vs 64 bit, in-proces vs out-of-process, application code vs framework code). * Some other fixes or clean-ups which should not be of much significance but which are easier to include to make the important CLs cherry-pick cleanly. This is squash of the following commits from aosp/master: 7381010d ART: CFI Test e1bbed21 ART: Blacklist CFI test for non-compiled run-tests aab9f739 ART: Blacklist CFI test for JIT 4437219a ART: Blacklist CFI test for Heap Poisoning a3a49fe8 Switch to using ELF-64 for 64-bit architectures. 297ed22d Write 64-bit address in DWARF if we are on 64-bit architecture. 24981a1c Set correct size of PT_PHDR ELF segment. 1a146bfd Link .dynamic to .dynstr 67a06536 Make some parts of ELF more (pointer) aligned. f50fa82c Enable 64-bit CFI tests. 49e1fabc Use dlopen to load oat files. 5dedb808 Add more logging output for dlopen. aa03870a Find the dlopened file using address rather than file path. 82e73dcc Release dummy MemMaps corresponding to dlopen. 5c40961d Test that we can unwind framework code. 020c5433 Add more log output to the CFI test. 88da3b0d ART: Fix CFI test wrt/ PIC a70e5b92 CFI test: kill the other process in native code. ad5fa8c5 Support generation of CFI in .debug_frame format. 90688ae3 Fix build - large frame size of ElfWriterQuick<ElfTypes>::Write. 97dabb76 Fix build breakage in dwarf_test. 388d2861 Generate just single ARM mapping symbol. f8980875 Split .oat_patches to multiple sections. 491a7fed Fix build - large frame size of ElfWriterQuick<ElfTypes>::Write (again). 8363c772 Add --generate-debug-info flag and remove the other two flags. 461d72a0 Generate debug info for core.oat files. Bug: 21924613 Change-Id: I3f944a08dd2ed1df4d8a807da4fee423fdd35eb7
Loading
Please sign in to comment