History log of /system/core/libunwindstack/tests/DwarfDebugFrameTest.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/DwarfDebugFrameTest.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/DwarfDebugFrameTest.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/DwarfDebugFrameTest.cpp
f6f691b63c1b2166ed005a462a6fba5001786eda 26-Sep-2017 Christopher Ferris <cferris@google.com> Update the Unwinder object and add tests.

Changes:
- Remove unused GetReturnAddressFromDefault function and tests.
- Modify the unwinder to stop when a pc/sp in a device map.
- Modify the unwinder to skip initial frames based on map names.
- Unit tests that exercise all of the paths in the unwinder code.
- Move the test Elf/ElfInterface objects into their own file.
- Update RegsFake to handle extra cases.
- Modify libbacktrace code to use this unwinder.

The new unwinder does not implement the ignore frame functionality since
this is not used very often and is better implemented using a skip frames
in named libraries functionality.

Test: Ran new unit tests, ran backtrace tests.
Change-Id: Ifd65e9acd66ac5e2d0e04bd32a9ad870b54610ff
/system/core/libunwindstack/tests/DwarfDebugFrameTest.cpp
d226a5140989f509a0ed3e2723f05d5fc93ce8df 14-Jul-2017 Christopher Ferris <cferris@google.com> Make the library usable as a library.

- Add namespace unwindstack everywhere so that it's easier for other
code to use the library.
- Move some of the header files into include/unwindstack so that they
can be exposed.
- Modify the headers so that only a limited number need to be exposed.
- Update the tools to use the new headers.
- Add a GetLoadBias() call on the Elf object. This prevents the need
to get the interface object out of the Elf object.
- Move the GetRelPc() call out of the Reg class, to the Elf class. It's
not always the case that a Reg object will be around when you want to
get a relative pc. The tests for this moved to ElfTest.cpp.

Bug: 23762183

Test: Unit tests pass.
Change-Id: Iac609dac1dd90ed83d1a1e24ff2579c96c023bc3
/system/core/libunwindstack/tests/DwarfDebugFrameTest.cpp
61d4097737c897847b7600d7d5ddbd384efb8540 13-Jun-2017 Christopher Ferris <cferris@google.com> Add EH frame and debug frame support.

Bug: 23762183

Test: Pass new unit tests.
Change-Id: I1bfe900e068017ff31998f359bf98d4c5c9af2a5
/system/core/libunwindstack/tests/DwarfDebugFrameTest.cpp