platform_system_core/libunwindstack/tests
Christopher Ferris 4cc36d2b43 Fix handling of load bias values.
It turns out that for the dwarf information, if a FDE indicates it's pc
relative, then pc has to be incremented by the load bias. If not, then
it should not be incremented.

Previously, the code always subtracted load bias values from pcs, and assumed
that all fdes were incremented by load bias values. The new code actually
reads the fdes and adjusted the pcs in the fde and in the eh frame hdr so
that load bias values are already handled properly.

In addition, add dumping of arm exidx values in unwind_reg_info. This allowed
verifying that the debug frame in those elf files was being handled properly.

Added a new unit test that only has a debug frame that has a non-zero load
bias and has fde entries that do not have pc relative encoding.

Fix a couple of other small bugs.

Bug: 109824792

Test: All libbacktrace/libunwindstack unit tests pass.
Test: Ran ART 137-cfi test and 004-ThreadStress.
Test: Verify that displaying the fde start and end pc actually match the
Test: real data for fde that have pc relative set, and that don't.
Test: Verified that the unwind information for arm exidx matches the
Test: debug frame data.

Change-Id: I707555286b5cb05df9f25489e8c5ede753cfe0fb
2018-06-11 18:53:55 -07:00
..
files Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ArmExidxDecodeTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ArmExidxExtractTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
DexFileData.h Load dex files from ART-specific data structure. 2018-02-02 15:03:00 -08:00
DexFileTest.cpp Remove dependency on -no_art variant 2018-02-07 15:19:22 -08:00
DexFilesTest.cpp Adjust DEX file reading to follow layout changes in ART. 2018-02-16 14:54:49 +00:00
DwarfCfaLogTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
DwarfCfaTest.cpp Don't implicitly dereference DW_CFA_def_cfa_expression. 2018-03-08 14:44:11 -08:00
DwarfDebugFrameTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
DwarfEhFrameTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
DwarfEhFrameWithHdrTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
DwarfMemoryTest.cpp Fix another set of bugs. 2017-08-10 17:37:32 -07:00
DwarfOpLogTest.cpp Add error propagation into Unwinder/Elf objects. 2018-01-24 17:50:46 -08:00
DwarfOpTest.cpp Always set the sp reg to the cfa for DWARF. 2018-03-16 23:38:07 -07:00
DwarfSectionImplTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
DwarfSectionTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ElfCacheTest.cpp Modify elf cache to handle elf_offsets properly. 2018-02-16 14:52:38 -08:00
ElfFake.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ElfFake.h Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ElfInterfaceArmTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ElfInterfaceTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ElfTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ElfTestUtils.cpp Fix incorrect usage of relative pcs. 2017-11-29 16:10:08 -08:00
ElfTestUtils.h Fix incorrect usage of relative pcs. 2017-11-29 16:10:08 -08:00
GenGnuDebugdata.cpp Add .gnu_debugdata support. 2017-06-28 15:23:10 -07:00
JitDebugTest.cpp Load dex files from ART-specific data structure. 2018-02-02 15:03:00 -08:00
LocalUnwinderTest.cpp Add a specialized LocalUnwinder object. 2018-05-23 20:02:30 -07:00
LogFake.cpp Make the library usable as a library. 2017-07-14 12:20:23 -07:00
LogFake.h Make the library usable as a library. 2017-07-14 12:20:23 -07:00
MapInfoCreateMemoryTest.cpp Merge changes I53c2c560,I7d845ac5,I8b11d923 2017-12-02 00:12:21 +00:00
MapInfoGetElfTest.cpp Add a global elf cache. 2018-01-25 17:11:33 -08:00
MapInfoGetLoadBiasTest.cpp Add a global elf cache. 2018-01-25 17:11:33 -08:00
MapsTest.cpp Fix issues in libunwindstack. 2017-12-15 11:17:45 -08:00
MemoryBufferTest.cpp unwindstack: rename Memory::ReadPartially to Read. 2017-11-15 15:38:13 -08:00
MemoryFake.cpp unwindstack: rename Memory::ReadPartially to Read. 2017-11-15 15:38:13 -08:00
MemoryFake.h unwindstack: rename Memory::ReadPartially to Read. 2017-11-15 15:38:13 -08:00
MemoryFileTest.cpp unwindstack: rename Memory::Read to ReadFully. 2017-11-15 15:38:13 -08:00
MemoryLocalTest.cpp unwindstack: rename Memory::ReadPartially to Read. 2017-11-15 15:38:13 -08:00
MemoryOfflineBufferTest.cpp Add a MemoryOfflineBuffer object. 2018-04-03 18:37:52 -07:00
MemoryOfflineTest.cpp unwindstack: add some perfunctory MemoryOffline tests. 2017-12-15 14:11:12 -08:00
MemoryRangeTest.cpp unwindstack: rename Memory::ReadPartially to Read. 2017-11-15 15:38:13 -08:00
MemoryRemoteTest.cpp Add tool to save information from a process. 2017-12-20 12:57:01 -08:00
MemoryTest.cpp Make the library usable as a library. 2017-07-14 12:20:23 -07:00
RegsFake.h libunwindstack: add Regs::Clone. 2018-04-20 13:23:20 -07:00
RegsIterateTest.cpp Expose per arch headers. 2018-02-08 19:29:08 -08:00
RegsStepIfSignalHandlerTest.cpp Always set the sp reg to the cfa for DWARF. 2018-03-16 23:38:07 -07:00
RegsTest.cpp libunwindstack: add Regs::Clone. 2018-04-20 13:23:20 -07:00
SymbolsTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
TestLocal.cpp Add a specialized LocalUnwinder object. 2018-05-23 20:02:30 -07:00
TestUtils.h Fix UnwindTest repeatability. 2017-09-06 17:08:44 -07:00
UnwindOfflineTest.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
UnwindTest.cpp Add a specialized LocalUnwinder object. 2018-05-23 20:02:30 -07:00
UnwinderTest.cpp Merge "Always set the sp reg to the cfa for DWARF." 2018-03-19 17:48:59 +00:00