* RFA: Stop RX simulator from terminating after completing a non-stopping system call
@ 2010-09-29 16:15 Nick Clifton
2010-09-29 18:43 ` DJ Delorie
0 siblings, 1 reply; 2+ messages in thread
From: Nick Clifton @ 2010-09-29 16:15 UTC (permalink / raw)
To: dj; +Cc: gdb-patches
Hi DJ,
Currently the RX simulator will stop after completing the emulation of
any system call, not just ones that are supposed to stop it (SYS_exit,
SYS_kill). This is because code in decode_opcode() unconditionally
uses the DO_RETURN macro without checking the return code from
rx_syscall().
The patch below fixes the problem by adding a check for the
RX_MAKE_STEPPED return code and proceeding as normal if this code is
returned.
Checked by running hello world built by an rx-elf toolchain.
OK to apply ?
Cheers
Nick
sim/rx/ChangeLog
2010-09-29 Nick Clifton <nickc@redhat.com>
* rx.c (decode_opcode: RXO_int): Only break out of the emulation
loop if rx_syscall() does not return a RX_STEPPED result.
Index: sim/rx/rx.c
===================================================================
RCS file: /cvs/src/src/sim/rx/rx.c,v
retrieving revision 1.9
diff -c -3 -p -r1.9 rx.c
*** sim/rx/rx.c 24 Sep 2010 05:18:23 -0000 1.9
--- sim/rx/rx.c 29 Sep 2010 10:10:26 -0000
*************** decode_opcode ()
*** 1232,1238 ****
v = GS ();
if (v == 255)
{
! DO_RETURN (rx_syscall (regs.r[5]));
}
else
{
--- 1232,1240 ----
v = GS ();
if (v == 255)
{
! int rc = rx_syscall (regs.r[5]);
! if (! RX_STEPPED (rc))
! DO_RETURN (rc);
}
else
{
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RFA: Stop RX simulator from terminating after completing a non-stopping system call
2010-09-29 16:15 RFA: Stop RX simulator from terminating after completing a non-stopping system call Nick Clifton
@ 2010-09-29 18:43 ` DJ Delorie
0 siblings, 0 replies; 2+ messages in thread
From: DJ Delorie @ 2010-09-29 18:43 UTC (permalink / raw)
To: Nick Clifton; +Cc: gdb-patches
Ok.
> OK to apply ?
>
> sim/rx/ChangeLog
>
> * rx.c (decode_opcode: RXO_int): Only break out of the emulation
> loop if rx_syscall() does not return a RX_STEPPED result.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-29 15:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-29 16:15 RFA: Stop RX simulator from terminating after completing a non-stopping system call Nick Clifton
2010-09-29 18:43 ` DJ Delorie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).