From: Mark Wielaard Date: Fri, 3 Jan 2014 21:42:46 +0000 (+0100) Subject: Merge branch 'master' into portable X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=00fa1b3472f18d17c4d488841850176739c6c40e;p=thirdparty%2Felfutils.git Merge branch 'master' into portable Adjusted libdwfl/linux-pid-attach.c for assume_ptrace_stopped. --- 00fa1b3472f18d17c4d488841850176739c6c40e diff --cc libdwfl/linux-pid-attach.c index 32eceb205,58d6942fe..b8a3c3ed1 --- a/libdwfl/linux-pid-attach.c +++ b/libdwfl/linux-pid-attach.c @@@ -238,23 -266,15 +266,26 @@@ pid_thread_detach (Dwfl_Thread *thread pid_t tid = INTUSE(dwfl_thread_tid) (thread); assert (pid_arg->tid_attached == tid); pid_arg->tid_attached = 0; - // Older kernels (tested kernel-2.6.18-348.12.1.el5.x86_64) need special - // handling of the detachment to keep the process State: T (stopped). - if (pid_arg->tid_was_stopped) - syscall (__NR_tkill, tid, SIGSTOP); - /* This handling is needed only on older Linux kernels such as - 2.6.32-358.23.2.el6.ppc64. Later kernels such as 3.11.7-200.fc19.x86_64 - remember the T (stopped) state themselves and no longer need to pass - SIGSTOP during PTRACE_DETACH. */ - ptrace (PTRACE_DETACH, tid, NULL, - (void *) (intptr_t) (pid_arg->tid_was_stopped ? SIGSTOP : 0)); - if (pid_arg->tid_was_stopped) + if (! pid_arg->assume_ptrace_stopped) { - // Wait till the SIGSTOP settles down. - int i; - for (i = 0; i < 100000; i++) - if (linux_proc_pid_is_stopped (tid)) - break; ++ // Older kernels (tested kernel-2.6.18-348.12.1.el5.x86_64) need special ++ // handling of the detachment to keep the process State: T (stopped). ++ if (pid_arg->tid_was_stopped) ++ syscall (__NR_tkill, tid, SIGSTOP); + /* This handling is needed only on older Linux kernels such as - 2.6.32-358.23.2.el6.ppc64. Later kernels such as - 3.11.7-200.fc19.x86_64 remember the T (stopped) state - themselves and no longer need to pass SIGSTOP during - PTRACE_DETACH. */ ++ 2.6.32-358.23.2.el6.ppc64. Later kernels such as 3.11.7-200.fc19.x86_64 ++ remember the T (stopped) state themselves and no longer need to pass ++ SIGSTOP during PTRACE_DETACH. */ + ptrace (PTRACE_DETACH, tid, NULL, + (void *) (intptr_t) (pid_arg->tid_was_stopped ? SIGSTOP : 0)); ++ if (pid_arg->tid_was_stopped) ++ { ++ // Wait till the SIGSTOP settles down. ++ int i; ++ for (i = 0; i < 100000; i++) ++ if (linux_proc_pid_is_stopped (tid)) ++ break; ++ } } } diff --cc tests/ChangeLog index ba6dab241,c68ae26cd..8f7ba8a65 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@@ -1,10 -1,103 +1,110 @@@ + 2014-01-03 Mark Wielaard + + * run-addrcfi.sh: Add case for EM_AARCH64. + * testfileaarch64.bz2: New testfile. + * Makefile.am (EXTRA_DIST): Add testfilesaarch64.bz2. + + 2013-12-30 Mark Wielaard + + * backtrace-dwarf.c (report_pid): Explicitly call + dwfl_linux_proc_attach and check for errors. + * backtrace.c (report_pid): Likewise. + + 2013-12-21 Mark Wielaard + + * backtrace.c (callback_verify): Only assert that case 5 is the last + instruction of backtracegen on x86_64 native. + + 2013-12-18 Jan Kratochvil + Mark Wielaard + + * Makefile.am (EXTRA_DIST): Add testfile66.bz2, testfile66.core.bz2 + and testfilebaz*ppc64*.bz2 files. + * dwflsyms.c (list_syms): Remove unused from parameter mod_name. Print + error on dwfl_module_getsymtab error. + (list_syms): Use dwfl_module_getsym and dwfl_module_getsym_info. + Compare values for non-ET_REL. Use dwfl_module_addrinfo. + Also print section of actual value if different from sym. + * run-addrname-test.sh (testfile66, testfile66.core): New tests. + Test addr2line -x by showing different sections for address and + found name in testfile66. + * run-dwflsyms.sh (testfile66, testfile66.core, hello_ppc64.ko, + testfilebaz*ppc64): New tests. + * testfile66.bz2, testfile66.core.bz2, testfilebazdbgppc64.bz2, + testfilebazdbgppc64.debug.bz2, testfilebazdbgppc64_pl.bz2, + testfilebazdbgppc64_plr.bz2, testfilebazdynppc64.bz2, + testfilebazmdbppc64.bz2, testfilebazminppc64.bz2, + testfilebazminppc64_pl.bz2, testfilebazminppc64_plr.bz2, + testfilebaztabppc64.bz2: New test files. + + 2013-12-18 Jan Kratochvil + + unwinder: s390 and s390x + * Makefile.am (TESTS): Add run-backtrace-core-s390x.sh and + run-backtrace-core-s390.sh. + (EXTRA_DIST): Add backtrace.s390x.core.bz2, backtrace.s390x.exec.bz2, + backtrace.s390.core.bz2, backtrace.s390.exec.bz2, + run-backtrace-core-s390x.sh and run-backtrace-core-s390.sh. + * backtrace.s390.core.bz2: New file. + * backtrace.s390.exec.bz2: New file. + * backtrace.s390x.core.bz2: New file. + * backtrace.s390x.exec.bz2: New file. + * run-backtrace-core-s390.sh: New file. + * run-backtrace-core-s390x.sh: New file. + + 2013-12-17 Jan Kratochvil + + * backtrace-dwarf.c (executable, find_elf, dwfl_offline): Remove unused + code. + + 2013-12-15 Jan Kratochvil + + unwinder: ppc + * Makefile.am (TESTS): Add run-backtrace-core-ppc.sh. + (EXTRA_DIST): Add backtrace.ppc.core.bz2, + backtrace.ppc.exec.bz2 and run-backtrace-core-ppc.sh. + * backtrace.ppc.core.bz2: New file. + * backtrace.ppc.exec.bz2: New file. + * run-backtrace-core-ppc.sh: New file. + + 2013-12-10 Mark Wielaard + + * Makefile.am (backtrace_child_biarch_SOURCES): New backtrace-child.c. + + 2013-12-10 Mark Wielaard + + * Makefile.am (valgrind_cmd): Remove --trace-children=yes. + * backtrace-subr.sh (check_native_core): Disable valgrind while + dumping core. + * run-backtrace-data.sh: Disable valgrind. + * run-backtrace-dwarf.sh: Likewise. + + 2013-12-09 Mark Wielaard + + * varlocs.c (print_expr): Update comment to explain empty location + associated with DW_OP_GNU_implicit_pointer. + + 2013-12-05 Jan Kratochvil + + Fix test FAIL with -O2. + * backtrace-child.c (sigusr2): Add NOINLINE_NOCLONE and final asm stub. + + 2013-12-05 Mark Wielaard + + * backtrace-data.c (main): If unsupported also print to stderr. + * run-backtrace-dwarf.sh: Add check_unsupported and check_main. + + 2013-12-04 Mark Wielaard + + * Makefile.am (backtrace-child-biarch): Add $(EXEEXT). + +2013-12-02 Jan Kratochvil + + Handle T-stopped detach for old kernels. + * backtrace.c: Include sys/syscall.h. + (linux_proc_pid_is_stopped): New function. + (ptrace_detach_stopped): Handle old kernels. + 2013-12-02 Jan Kratochvil * Makefile.am (check_PROGRAMS): Add backtrace, backtrace-child,