This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] Patch for cgen_rtx_error()


fche wrote:

   On Sun, Oct 08, 2000 at 11:38:00AM +1100, Ben Elliston wrote:

   > +/* Emit an error message from CGEN RTL.  */
   > +
   > +void
   > +cgen_rtx_error (SIM_CPU *cpu, const char * fmt, ...)
   > +{
   > +  va_list ap;
   > +  va_start(ap, fmt);
   > +  sim_io_printf (CPU_STATE (cpu), fmt, ap);
   > +  va_end(ap);
   > +  sim_io_printf (CPU_STATE (cpu), "\n");
   > +}
   
   Rather than just print the given message (is it really a varargs
   function?), it would be good to do a sim_engine_halt() there too.
   
Upon further inspection, it seems that the CGEN `error' rtx accepts only a
single argument, so this function need not accept varargs.  Right, Doug?

Without making assumptions about the architecture of any given port, what
are you proposing that I pass for the `pc' argument to sim_engine_halt?  
It's wrong to assume that GET_H_PC() and friends will be present.

Ben


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]