}
/* abort execution with signal */
-static void QEMU_NORETURN force_sig(int sig)
+static void QEMU_NORETURN force_sig(int target_sig)
{
TaskState *ts = (TaskState *)thread_env->opaque;
int host_sig, core_dumped = 0;
struct sigaction act;
- host_sig = target_to_host_signal(sig);
- gdb_signalled(thread_env, sig);
+ host_sig = target_to_host_signal(target_sig);
+ gdb_signalled(thread_env, target_sig);
/* dump core if supported by target binary format */
- if (core_dump_signal(sig) && (ts->bprm->core_dump != NULL)) {
+ if (core_dump_signal(target_sig) && (ts->bprm->core_dump != NULL)) {
stop_all_tasks();
core_dumped =
- ((*ts->bprm->core_dump)(sig, thread_env) == 0);
+ ((*ts->bprm->core_dump)(target_sig, thread_env) == 0);
}
if (core_dumped) {
/* we already dumped the core of target process, we don't want
nodump.rlim_cur=0;
setrlimit(RLIMIT_CORE, &nodump);
(void) fprintf(stderr, "qemu: uncaught target signal %d (%s) - %s\n",
- sig, strsignal(host_sig), "core dumped" );
+ target_sig, strsignal(host_sig), "core dumped" );
}
/* The proper exit code for dieing from an uncaught signal is
badframe:
unlock_user_struct(frame, frame_addr, 0);
- force_sig(SIGSEGV /* , current */);
+ force_sig(TARGET_SIGSEGV /* , current */);
return 0;
}
badframe:
unlock_user_struct(frame, frame_addr, 0);
- force_sig(SIGSEGV /* , current */);
+ force_sig(TARGET_SIGSEGV /* , current */);
return 0;
}
badframe:
unlock_user_struct(frame, frame_addr, 0);
- force_sig(SIGSEGV /* , current */);
+ force_sig(TARGET_SIGSEGV /* , current */);
return 0;
}
badframe:
unlock_user_struct(frame, frame_addr, 0);
- force_sig(SIGSEGV /* , current */);
+ force_sig(TARGET_SIGSEGV /* , current */);
return 0;
}
return;
do_sigsegv:
unlock_user_struct(ucp, ucp_addr, 0);
- force_sig(SIGSEGV);
+ force_sig(TARGET_SIGSEGV);
}
void sparc64_get_context(CPUSPARCState *env)
return;
do_sigsegv:
unlock_user_struct(ucp, ucp_addr, 1);
- force_sig(SIGSEGV);
+ force_sig(TARGET_SIGSEGV);
}
#endif
#elif defined(TARGET_ABI_MIPSN64)
give_sigsegv:
unlock_user_struct(frame, frame_addr, 1);
- force_sig(SIGSEGV);
+ force_sig(TARGET_SIGSEGV);
}
static void setup_rt_frame(int sig, struct target_sigaction *ka,
give_sigsegv:
unlock_user_struct(frame, frame_addr, 1);
- force_sig(SIGSEGV);
+ force_sig(TARGET_SIGSEGV);
}
long do_sigreturn(CPUState *regs)
unlock_user_struct(frame, frame_addr, 1);
if (logfile)
fprintf (logfile, "segfaulting from setup_frame\n");
- force_sig(SIGSEGV);
+ force_sig(TARGET_SIGSEGV);
}
static void setup_rt_frame(int sig, struct target_sigaction *ka,
unlock_user_struct(rt_sf, rt_sf_addr, 1);
if (logfile)
fprintf (logfile, "segfaulting from setup_rt_frame\n");
- force_sig(SIGSEGV);
+ force_sig(TARGET_SIGSEGV);
}
unlock_user_struct(sc, sc_addr, 1);
if (logfile)
fprintf (logfile, "segfaulting from do_sigreturn\n");
- force_sig(SIGSEGV);
+ force_sig(TARGET_SIGSEGV);
return 0;
}
unlock_user_struct(rt_sf, rt_sf_addr, 1);
if (logfile)
fprintf (logfile, "segfaulting from do_rt_sigreturn\n");
- force_sig(SIGSEGV);
+ force_sig(TARGET_SIGSEGV);
return 0;
}
give_sigsegv:
unlock_user_struct(frame, frame_addr, 1);
- force_sig(SIGSEGV);
+ force_sig(TARGET_SIGSEGV);
}
static inline int target_rt_setup_ucontext(struct target_ucontext *uc,
give_sigsegv:
unlock_user_struct(frame, frame_addr, 1);
- force_sig(SIGSEGV);
+ force_sig(TARGET_SIGSEGV);
}
long do_sigreturn(CPUState *env)