linux-user: Report error message on stderr, rather than stdout
Code change produced with: git ls-files linux-user | \ xargs sed -i -E 's/(\s+)printf\s*\(("Unhandled.*)\);/\1fprintf(stderr, \2);/g' Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20180706155127.7483-4-f4bug@amsat.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
8f0ea81643
commit
84ca4fa99d
@ -196,7 +196,7 @@ void cpu_loop(CPUAlphaState *env)
|
||||
arch_interrupt = false;
|
||||
break;
|
||||
default:
|
||||
printf ("Unhandled trap: 0x%x\n", trapnr);
|
||||
fprintf(stderr, "Unhandled trap: 0x%x\n", trapnr);
|
||||
cpu_dump_state(cs, stderr, fprintf, 0);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ void cpu_loop(CPUCRISState *env)
|
||||
cpu_exec_step_atomic(cs);
|
||||
break;
|
||||
default:
|
||||
printf ("Unhandled trap: 0x%x\n", trapnr);
|
||||
fprintf(stderr, "Unhandled trap: 0x%x\n", trapnr);
|
||||
cpu_dump_state(cs, stderr, fprintf, 0);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -105,8 +105,8 @@ void cpu_loop(CPUMBState *env)
|
||||
queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info);
|
||||
break;
|
||||
default:
|
||||
printf("Unhandled hw-exception: 0x%" PRIx64 "\n",
|
||||
env->sregs[SR_ESR] & ESR_EC_MASK);
|
||||
fprintf(stderr, "Unhandled hw-exception: 0x%" PRIx64 "\n",
|
||||
env->sregs[SR_ESR] & ESR_EC_MASK);
|
||||
cpu_dump_state(cs, stderr, fprintf, 0);
|
||||
exit(EXIT_FAILURE);
|
||||
break;
|
||||
@ -130,7 +130,7 @@ void cpu_loop(CPUMBState *env)
|
||||
cpu_exec_step_atomic(cs);
|
||||
break;
|
||||
default:
|
||||
printf ("Unhandled trap: 0x%x\n", trapnr);
|
||||
fprintf(stderr, "Unhandled trap: 0x%x\n", trapnr);
|
||||
cpu_dump_state(cs, stderr, fprintf, 0);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ void cpu_loop(CPUSH4State *env)
|
||||
arch_interrupt = false;
|
||||
break;
|
||||
default:
|
||||
printf ("Unhandled trap: 0x%x\n", trapnr);
|
||||
fprintf(stderr, "Unhandled trap: 0x%x\n", trapnr);
|
||||
cpu_dump_state(cs, stderr, fprintf, 0);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ void cpu_loop (CPUSPARCState *env)
|
||||
cpu_exec_step_atomic(cs);
|
||||
break;
|
||||
default:
|
||||
printf ("Unhandled trap: 0x%x\n", trapnr);
|
||||
fprintf(stderr, "Unhandled trap: 0x%x\n", trapnr);
|
||||
cpu_dump_state(cs, stderr, fprintf, 0);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user