GDB exit status for semihosting

Report exit status to GDB when a semihosted application exits.

Signed-off-by: Paul Brook <paul@codesourcery.com>
This commit is contained in:
Paul Brook 2010-06-16 13:03:51 +01:00
parent 1884533c74
commit 0e1c9c54af
4 changed files with 23 additions and 15 deletions

View file

@ -172,6 +172,7 @@ void do_m68k_semihosting(CPUM68KState *env, int nr)
args = env->dregs[1];
switch (nr) {
case HOSTED_EXIT:
gdb_exit(env, env->dregs[0]);
exit(env->dregs[0]);
case HOSTED_OPEN:
if (use_gdb_syscalls()) {