semihosting exit code
This commit is contained in:
parent
59dc225568
commit
73624826b6
|
@ -1217,8 +1217,8 @@ static int cortexm_hostio_request(target *t)
|
||||||
|
|
||||||
t->tc->interrupted = false;
|
t->tc->interrupted = false;
|
||||||
target_regs_read(t, arm_regs);
|
target_regs_read(t, arm_regs);
|
||||||
target_mem_read(t, params, arm_regs[1], sizeof(params));
|
|
||||||
uint32_t syscall = arm_regs[0];
|
uint32_t syscall = arm_regs[0];
|
||||||
|
if (syscall != SYS_EXIT) target_mem_read(t, params, arm_regs[1], sizeof(params));
|
||||||
int32_t ret = 0;
|
int32_t ret = 0;
|
||||||
|
|
||||||
DEBUG_INFO("syscall 0"PRIx32"%"PRIx32" (%"PRIx32" %"PRIx32" %"PRIx32" %"PRIx32")\n",
|
DEBUG_INFO("syscall 0"PRIx32"%"PRIx32" (%"PRIx32" %"PRIx32" %"PRIx32" %"PRIx32")\n",
|
||||||
|
@ -1608,7 +1608,7 @@ static int cortexm_hostio_request(target *t)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case SYS_EXIT: /* _exit() */
|
case SYS_EXIT: /* _exit() */
|
||||||
tc_printf(t, "_exit(0x%x)\n", params[0]);
|
tc_printf(t, "_exit(0x%x)\n", arm_regs[1]);
|
||||||
target_halt_resume(t, 1);
|
target_halt_resume(t, 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue