* run.c (sim_callback_write_stdout): New.
* interp.c (trap): Call sim_callback_write_stdout when needed.
This commit is contained in:
parent
f69e888e4d
commit
5897a29e88
|
@ -1,3 +1,8 @@
|
|||
Wed Sep 20 09:51:50 1995 steve chamberlain <sac@slash.cygnus.com>
|
||||
|
||||
* run.c (sim_callback_write_stdout): New.
|
||||
* interp.c (trap): Call sim_callback_write_stdout when needed.
|
||||
|
||||
Mon Sep 18 18:42:27 1995 steve chamberlain <sac@slash.cygnus.com>
|
||||
|
||||
* interp.c (trap): Remove useless code.
|
||||
|
|
|
@ -506,6 +506,9 @@ trap (i, regs, memory, maskl, maskw, little_endian)
|
|||
regs[0] = read (regs[5], ptr (regs[6]), regs[7]);
|
||||
break;
|
||||
case SYS_write:
|
||||
if (regs[5] == 1)
|
||||
regs[0] = sim_callback_write_stdout (ptr(regs[6]), regs[7]);
|
||||
else
|
||||
regs[0] = write (regs[5], ptr (regs[6]), regs[7]);
|
||||
break;
|
||||
case SYS_lseek:
|
||||
|
|
|
@ -165,3 +165,11 @@ printf_filtered (va_alist)
|
|||
vfprintf (stdout, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
int
|
||||
sim_callback_write_stdout (arg, len)
|
||||
char *arg;
|
||||
int len;
|
||||
{
|
||||
return write (1, arg, len);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue