Release 5.5.13 21/206721/1 submit/tizen/20190523.190019
authorMichal Bloch <m.bloch@samsung.com>
Thu, 23 May 2019 16:57:24 +0000 (18:57 +0200)
committerMichal Bloch <m.bloch@samsung.com>
Thu, 23 May 2019 18:07:07 +0000 (20:07 +0200)
Quickfix for a compilation issue on aarch64.

Change-Id: I390dfaffba12ebe5692cf5d821abb56168d24a0c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
packaging/crash-worker.spec
packaging/crash-worker_system-tests.spec
src/livedumper/livedumper.hpp
src/livedumper/note.hpp
tests/test3.c

index 3cf5782..dfa19b8 100644 (file)
@@ -14,7 +14,7 @@
 
 Name:      crash-worker
 Summary:    Crash-manager
-Version:    5.5.12
+Version:    5.5.13
 Release:    1
 Group:      Framework/system
 License:    Apache-2.0 and BSD
index f18e16f..03dcd48 100644 (file)
@@ -8,7 +8,7 @@
 
 Name:          crash-worker_system-tests
 Summary:       Package with binaries and scripts for crash-worker system tests
-Version:       5.5.12
+Version:       5.5.13
 Release:       1
 Group:         Framework/system
 License:       Apache-2.0 and BSD
index b478b40..5b97066 100644 (file)
@@ -98,7 +98,12 @@ class LiveDumper {
        }
 
        void GetRegs(user_regs_struct *registers, pid_t pid) const {
+#if defined(__aarch64__)
+               struct iovec iov = { registers, sizeof *registers };
+               if (ptrace(PTRACE_GETREGSET, pid, NT_PRSTATUS, &iov) == -1)
+#else
                if (ptrace(PTRACE_GETREGS, pid, nullptr, registers) == -1)
+#endif
                        throw std::system_error(errno, std::system_category(),
                                                                        "failed to get registers for: " + std::to_string(pid));
        }
index 19b9927..6977c08 100644 (file)
 #if defined(__arm__)
 typedef user_regs user_regs_struct;
 #define MACHINE EM_ARM
+#elif defined(__aarch64__)
+#define MACHINE EM_AARCH64
 #elif defined(__x86_64__)
 #define MACHINE EM_X86_64
 #elif defined(__i386__)
 #define MACHINE EM_386
+#else
+#error "architecture unsupported"
 #endif
 
 class Note {
index ca6ae03..b61f3ff 100644 (file)
@@ -2,7 +2,7 @@
 #include <gio/gio.h>
 #include <stdio.h>
 
-int crash_other_thread = 0;
+intptr_t crash_other_thread = 0;
 #define CRASHING_THREAD 19
 
 gboolean crasher(gpointer data)
@@ -13,7 +13,7 @@ gboolean crasher(gpointer data)
 
 void *fun(void *arg)
 {
-       int threadnum = (int)arg;
+       intptr_t threadnum = (intptr_t)arg;
        if (crash_other_thread && threadnum == CRASHING_THREAD)
                crasher(NULL);
        else
@@ -35,7 +35,7 @@ int main(int argc)
        }
 
        pthread_t t;
-       int i;
+       intptr_t i;
 
        for (i = 0; i <= CRASHING_THREAD; i++)
                pthread_create(&t, NULL, fun, (void *)i);