platform_system_core/libunwindstack
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
..
include/unwindstack Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
tests Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
tools Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
.clang-format Use the 2 space clang format for libunwindstack. 2017-03-21 10:41:45 -07:00
Android.bp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ArmExidx.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ArmExidx.h Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
AsmGetRegsMips.S Add libunwindstack support for Mips and Mips64 2017-12-11 15:44:40 +01:00
AsmGetRegsMips64.S Add libunwindstack support for Mips and Mips64 2017-12-11 15:44:40 +01:00
AsmGetRegsX86.S Fix wrong mov instruction size. 2018-01-25 11:44:19 -08:00
AsmGetRegsX86_64.S Add full support for initing registers. 2017-07-11 12:15:54 -07:00
Check.h Add error propagation into Unwinder/Elf objects. 2018-01-24 17:50:46 -08:00
DexFile.cpp Remove dependency on -no_art variant 2018-02-07 15:19:22 -08:00
DexFile.h Load dex files from ART-specific data structure. 2018-02-02 15:03:00 -08:00
DexFiles.cpp Adjust DEX file reading to follow layout changes in ART. 2018-02-16 14:54:49 +00:00
DwarfCfa.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
DwarfCfa.h Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
DwarfDebugFrame.h Add support for only a .eh_frame. 2017-11-07 13:22:39 -08:00
DwarfEhFrame.h Expose per arch headers. 2018-02-08 19:29:08 -08:00
DwarfEhFrameWithHdr.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
DwarfEhFrameWithHdr.h Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
DwarfEncoding.h Make the library usable as a library. 2017-07-14 12:20:23 -07:00
DwarfMemory.cpp unwindstack: rename Memory::Read to ReadFully. 2017-11-15 15:38:13 -08:00
DwarfOp.cpp Implement new DEX PC lookup scheme. 2018-02-13 16:45:38 -08:00
DwarfOp.h Implement new DEX PC lookup scheme. 2018-02-13 16:45:38 -08:00
DwarfSection.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
Elf.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ElfInterface.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ElfInterfaceArm.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
ElfInterfaceArm.h Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
JitDebug.cpp Load dex files from ART-specific data structure. 2018-02-02 15:03:00 -08:00
LocalUnwinder.cpp Add a specialized LocalUnwinder object. 2018-05-23 20:02:30 -07:00
Log.cpp Make the library usable as a library. 2017-07-14 12:20:23 -07:00
MapInfo.cpp Modify elf cache to handle elf_offsets properly. 2018-02-16 14:52:38 -08:00
Maps.cpp Add a specialized LocalUnwinder object. 2018-05-23 20:02:30 -07:00
Memory.cpp Add a MemoryOfflineBuffer object. 2018-04-03 18:37:52 -07:00
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00
Regs.cpp Expose per arch headers. 2018-02-08 19:29:08 -08:00
RegsArm.cpp libunwindstack: add Regs::Clone. 2018-04-20 13:23:20 -07:00
RegsArm64.cpp libunwindstack: add Regs::Clone. 2018-04-20 13:23:20 -07:00
RegsInfo.h Implement new DEX PC lookup scheme. 2018-02-13 16:45:38 -08:00
RegsMips.cpp libunwindstack: add Regs::Clone. 2018-04-20 13:23:20 -07:00
RegsMips64.cpp libunwindstack: add Regs::Clone. 2018-04-20 13:23:20 -07:00
RegsX86.cpp libunwindstack: add Regs::Clone. 2018-04-20 13:23:20 -07:00
RegsX86_64.cpp libunwindstack: add Regs::Clone. 2018-04-20 13:23:20 -07:00
Symbols.cpp Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
Symbols.h Fix handling of load bias values. 2018-06-11 18:53:55 -07:00
Unwinder.cpp Fix bug when doing signal handler lookup. 2018-05-17 18:58:42 -07:00