Merge branch 'upstream' into tizen 43/247943/1
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Wed, 18 Nov 2020 11:52:06 +0000 (12:52 +0100)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>
Wed, 18 Nov 2020 11:52:06 +0000 (12:52 +0100)
Change-Id: I096f682ce2462ae947c230ccaea37e26c195fd77

1  2 
configure.ac
include/libunwind-aarch64.h
include/libunwind-arm.h
src/arm/Gtrace.c
src/coredump/_UCD_create.c
src/mips/unwind_i.h
src/ptrace/_UPT_access_fpreg.c
src/tilegx/unwind_i.h
tests/Makefile.am

diff --cc configure.ac
Simple merge
@@@ -175,9 -175,31 +175,32 @@@ typedef ucontext_t unw_tdep_context_t
  #include "libunwind-common.h"
  #include "libunwind-dynamic.h"
  
- #define unw_tdep_getcontext(uc)         (getcontext (uc), 0)
- #define unw_tdep_is_fpreg               UNW_ARCH_OBJ(is_fpreg)
+ #define unw_tdep_getcontext(uc) (({                                   \
+   unw_tdep_context_t *unw_ctx = (uc);                                 \
+   register uint64_t *unw_base asm ("x0") = (uint64_t*) unw_ctx->uc_mcontext.regs;             \
+   __asm__ __volatile__ (                                              \
+      "stp x0, x1, [%[base], #0]\n" \
+      "stp x2, x3, [%[base], #16]\n" \
+      "stp x4, x5, [%[base], #32]\n" \
+      "stp x6, x7, [%[base], #48]\n" \
+      "stp x8, x9, [%[base], #64]\n" \
+      "stp x10, x11, [%[base], #80]\n" \
+      "stp x12, x13, [%[base], #96]\n" \
+      "stp x14, x13, [%[base], #112]\n" \
+      "stp x16, x17, [%[base], #128]\n" \
+      "stp x18, x19, [%[base], #144]\n" \
+      "stp x20, x21, [%[base], #160]\n" \
+      "stp x22, x23, [%[base], #176]\n" \
+      "stp x24, x25, [%[base], #192]\n" \
+      "stp x26, x27, [%[base], #208]\n" \
+      "stp x28, x29, [%[base], #224]\n" \
+      "str x30, [%[base], #240]\n" \
+      "mov x1, sp\n" \
+      "stp x1, x30, [%[base], #248]\n" \
+      : [base] "+r" (unw_base) : : "x1", "memory"); \
+   }), 0)
+ #define unw_tdep_is_fpreg             UNW_ARCH_OBJ(is_fpreg)
 +#define _UPT_get_fpreg(fpreg, reg)      &fpreg.vregs[reg]
  
  extern int unw_tdep_is_fpreg (int);
  
Simple merge
@@@ -513,6 -513,9 +513,7 @@@ tdep_trace (unw_cursor_t *cursor, void 
           doesn't save the link register in the prologue, e.g. kill. */
        if (likely(ret >= 0))
          ACCESS_MEM_FAST(ret, c->validate, d, cfa + LINUX_SC_LR_OFF, lr);
 -#elif defined(__FreeBSD__)
 -      printf("XXX\n");
+ #endif
  
        /* Resume stack at signal restoration point. The stack is not
           necessarily continuous here, especially with sigaltstack(). */
        d->use_prev_instr = 0;
        break;
  
 -      printf("XXX1\n");
+     case UNW_ARM_FRAME_SYSCALL:
+       break;
      default:
        /* We cannot trace through this frame, give up and tell the
            caller we had to stop.  Data collected so far may still be
Simple merge
index 0000000,0000000..3382dcf
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,43 @@@
++/* libunwind - a platform-independent unwind library
++   Copyright (C) 2008 CodeSourcery
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
++
++#ifndef unwind_i_h
++#define unwind_i_h
++
++#include <stdint.h>
++
++#include <libunwind-mips.h>
++
++#include "libunwind_i.h"
++
++#define mips_lock                       UNW_OBJ(lock)
++#define mips_local_resume               UNW_OBJ(local_resume)
++#define mips_local_addr_space_init      UNW_OBJ(local_addr_space_init)
++
++extern int mips_local_resume (unw_addr_space_t as, unw_cursor_t *cursor,
++                             void *arg);
++
++extern void mips_local_addr_space_init (void);
++
++#endif /* unwind_i_h */
Simple merge
index 0000000,0000000..9d41c90
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,46 @@@
++/* libunwind - a platform-independent unwind library
++   Copyright (C) 2008 CodeSourcery
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
++
++#ifndef unwind_i_h
++#define unwind_i_h
++
++#include <memory.h>
++#include <stdint.h>
++
++#include <libunwind-tilegx.h>
++
++#include "libunwind_i.h"
++
++#define tilegx_local_resume            UNW_OBJ(local_resume)
++#define tilegx_local_addr_space_init   UNW_OBJ(local_addr_space_init)
++
++extern int tilegx_local_resume (unw_addr_space_t as,
++                                unw_cursor_t *cursor,
++                                void *arg);
++#define tilegx_handle_signal_frame UNW_OBJ(handle_signal_frame)
++extern int tilegx_handle_signal_frame(unw_cursor_t *cursor);
++
++extern void tilegx_local_addr_space_init (void);
++
++#endif /* unwind_i_h */
Simple merge