Commit d2860e72 by David S. Miller Committed by David S. Miller

Get sparc building again after ASAN merge.

libsanitizer/

	* asan/asan_linux.cc (GetPcSpBp): Add sparc support.

From-SVN: r193468
parent 097f98d4
2012-11-12 David S. Miller <davem@davemloft.net>
* asan/asan_linux.cc (GetPcSpBp): Add sparc support.
2012-10-29 Wei Mi <wmi@google.com> 2012-10-29 Wei Mi <wmi@google.com>
Initial checkin: migrate asan runtime from llvm. Initial checkin: migrate asan runtime from llvm.
...@@ -66,6 +66,20 @@ void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) { ...@@ -66,6 +66,20 @@ void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
*pc = ucontext->uc_mcontext.gregs[REG_EIP]; *pc = ucontext->uc_mcontext.gregs[REG_EIP];
*bp = ucontext->uc_mcontext.gregs[REG_EBP]; *bp = ucontext->uc_mcontext.gregs[REG_EBP];
*sp = ucontext->uc_mcontext.gregs[REG_ESP]; *sp = ucontext->uc_mcontext.gregs[REG_ESP];
# elif defined(__sparc__)
ucontext_t *ucontext = (ucontext_t*)context;
uptr *stk_ptr;
# if defined (__arch64__)
*pc = ucontext->uc_mcontext.mc_gregs[MC_PC];
*sp = ucontext->uc_mcontext.mc_gregs[MC_O6];
stk_ptr = (uptr *) (*sp + 2047);
*bp = stk_ptr[15];
# else
*pc = ucontext->uc_mcontext.gregs[REG_PC];
*sp = ucontext->uc_mcontext.gregs[REG_O6];
stk_ptr = (uptr *) *sp;
*bp = stk_ptr[15];
# endif
#else #else
# error "Unsupported arch" # error "Unsupported arch"
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment