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
Ben Elliston wrote:
>
> >>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
>
> Andrew> Almost. I'm fine with the theory just not the implementation. Reading:
>
> Andrew> ! int reason = (instruction >> RSVD_INSTRUCTION_ARG_SHIFT) &
> Andrew> RSVD_INSTRUCTION_ARG_MASK;
> Andrew> ! if (sim_monitor (SD, CPU, cia, reason))
> Andrew> ! sim_io_error (sd, "TODO sim_monitor: reason = %d, pc =
> Andrew> 0x%s\n", reason, pr_addr (cia));
>
> Andrew> just looks wierd.
>
> Andrew> Could sim_monitor() return zero or negative to indicate fail (both are
> Andrew> more common conventions) and perhaphs change ``TODO'' to something more
> Andrew> meanginful :-)
>
> Done. I've negated the sense of sim_monitor()'s result and the error
> message now reads:
>
> "sim_monitor: unhandled reason = %d, pc = 0x%s\n", reason, pr_addr (cia)
>
> Okay to commit?
Yes.
Andrew