Quickfix for a compilation issue on aarch64.
Change-Id: I390dfaffba12ebe5692cf5d821abb56168d24a0c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
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
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
}
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));
}
#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 {
#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)
void *fun(void *arg)
{
- int threadnum = (int)arg;
+ intptr_t threadnum = (intptr_t)arg;
if (crash_other_thread && threadnum == CRASHING_THREAD)
crasher(NULL);
else
}
pthread_t t;
- int i;
+ intptr_t i;
for (i = 0; i <= CRASHING_THREAD; i++)
pthread_create(&t, NULL, fun, (void *)i);