summaryrefslogtreecommitdiff
path: root/libunwindstack/tests/MemoryRemoteTest.cpp
AgeCommit message (Collapse)Author
2020-10-16Remove libprocinfo, libbacktrace, libunwindstackBaligh Uddin
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
2020-04-29Reland "bionic_libc_platform_headers is only available when building with ↵Martin Stjernholm
Bionic". Relanding unchanged - the build problem was due to a split topic. Test: m checkbuild Test: atest libunwindstack_unit_test Test: lunch fvp-userdebug && mmm system/core/libunwindstack Bug: 152255951 Change-Id: Ifd1ced65b840ef216630906eec1ec31233e0c5f1
2020-04-29Revert "bionic_libc_platform_headers is only available when buil..."Martin Stjernholm
Reason for revert: Breaks rvc-d1-dev-plus-aosp: http://ab/6443190 Reverted Changes: Ide447b89a:bionic_libc_platform_headers is only available whe... Ia93cd3ec8:bionic_libc_platform_headers is only available whe... Icdc495588:Make bionic_platform_headers available only for Bi... Idfd7c87dc:bionic_libc_platform_headers is only available whe... Bug: 152255951 Bug: 155269399 Change-Id: I4e6beba5565e604fde3a51cdce5cc4041caffa4e
2020-04-27bionic_libc_platform_headers is only available when building with Bionic.Martin Stjernholm
Test: m checkbuild Test: atest libunwindstack_unit_test Test: lunch fvp-userdebug && mmm system/core/libunwindstack Bug: 152255951 Change-Id: Idfd7c87dc65db350730fec3ceef8c6bc64acf60b
2020-04-16libunwindstack: Add Memory::ReadTag() function for reading memory tags.Peter Collingbourne
This uses an experimental Linux kernel API for reading the tags across processes using ptrace. Bug: 135772972 Test: Unit tests pass. Change-Id: Ib1a09d9219166011de80cf250b756bb8a4bcdb0a
2019-06-11Internalize subclasses of MemoryCasey Dahlin
There are many subclasses of the Memory class and the overwhelming majority of them don't need to be exposed externally. We move all of them to internal headers except MemoryOfflineBuffer, which moves to a separate header. This dramatically reduces the exposed API surface and makes the code more modular. Also, remove the Offline code from libbacktrace. It's not used any where. Test: Unit tests pass, clean tree still builds Change-Id: I55dacdf080daba0bfe65c1ad53a4b326bb482e83
2017-12-20Add tool to save information from a process.Christopher Ferris
Also, modify the ProcessVmRead function to allow arbitrarily large reads and add a test for it. Test: Run tool and verify the output can be used to do an offline Test: unwind. Test: Ran unit tests. Change-Id: I0974ddca4f5cf72b4c9fa29b597a0a669e223828
2017-12-07Add method to detect remote read function to use.Christopher Ferris
The process_vm_read function is much faster than ptrace, but sometimes that will not work on a remote process. Modify the libunwindstack MemoryRemote object to figure out which one it can use. Wrote new unit test to verify this checking behavior. Modify libbacktrace so that the read from libunwind is used instead of using the default ptrace calls. Add some benchmarks to libbacktrace to compare the two different methods. Test: Ran unit tests libbacktrace/libunwindstack/debuggerd. Test: Ran debuggerd -b <SYSTEM_SERVER_PID> Test: Ran debuggerd -b <MEDIACODEC PID> Test: Ran debuggerd -b <RANDOM_PID> Test: Used crasher to create tombstones and verified stack data is Test: dumped properly. Change-Id: If75ca238289532dd8e1de430d569cabb2523380a
2017-12-04Switch MemoryRemote to use ptrace.Christopher Ferris
Some processes will fail to read when using process_vm_read, so switch back to ptrace for now. For example, the system_server process only gets two frames without this fix. Fix up some of the remote memory read unit tests to allow passing even when using ptrace. Bug: 70160908 Test: All unit tests pass, debuggerd -b <system_server pid> works. Change-Id: I37c67bf9c480d7268c9fe32dad6a8d78a4020b85
2017-11-15unwindstack: rename Memory::ReadPartially to Read.Josh Gao
Test: mma Test: treehugger Change-Id: I53c2c5600fb44620b629c01db85a67789594595f
2017-11-15unwindstack: rename Memory::Read to ReadFully.Josh Gao
Rename Memory::Read to ReadFully to match its semantics with that of android::base. ReadPartially will be renamed to Read in a follow up commit, kept intentionally separate so that there aren't any callers accidentally switched from ReadFully to Read. Test: treehugger Change-Id: I7d845ac5244c3025d92c8512e960e5d0d1da05af
2017-11-15unwindstack: add Memory::ReadPartially.Josh Gao
Add a way to read while allowing for partial reads. Test: new tests added to libunwindstack_test, ran 32/64 on hikey960, sailfish Test: ran unwind on hikey960/sailfish Change-Id: I8b11d9230fcd3122148ef3f980863ac1404ad70a
2017-09-06Fix UnwindTest repeatability.Christopher Ferris
- Rewrite some of the UnwindTest tests to properly wait for the process to be ready. - Add a TestScopedPidReaper to make sure that fork process get killed even if the test fails. Add this to all tests that fail. - Create a quiesce function to be used by all of the tests that will wait after attaching to a process. Bug: 65287279 Test: Ran unit tests on hikey960 board and on host repeatedly. Change-Id: I57084120396f34d8dfb852f3d814bef2056f1b54
2017-07-14Make the library usable as a library.Christopher Ferris
- 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
2017-07-11Add full support for initing registers.Christopher Ferris
- Fixes a few bugs in untested functionality. - Add tests for the way the register handling code is used. - Fix a few tests that were not reaping child processes. Bug: 23762183 Test: Ran unit tests on host (32 bit and 64 bit). Test: Ran unit tests on angler (32 bit and 64 bit). Change-Id: I573d6617b4f1561f6e8494d7213c52086d112d97
2017-04-03Add overflow checks in Memory objects.Christopher Ferris
Also change one of the reads to be explicitly ReadField instead of an overloaded Read function. Bug: 23762183 Test: Passes new unit tests. Change-Id: Id848f7b632f67df0c5b7318d9e588942cfd2099a
2017-03-09Elf interface for new unwinder.Christopher Ferris
This cl includes the code to read arm unwind information from a shared library. Bug: 23762183 Test: Passes all unit tests. I can dump the arm unwind information Test: for an arm shared library. Change-Id: I43501ea2eab843b81de8bd5128401dd1971af8d3
2017-01-25New version of unwinder.Christopher Ferris
Bug: 23762183 Test: All unit tests pass. Change-Id: I0ac69e55af56e1142c0a1ee3715cdc48f2ed3ec3