diff options
author | Florian Mayer <fmayer@google.com> | 2018-08-07 11:42:10 +0100 |
---|---|---|
committer | Florian Mayer <fmayer@google.com> | 2018-08-08 11:19:41 +0100 |
commit | 3f157066a5cdb1580f3707c381913b22c3093bb7 (patch) | |
tree | c38eba00c67ba922a9ef982c9f4ec8edf925c257 | |
parent | 499507910a65f69ce28a1edff5bd1cc621b9dea7 (diff) | |
download | unwinding-3f157066a5cdb1580f3707c381913b22c3093bb7.tar.gz |
Allow to get raw register data on all platforms.
No new test failures introduced.
atest libunwindstack_test on aosp_walleye-userdebug:
Without patch:
Total: 800, Passed: 781, Failed: 19
With patch:
Total: 800, Passed: 781, Failed: 19
Change-Id: I8853c3e1594799761b481464b75e2904b38c4830
-rw-r--r-- | libunwindstack/include/unwindstack/RegsGetLocal.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libunwindstack/include/unwindstack/RegsGetLocal.h b/libunwindstack/include/unwindstack/RegsGetLocal.h index 81c0af3..f0b5e3a 100644 --- a/libunwindstack/include/unwindstack/RegsGetLocal.h +++ b/libunwindstack/include/unwindstack/RegsGetLocal.h @@ -33,8 +33,7 @@ namespace unwindstack { #if defined(__arm__) -inline __always_inline void RegsGetLocal(Regs* regs) { - void* reg_data = regs->RawData(); +inline __attribute__((__always_inline__)) void AsmGetRegs(void* reg_data) { asm volatile( ".align 2\n" "bx pc\n" @@ -55,8 +54,7 @@ inline __always_inline void RegsGetLocal(Regs* regs) { #elif defined(__aarch64__) -inline __always_inline void RegsGetLocal(Regs* regs) { - void* reg_data = regs->RawData(); +inline __attribute__((__always_inline__)) void AsmGetRegs(void* reg_data) { asm volatile( "1:\n" "stp x0, x1, [%[base], #0]\n" @@ -87,11 +85,12 @@ inline __always_inline void RegsGetLocal(Regs* regs) { extern "C" void AsmGetRegs(void* regs); -inline void RegsGetLocal(Regs* regs) { +#endif + +inline __attribute__((__always_inline__)) void RegsGetLocal(Regs* regs) { AsmGetRegs(regs->RawData()); } -#endif } // namespace unwindstack |