History log of /system/core/libunwindstack/tests/DwarfEhFrameWithHdrTest.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e37e2d05b1ae3f844750b76d3b71278b79d5de51 10-Feb-2018 Christopher Ferris <cferris@google.com> Fix off by 4 error handling eh_frame hdr.

- Add a new tool that can dump the register information given a pc.
- Add a new offline unwinder test that fails without this change.
- Update unit tests.
- Refactor offline unwind tests to make it easier to add tests.

Bug: 73048324

Test: Passes new unit tests.
Test: Passes libbacktrace unit tests.
Test: Ran debuggerd -b on random processes.
Change-Id: If6c70a044299505c2274ae6888b35bf9ac34b74b
/system/core/libunwindstack/tests/DwarfEhFrameWithHdrTest.cpp
2fcf4cf13e9aefa8c312084af12ca2d712a6ead3 24-Jan-2018 Christopher Ferris <cferris@google.com> Add error propagation into Unwinder/Elf objects.

The backtrace offline code uses these error codes to diagnose errors.
In addtion, I've had cases where seeing these errors would help diagnose
failures.

This also allows us to add a few features to indicate why an unwind
terminated (such as max frames exceeded).

Bug: 65682279

Test: Updated unit tests pass.
Change-Id: If82b5092698e8a194016d670efff1320f9b44d50
/system/core/libunwindstack/tests/DwarfEhFrameWithHdrTest.cpp
1a141a09256bbb61ffd67a0f666711a92adf5726 24-Jan-2018 Christopher Ferris <cferris@google.com> Small behavioral changes to the unwinder.

- Be a little more lenient when reading the cies/fdes. If next entry data
winds up incorrect, don't fail, simply stop processing the entries. This
only applies when reading all of the cies/fdes at once.
- Fail to init an eh_frame with no entries and fallback to assuming the
eh_frame has no header instead.
- Change the step to always try debug_frame first which has the most
accurate information.
- Add small unit tests and a couple of offline unit tests to verify
this behavior.

These changes are needed to support offline unwinding since it depends
on this new behavior.

Bug: 65682279

Test: Ran new unit tests.
Change-Id: I3529f1b0c8e14cd7409494e5de2f3c9e78d0855e
/system/core/libunwindstack/tests/DwarfEhFrameWithHdrTest.cpp
c3d79f7c0749a40d523b36807b8d7525cdb90654 29-Nov-2017 Christopher Ferris <cferris@google.com> Fix incorrect usage of relative pcs.

When stepping, it's necessary to use both the unaltered relative pc
and the adjusted relative pc. If the adjusted pc is not used, the
wrong unwind information can be used.

Added new offline unit tests that take real data and verifies that it
unwinds properly.

Fix a bug in the map code that would not properly parse map data for
a 64 bit process when done in a 32 bit process.

Fix bug in eh_frame processing that didn't adjust the pc correctly.
Fix unit tests related to the pc adjustment.

Bug: 69475565

Test: Passes libbacktrace/libunwindstack unit tests.
Test: Run debuggerd -b on processes on a hikey.
Change-Id: Ic501a1c4549c5f61d2742a7105c42a960f2c892b
/system/core/libunwindstack/tests/DwarfEhFrameWithHdrTest.cpp
d96cbae4d483cf0422a0d879969ac1fee072aca1 08-Nov-2017 Christopher Ferris <cferris@google.com> Fix another nullptr dereference.

In this case, if the .eh_frame_hdr doesn't exist, we would crash.

Bug: 68813077

Test: Pass new unit tests, verified that without the fix, the unit test
Test: would crash.
Change-Id: I4f1365a76fe5c2fb69fa106a1ef15889c14e7611
/system/core/libunwindstack/tests/DwarfEhFrameWithHdrTest.cpp
c9dee84d81e4672dee5dd08890c904d1ab841e56 03-Nov-2017 Christopher Ferris <cferris@google.com> Add support for only a .eh_frame.

Static executables only have a .eh_frame section and no .eh_frame_hdr
section. Add support for this by rearranging the class hierarchy and
creating a DwarfEhFrameWithHdr class and a DwarfEhFrame class to handle
the different cases.

Add new unit tests for DwarfEhFrame and for the new functionality.

Bug: 68820189

Test: Passes new unit tests, unwinds static executables.
Change-Id: I63d7cb8c52a686e96579a2266e18c0d06bbb6e63
/system/core/libunwindstack/tests/DwarfEhFrameWithHdrTest.cpp