summaryrefslogtreecommitdiff
path: root/libunwindstack/tests/DwarfCfaLogTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove libprocinfo, libbacktrace, libunwindstackBaligh Uddin2020-10-161-801/+0
| | | | | | | | | | | These projects have moved to a different location. platform/system/core [libprocinfo] -> platform/system/libprocinfo platform/system/core [libbacktrace] -> platform/system/unwinding [libbacktrace] platform/system/core [libunwindstack] -> platform/system/unwinding [libunwindstack] BUG: 163786882 Test: Local build + TH Change-Id: Id6d278d917236df0ffd40b5c32593856e112cb5b
* libunwindstack: support for Armv8.3-A Pointer AuthenticationTamas Petz2020-07-141-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for handling return addresses signed with pointer authentication. It simply strips the authentication code without verifying its correctness, and thus works with both A and B keys and through key-change boundaries. Additons: * DW_CFA_AARCH64_negate_ra_state: new CFA operation. * RA_SIGN_STATE: new pseudo register. * Pass the arch to DwarfCfa so that the new op is only executed on aarch64. The stripping uses the xpaclri instruction. This is a hint space instruction which is compatible with pre Armv8.3-A devices. For cases where it cannot be used, a mask can be set instead. Test: libunwindstack_test Without this patch all UnwindTest.* testcases should fail if compiled with Pointer Authentication. The tests should be executed with both -mbranch-protection=pac-ret and pac-ret+leaf flags so that either some or all functions have pointer authentication instructions. Change-Id: Id7c3f1d0e2fc7fccb19bd1430826264405a9df7c
* Add a name for all test suitesHaibo Huang2019-12-111-1/+1
| | | | | | | (for the new googletest Test: run tests Change-Id: I3856a4a8f3ed23bcfcc59bec7624595e91740be0
* Switch case to suite to follow new gtest naming.Christopher Ferris2019-06-201-11/+11
| | | | | | | Bug: 135528735 Test: All unit tests pass. Change-Id: I1f3dc6fe381ec557b6b7bc5cb1c58d210efa63da
* Fix handling of load bias values.Christopher Ferris2018-06-111-94/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Make the library usable as a library.Christopher Ferris2017-07-141-4/+9
| | | | | | | | | | | | | | | | | | | - 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
* Add DwarfSection classes.Christopher Ferris2017-06-011-2/+2
| | | | | | | Bug: 23762183 Test: Ran new unit tests. Change-Id: Icca2a73c50d467718ba4ac41e1c8f541488620dd
* Add the Dwarf CFA handling.Christopher Ferris2017-04-241-0/+814
Bug: 23762183 Test: Ran new unit tests. Change-Id: I31abac1238cc671b78a505da655fb6298be072b4