? lldb-server-4.0..core Index: external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex =================================================================== RCS file: /cvsroot/src/external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex,v retrieving revision 1.3 diff -u -r1.3 mutex --- external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex 24 Dec 2016 15:48:26 -0000 1.3 +++ external/gpl3/gcc/dist/libstdc++-v3/include/std/mutex 27 Dec 2016 19:12:25 -0000 @@ -695,7 +695,7 @@ call_once(once_flag& __once, _Callable&& __f, _Args&&... __args); }; -#ifdef _GLIBCXX_HAVE_TLS +#if defined(_GLIBCXX_HAVE_TLS) && defined(FIXME_PR_51139) extern __thread void* __once_callable; extern __thread void (*__once_call)(); @@ -722,7 +722,7 @@ void call_once(once_flag& __once, _Callable&& __f, _Args&&... __args) { -#ifdef _GLIBCXX_HAVE_TLS +#if defined(_GLIBCXX_HAVE_TLS) && defined(FIXME_PR_51139) auto __bound_functor = std::__bind_simple(std::forward<_Callable>(__f), std::forward<_Args>(__args)...); __once_callable = std::__addressof(__bound_functor); @@ -737,7 +737,7 @@ int __e = __gthread_once(&__once._M_once, &__once_proxy); -#ifndef _GLIBCXX_HAVE_TLS +#if !defined(_GLIBCXX_HAVE_TLS) || !defined(FIXME_PR_51139) if (__functor_lock) __set_once_functor_lock_ptr(0); #endif Index: external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc =================================================================== RCS file: /cvsroot/src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc,v retrieving revision 1.3 diff -u -r1.3 mutex.cc --- external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc 24 Dec 2016 15:48:26 -0000 1.3 +++ external/gpl3/gcc/dist/libstdc++-v3/src/c++11/mutex.cc 27 Dec 2016 19:12:25 -0000 @@ -25,7 +25,7 @@ #include #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) -#ifndef _GLIBCXX_HAVE_TLS +#if !defined(_GLIBCXX_HAVE_TLS) || !defined(FIXME_PR_51139) namespace { inline std::unique_lock*& @@ -41,7 +41,7 @@ { _GLIBCXX_BEGIN_NAMESPACE_VERSION -#ifdef _GLIBCXX_HAVE_TLS +#if defined(_GLIBCXX_HAVE_TLS) && defined(FIXME_PR_51139) __thread void* __once_callable; __thread void (*__once_call)(); #else @@ -76,7 +76,7 @@ { void __once_proxy() { -#ifndef _GLIBCXX_HAVE_TLS +#if !defined(_GLIBCXX_HAVE_TLS) || !defined(FIXME_PR_51139) function __once_call = std::move(__once_functor); if (unique_lock* __lock = __get_once_functor_lock_ptr()) { Index: sys/kern/core_elf32.c =================================================================== RCS file: /cvsroot/src/sys/kern/core_elf32.c,v retrieving revision 1.49 diff -u -r1.49 core_elf32.c --- sys/kern/core_elf32.c 29 Sep 2016 20:40:53 -0000 1.49 +++ sys/kern/core_elf32.c 27 Dec 2016 19:13:20 -0000 @@ -357,8 +357,8 @@ /* First, write an elfcore_procinfo. */ cpi.cpi_version = NETBSD_ELFCORE_PROCINFO_VERSION; cpi.cpi_cpisize = sizeof(cpi); - cpi.cpi_signo = p->p_sigctx.ps_signo; - cpi.cpi_sigcode = p->p_sigctx.ps_code; + cpi.cpi_signo = p->p_sigctx.ps_info._signo; + cpi.cpi_sigcode = p->p_sigctx.ps_info._code; cpi.cpi_siglwp = p->p_sigctx.ps_lwp; /* Index: sys/kern/core_netbsd.c =================================================================== RCS file: /cvsroot/src/sys/kern/core_netbsd.c,v retrieving revision 1.22 diff -u -r1.22 core_netbsd.c --- sys/kern/core_netbsd.c 7 Jan 2014 07:59:03 -0000 1.22 +++ sys/kern/core_netbsd.c 27 Dec 2016 19:13:20 -0000 @@ -88,8 +88,8 @@ cs.core.c_midmag = 0; strncpy(cs.core.c_name, p->p_comm, MAXCOMLEN); cs.core.c_nseg = 0; - cs.core.c_signo = p->p_sigctx.ps_signo; - cs.core.c_ucode = p->p_sigctx.ps_code; + cs.core.c_signo = p->p_sigctx.ps_info._signo; + cs.core.c_ucode = p->p_sigctx.ps_info._code; cs.core.c_cpusize = 0; cs.core.c_tsize = (u_long)ctob(vm->vm_tsize); cs.core.c_dsize = (u_long)ctob(vm->vm_dsize); Index: sys/kern/kern_sig.c =================================================================== RCS file: /cvsroot/src/sys/kern/kern_sig.c,v retrieving revision 1.331 diff -u -r1.331 kern_sig.c --- sys/kern/kern_sig.c 4 Dec 2016 16:40:43 -0000 1.331 +++ sys/kern/kern_sig.c 27 Dec 2016 19:13:21 -0000 @@ -1240,8 +1240,7 @@ /* XXX for core dump/debugger */ p->p_sigctx.ps_lwp = ksi->ksi_lid; - p->p_sigctx.ps_signo = ksi->ksi_signo; - p->p_sigctx.ps_code = ksi->ksi_trap; + p->p_sigctx.ps_info = ksi->ksi_info; /* * Notify any interested parties of the signal. @@ -1947,8 +1946,7 @@ KASSERT(mutex_owned(p->p_lock)); p->p_sigctx.ps_lwp = 0; - p->p_sigctx.ps_code = 0; - p->p_sigctx.ps_signo = 0; + memset(&p->p_sigctx.ps_info, 0, sizeof(p->p_sigctx.ps_info)); mutex_enter(&ps->sa_mutex); sigplusset(&SIGACTION_PS(ps, signo).sa_mask, &l->l_sigmask); @@ -1989,6 +1987,7 @@ int exitsig, error, docore; struct proc *p; struct lwp *t; + ksiginfo_t ksi; p = l->l_proc; @@ -2053,7 +2052,9 @@ exitsig = signo; p->p_acflag |= AXSIG; - p->p_sigctx.ps_signo = signo; + if (!siggetinfo(&l->l_sigpend, &ksi, signo)) + (void)siggetinfo(&p->p_sigpend, &ksi, signo); + p->p_sigctx.ps_info = ksi.ksi_info; if (docore) { mutex_exit(p->p_lock); Index: sys/kern/sys_ptrace_common.c =================================================================== RCS file: /cvsroot/src/sys/kern/sys_ptrace_common.c,v retrieving revision 1.7 diff -u -r1.7 sys_ptrace_common.c --- sys/kern/sys_ptrace_common.c 15 Dec 2016 12:04:18 -0000 1.7 +++ sys/kern/sys_ptrace_common.c 27 Dec 2016 19:13:21 -0000 @@ -901,6 +901,7 @@ lt = LIST_NEXT(lt, l_sibling); pl.pl_lwpid = 0; pl.pl_event = 0; + memset(&pl.pl_siginfo, 0, sizeof(pl.pl_siginfo)); if (lt) { lwp_addref(lt); pl.pl_lwpid = lt->l_lid; @@ -911,8 +912,10 @@ * check ps_signo too. */ if (lt->l_lid == t->p_sigctx.ps_lwp - || (t->p_sigctx.ps_lwp == 0 && t->p_sigctx.ps_signo)) + || (t->p_sigctx.ps_lwp == 0 && t->p_sigctx.ps_info._signo)) { pl.pl_event = PL_EVENT_SIGNAL; + pl.pl_siginfo._info = t->p_sigctx.ps_info; + } } mutex_exit(t->p_lock); Index: sys/sys/ptrace.h =================================================================== RCS file: /cvsroot/src/sys/sys/ptrace.h,v retrieving revision 1.51 diff -u -r1.51 ptrace.h --- sys/sys/ptrace.h 15 Dec 2016 20:04:36 -0000 1.51 +++ sys/sys/ptrace.h 27 Dec 2016 19:13:24 -0000 @@ -34,6 +34,8 @@ #ifndef _SYS_PTRACE_H_ #define _SYS_PTRACE_H_ +#include + #define PT_TRACE_ME 0 /* child declares it's being traced */ #define PT_READ_I 1 /* read word in child's I space */ #define PT_READ_D 2 /* read word in child's D space */ @@ -110,8 +112,9 @@ * Argument structure for PT_LWPINFO. */ struct ptrace_lwpinfo { - lwpid_t pl_lwpid; /* LWP described */ - int pl_event; /* Event that stopped the LWP */ + lwpid_t pl_lwpid; /* LWP described */ + int pl_event; /* Event that stopped the LWP */ + siginfo_t pl_siginfo; /* siginfo for signal event */ /* Add fields at the end */ }; Index: sys/sys/signalvar.h =================================================================== RCS file: /cvsroot/src/sys/sys/signalvar.h,v retrieving revision 1.87 diff -u -r1.87 signalvar.h --- sys/sys/signalvar.h 4 Aug 2016 06:43:43 -0000 1.87 +++ sys/sys/signalvar.h 27 Dec 2016 19:13:24 -0000 @@ -74,12 +74,11 @@ * Process signal state. */ struct sigctx { - int ps_signo; /* for core dump/debugger XXX */ - int ps_code; /* for core dump/debugger XXX */ - int ps_lwp; /* for core dump/debugger XXX */ + struct _ksiginfo ps_info; /* for core dump/debugger XXX */ + int ps_lwp; /* for core dump/debugger XXX */ void *ps_sigcode; /* address of signal trampoline */ - sigset_t ps_sigignore; /* Signals being ignored. */ - sigset_t ps_sigcatch; /* Signals being caught by user. */ + sigset_t ps_sigignore; /* Signals being ignored. */ + sigset_t ps_sigcatch; /* Signals being caught by user. */ }; /* additional signal action values, used only temporarily/internally */ Index: tests/kernel/t_ptrace_wait.c =================================================================== RCS file: /cvsroot/src/tests/kernel/t_ptrace_wait.c,v retrieving revision 1.47 diff -u -r1.47 t_ptrace_wait.c --- tests/kernel/t_ptrace_wait.c 13 Dec 2016 12:25:05 -0000 1.47 +++ tests/kernel/t_ptrace_wait.c 27 Dec 2016 19:13:30 -0000 @@ -4286,7 +4286,7 @@ #if defined(TWAIT_HAVE_STATUS) int status; #endif - struct ptrace_lwpinfo info = {0, 0}; + struct ptrace_lwpinfo info = {}; printf("Before forking process PID=%d\n", getpid()); ATF_REQUIRE((child = fork()) != -1); @@ -4357,7 +4357,7 @@ #if defined(TWAIT_HAVE_STATUS) int status; #endif - struct ptrace_lwpinfo info = {0, 0}; + struct ptrace_lwpinfo info = {}; printf("Spawn tracee\n"); ATF_REQUIRE(msg_open(&parent_tracee) == 0);