mcexec print signum or exit status
This commit is contained in:
@@ -610,6 +610,14 @@ int main_loop(int fd, int cpu, pthread_mutex_t *lock)
|
|||||||
|
|
||||||
__dprintf("__NR_exit/__NR_exit_group: %ld (cpu_id: %d)\n",
|
__dprintf("__NR_exit/__NR_exit_group: %ld (cpu_id: %d)\n",
|
||||||
w.sr.args[0], cpu);
|
w.sr.args[0], cpu);
|
||||||
|
if(w.sr.number == __NR_exit_group){
|
||||||
|
int sig = w.sr.args[0] & 0x7f;
|
||||||
|
int term = (w.sr.args[0] & 0xff00) >> 8;
|
||||||
|
if(sig)
|
||||||
|
fprintf(stderr, "Terminate by signal %d\n", sig);
|
||||||
|
else if(term)
|
||||||
|
fprintf(stderr, "Exit status: %d\n", term);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef USE_SYSCALL_MOD_CALL
|
#ifdef USE_SYSCALL_MOD_CALL
|
||||||
#ifdef CMD_DCFA
|
#ifdef CMD_DCFA
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ terminate(int rc, int sig, ihk_mc_user_context_t *ctx)
|
|||||||
struct process *proc = cpu_local_var(current);
|
struct process *proc = cpu_local_var(current);
|
||||||
|
|
||||||
request.number = __NR_exit_group;
|
request.number = __NR_exit_group;
|
||||||
|
request.args[0] = ((rc & 0x00ff) << 8) | (sig & 0x7f);
|
||||||
|
|
||||||
#ifdef DCFA_KMOD
|
#ifdef DCFA_KMOD
|
||||||
do_mod_exit(rc);
|
do_mod_exit(rc);
|
||||||
|
|||||||
Reference in New Issue
Block a user