This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [MIPS sim patch] sim_monitor cleanup
- To: Ben Elliston <bje at redhat dot com>
- Subject: Re: [MIPS sim patch] sim_monitor cleanup
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 19 Feb 2001 14:10:16 -0500
- Cc: cagney at redhat dot com, cgd at broadcom dot com, gdb-patches at sources dot redhat dot com
- References: <14992.37492.971949.281244@scooby.cygnus.com>
Ben Elliston wrote:
>
> The following patch gives `sim_monitor' a return type of `int' and
> returns meaningful result codes that the caller can use to decide on
> appropriate error handling.
Almost. I'm fine with the theory just not the implementation. Reading:
! int reason = (instruction >> RSVD_INSTRUCTION_ARG_SHIFT) &
RSVD_INSTRUCTION_ARG_MASK;
! if (sim_monitor (SD, CPU, cia, reason))
! sim_io_error (sd, "TODO sim_monitor: reason = %d, pc =
0x%s\n", reason, pr_addr (cia));
just looks wierd.
Could sim_monitor() return zero or negative to indicate fail (both are
more common conventions) and perhaphs change ``TODO'' to something more
meanginful :-)
Andrew