*/
#include "qemu/osdep.h"
+#include "qemu/log.h"
#include "qemu.h"
+#include "gdbstub/user.h"
#include "signal-common.h"
#include "trace.h"
#include "hw/core/tcg-cpu-ops.h"
* We have to go based on the signal number now to figure out
* what's valid.
*/
+ si_type = QEMU_SI_NOINFO;
if (has_trapno(sig)) {
tinfo->_reason._fault._trapno = info->_reason._fault._trapno;
si_type = QEMU_SI_FAULT;
* capsicum is somewhere between weak and non-existant, but if we get
* one, then we know what to save.
*/
+#ifdef QEMU_SI_CAPSICUM
if (sig == TARGET_SIGTRAP) {
tinfo->_reason._capsicum._syscall =
info->_reason._capsicum._syscall;
si_type = QEMU_SI_CAPSICUM;
}
+#endif
break;
}
tinfo->si_code = deposit32(si_code, 24, 8, si_type);
/* Note: Not generated on FreeBSD */
__put_user(info->_reason._poll._band, &tinfo->_reason._poll._band);
break;
+#ifdef QEMU_SI_CAPSICUM
case QEMU_SI_CAPSICUM:
__put_user(info->_reason._capsicum._syscall,
&tinfo->_reason._capsicum._syscall);
break;
+#endif
default:
g_assert_not_reached();
}
}
/* Abort execution with signal. */
-static void QEMU_NORETURN dump_core_and_abort(int target_sig)
+static G_NORETURN
+void dump_core_and_abort(int target_sig)
{
CPUArchState *env = thread_cpu->env_ptr;
CPUState *cpu = env_cpu(env);
TaskState *ts = (TaskState *)thread_cpu->opaque;
for (i = 0; i < TARGET_NSIG_WORDS; i++) {
- if (__get_user(target_set.__bits[i],
- &ucontext->uc_sigmask.__bits[i])) {
- return -TARGET_EFAULT;
- }
+ __get_user(target_set.__bits[i], &ucontext->uc_sigmask.__bits[i]);
}
target_to_host_sigset_internal(&blocked, &target_set);
ts->signal_mask = blocked;