summaryrefslogtreecommitdiff
path: root/libunwindstack/Regs.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2017-09-25 19:23:07 -0700
committerChristopher Ferris <cferris@google.com>2017-10-04 14:40:14 -0700
commit0cb05134a07a1c8cee69f7fd944361476e0692ab (patch)
tree477e23a574ad068d71182afa1872c18f3c53502b /libunwindstack/Regs.cpp
parent44717a7d00d588b9f5058c1c8c65578ca1ccf596 (diff)
downloadunwinding-0cb05134a07a1c8cee69f7fd944361476e0692ab.tar.gz
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
Diffstat (limited to 'libunwindstack/Regs.cpp')
-rw-r--r--libunwindstack/Regs.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/libunwindstack/Regs.cpp b/libunwindstack/Regs.cpp
index 8c6172e..69e6512 100644
--- a/libunwindstack/Regs.cpp
+++ b/libunwindstack/Regs.cpp
@@ -33,26 +33,6 @@
namespace unwindstack {
-template <typename AddressType>
-bool RegsImpl<AddressType>::GetReturnAddressFromDefault(Memory* memory, uint64_t* value) {
- switch (return_loc_.type) {
- case LOCATION_REGISTER:
- CHECK(return_loc_.value < total_regs_);
- *value = regs_[return_loc_.value];
- return true;
- case LOCATION_SP_OFFSET:
- AddressType return_value;
- if (!memory->Read(sp_ + return_loc_.value, &return_value, sizeof(return_value))) {
- return false;
- }
- *value = return_value;
- return true;
- case LOCATION_UNKNOWN:
- default:
- return false;
- }
-}
-
RegsArm::RegsArm()
: RegsImpl<uint32_t>(ARM_REG_LAST, ARM_REG_SP, Location(LOCATION_REGISTER, ARM_REG_LR)) {}