Commit graph

3 commits

Author SHA1 Message Date
Christopher Ferris
458cc66b07 Update the tests.
- Change all load_base to load_bias in the test files.
- Add the test files to the backtrace_test.
- Add a function to get the path to the test libraries.
- Change aarch64 to arm64 for offline test code.
- Modify the offline tests so that they can be easily updated when
  unwinding on any arch for any other arch is possible.
- Add tests of CreateNew for remote debugging.

Test: Ran unit tests on host and angler.
Change-Id: Id6c5afe73aeb2ac22463dd81f061799fcb1c178b
2017-08-28 18:08:52 -07:00
Yabin Cui
c4a480e423 libbacktraceoffline: choose correct debug section for a given address.
1. In /system/lib/libart.so, the ranges of functions covered by .eh_frame
and .ARM.exidx overlap with each other. Currently, we don't check .eh_frame
if the address is in the ranges of functions covered by .ARM.exidx. It leads
to a wrong unwinding result. So change the logic to first try .eh_frame and
.debug_frame, if it fails, then try .ARM.exidx.
2. Add test for Item 1.

Bug: http://b/35251937
Test: run backtrace_test.

Change-Id: Ic412705617c300bc69b4ece178cc2e1bb3eb765b
2017-02-10 17:51:16 -08:00
Yabin Cui
5d991bc351 libbacktrace_offline: support .ARM.exidx.
1. Read .ARM.exidx and .ARM.extab, provides these data to libunwind
through AccessMem.
2. In FindProcInfo, search .ARM.exidx for the idx entry of function
containing ip.
3. Add structures to store .ARM.exidx info in DebugFrameInfo, and
clean up the structure.
4. Add tests to test each unwind information (.eh_frame, .debug_frame,
.gnu_debugdata, .ARM.exidx) separately.

Bug: http://b/30974693
Test: run backtrace_test.
Test: run simpleperf runtest.py.
Change-Id: I9377a54379158bd35860efcf0e011423be7350d4
2016-12-07 10:25:33 -08:00