Loading libbacktrace/UnwindStack.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -99,8 +99,7 @@ bool UnwindStackCurrent::UnwindFromContext(size_t num_ignore_frames, ucontext_t* // one extra function call appearing in the unwind. unwindstack::RegsGetLocal(regs.get()); } else { regs.reset( unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentMachineType(), ucontext)); regs.reset(unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentArch(), ucontext)); } error_ = BACKTRACE_UNWIND_NO_ERROR; Loading @@ -120,8 +119,7 @@ bool UnwindStackPtrace::Unwind(size_t num_ignore_frames, ucontext_t* context) { if (context == nullptr) { regs.reset(unwindstack::Regs::RemoteGet(Tid())); } else { regs.reset( unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentMachineType(), context)); regs.reset(unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentArch(), context)); } error_ = BACKTRACE_UNWIND_NO_ERROR; Loading libunwindstack/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,10 @@ cc_library { "Maps.cpp", "Memory.cpp", "Regs.cpp", "RegsArm.cpp", "RegsArm64.cpp", "RegsX86.cpp", "RegsX86_64.cpp", "Unwinder.cpp", "Symbols.cpp", ], Loading libunwindstack/ArmExidx.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -23,11 +23,11 @@ #include <unwindstack/Log.h> #include <unwindstack/Memory.h> #include <unwindstack/Regs.h> #include <unwindstack/RegsArm.h> #include "ArmExidx.h" #include "Check.h" #include "Machine.h" #include "MachineArm.h" namespace unwindstack { Loading libunwindstack/Elf.cpp +10 −9 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ #include <unwindstack/Regs.h> #include "ElfInterfaceArm.h" #include "Machine.h" #include "Symbols.h" namespace unwindstack { Loading Loading @@ -183,18 +182,15 @@ ElfInterface* Elf::CreateInterfaceFromMemory(Memory* memory) { return nullptr; } if (e_machine != EM_ARM && e_machine != EM_386) { // Unsupported. ALOGI("32 bit elf that is neither arm nor x86: e_machine = %d\n", e_machine); return nullptr; } machine_type_ = e_machine; if (e_machine == EM_ARM) { arch_ = ARCH_ARM; interface.reset(new ElfInterfaceArm(memory)); } else if (e_machine == EM_386) { arch_ = ARCH_X86; interface.reset(new ElfInterface32(memory)); } else { // Unsupported. ALOGI("32 bit elf that is neither arm nor x86: e_machine = %d\n", e_machine); return nullptr; } Loading @@ -203,12 +199,17 @@ ElfInterface* Elf::CreateInterfaceFromMemory(Memory* memory) { if (!memory->ReadFully(EI_NIDENT + sizeof(Elf64_Half), &e_machine, sizeof(e_machine))) { return nullptr; } if (e_machine != EM_AARCH64 && e_machine != EM_X86_64) { machine_type_ = e_machine; if (e_machine == EM_AARCH64) { arch_ = ARCH_ARM64; } else if (e_machine == EM_X86_64) { arch_ = ARCH_X86_64; } else { // Unsupported. ALOGI("64 bit elf that is neither aarch64 nor x86_64: e_machine = %d\n", e_machine); return nullptr; } machine_type_ = e_machine; interface.reset(new ElfInterface64(memory)); } Loading libunwindstack/ElfInterfaceArm.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -18,11 +18,11 @@ #include <stdint.h> #include <unwindstack/Memory.h> #include <unwindstack/Regs.h> #include <unwindstack/RegsArm.h> #include "ArmExidx.h" #include "ElfInterfaceArm.h" #include "Machine.h" #include "MachineArm.h" namespace unwindstack { Loading Loading
libbacktrace/UnwindStack.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -99,8 +99,7 @@ bool UnwindStackCurrent::UnwindFromContext(size_t num_ignore_frames, ucontext_t* // one extra function call appearing in the unwind. unwindstack::RegsGetLocal(regs.get()); } else { regs.reset( unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentMachineType(), ucontext)); regs.reset(unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentArch(), ucontext)); } error_ = BACKTRACE_UNWIND_NO_ERROR; Loading @@ -120,8 +119,7 @@ bool UnwindStackPtrace::Unwind(size_t num_ignore_frames, ucontext_t* context) { if (context == nullptr) { regs.reset(unwindstack::Regs::RemoteGet(Tid())); } else { regs.reset( unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentMachineType(), context)); regs.reset(unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentArch(), context)); } error_ = BACKTRACE_UNWIND_NO_ERROR; Loading
libunwindstack/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,10 @@ cc_library { "Maps.cpp", "Memory.cpp", "Regs.cpp", "RegsArm.cpp", "RegsArm64.cpp", "RegsX86.cpp", "RegsX86_64.cpp", "Unwinder.cpp", "Symbols.cpp", ], Loading
libunwindstack/ArmExidx.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -23,11 +23,11 @@ #include <unwindstack/Log.h> #include <unwindstack/Memory.h> #include <unwindstack/Regs.h> #include <unwindstack/RegsArm.h> #include "ArmExidx.h" #include "Check.h" #include "Machine.h" #include "MachineArm.h" namespace unwindstack { Loading
libunwindstack/Elf.cpp +10 −9 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ #include <unwindstack/Regs.h> #include "ElfInterfaceArm.h" #include "Machine.h" #include "Symbols.h" namespace unwindstack { Loading Loading @@ -183,18 +182,15 @@ ElfInterface* Elf::CreateInterfaceFromMemory(Memory* memory) { return nullptr; } if (e_machine != EM_ARM && e_machine != EM_386) { // Unsupported. ALOGI("32 bit elf that is neither arm nor x86: e_machine = %d\n", e_machine); return nullptr; } machine_type_ = e_machine; if (e_machine == EM_ARM) { arch_ = ARCH_ARM; interface.reset(new ElfInterfaceArm(memory)); } else if (e_machine == EM_386) { arch_ = ARCH_X86; interface.reset(new ElfInterface32(memory)); } else { // Unsupported. ALOGI("32 bit elf that is neither arm nor x86: e_machine = %d\n", e_machine); return nullptr; } Loading @@ -203,12 +199,17 @@ ElfInterface* Elf::CreateInterfaceFromMemory(Memory* memory) { if (!memory->ReadFully(EI_NIDENT + sizeof(Elf64_Half), &e_machine, sizeof(e_machine))) { return nullptr; } if (e_machine != EM_AARCH64 && e_machine != EM_X86_64) { machine_type_ = e_machine; if (e_machine == EM_AARCH64) { arch_ = ARCH_ARM64; } else if (e_machine == EM_X86_64) { arch_ = ARCH_X86_64; } else { // Unsupported. ALOGI("64 bit elf that is neither aarch64 nor x86_64: e_machine = %d\n", e_machine); return nullptr; } machine_type_ = e_machine; interface.reset(new ElfInterface64(memory)); } Loading
libunwindstack/ElfInterfaceArm.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -18,11 +18,11 @@ #include <stdint.h> #include <unwindstack/Memory.h> #include <unwindstack/Regs.h> #include <unwindstack/RegsArm.h> #include "ArmExidx.h" #include "ElfInterfaceArm.h" #include "Machine.h" #include "MachineArm.h" namespace unwindstack { Loading