diff options
| author | Mark Wielaard <[email protected]> | 2014-01-05 21:44:53 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2014-01-05 21:44:53 +0100 |
| commit | 7c463121a7806dfc0d7a50d130a5d49e074b742c (patch) | |
| tree | 679b4b5976354d863a1aec6361f28c3768d44d01 /tests/backtrace-dwarf.c | |
| parent | 14e5056319def0555bc4183488e7af5c14a3fb28 (diff) | |
| parent | 27aae18ce872409b70afef8503941c7e75c8d93d (diff) | |
Merge branch 'master' into robustifyupstream/robustify
Diffstat (limited to 'tests/backtrace-dwarf.c')
| -rw-r--r-- | tests/backtrace-dwarf.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c index 3a3e7632..f75e1202 100644 --- a/tests/backtrace-dwarf.c +++ b/tests/backtrace-dwarf.c @@ -42,7 +42,7 @@ report_pid (Dwfl *dwfl, pid_t pid) if (dwfl_report_end (dwfl, NULL, NULL) != 0) error (2, 0, "dwfl_report_end: %s", dwfl_errmsg (-1)); - result = dwfl_linux_proc_attach (dwfl, pid, false); + result = dwfl_linux_proc_attach (dwfl, pid, true); if (result < 0) error (2, 0, "dwfl_linux_proc_attach: %s", dwfl_errmsg (-1)); else if (result > 0) @@ -106,15 +106,6 @@ thread_callback (Dwfl_Thread *thread, void *thread_arg) error (1, 0, "dwfl_thread_getframes: %s", dwfl_errmsg (-1)); } -static void -ptrace_detach_stopped (pid_t pid) -{ - errno = 0; - long l = ptrace (PTRACE_DETACH, pid, NULL, (void *) (intptr_t) SIGSTOP); - assert_perror (errno); - assert (l == 0); -} - int main (int argc __attribute__ ((unused)), char **argv) { @@ -151,8 +142,6 @@ main (int argc __attribute__ ((unused)), char **argv) assert (WIFSTOPPED (status)); assert (WSTOPSIG (status) == SIGABRT); - ptrace_detach_stopped (pid); - Dwfl *dwfl = pid_to_dwfl (pid); dwfl_getthreads (dwfl, thread_callback, NULL); |
