crash-stack: report on siginfo_t 35/103535/1
authorŁukasz Stelmach <l.stelmach@samsung.com>
Tue, 6 Dec 2016 09:31:30 +0000 (10:31 +0100)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Thu, 8 Dec 2016 13:43:13 +0000 (14:43 +0100)
Change-Id: I86e8058eded47f23c51d213fffb56f2f078931bc

src/crash-stack/crash-stack.c

index 4c7f8e8..b6dcde5 100644 (file)
@@ -318,9 +318,6 @@ static Dwfl *__open_dwfl_with_pid(pid_t pid)
                return NULL;
        }
 
-       if (ptrace(PTRACE_GETSIGINFO, pid, NULL, &__siginfo) != 0)
-               return NULL;
-
 
        ptrace(PTRACE_INTERRUPT, pid, 0, 0);
 
@@ -330,6 +327,9 @@ static Dwfl *__open_dwfl_with_pid(pid_t pid)
                return NULL;
        }
 
+       if (ptrace(PTRACE_GETSIGINFO, pid, NULL, &__siginfo) != 0)
+               return NULL;
+
        static const Dwfl_Callbacks proc_callbacks = {
                .find_elf = dwfl_linux_proc_find_elf,
                .find_debuginfo = dwfl_standard_find_debuginfo,