diff --git a/bochs/debug/dbg_main.cc b/bochs/debug/dbg_main.cc index abd61fb68..4154cbc35 100644 --- a/bochs/debug/dbg_main.cc +++ b/bochs/debug/dbg_main.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: dbg_main.cc,v 1.63 2002-09-15 11:21:33 bdenney Exp $ +// $Id: dbg_main.cc,v 1.64 2002-09-15 12:07:08 bdenney Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -224,11 +224,7 @@ void dbg_printf (const char *fmt, ...) char *buf = new char[1024]; vsprintf (buf, fmt, ap); va_end(ap); -#if BX_WITH_WX SIM->debug_fputs (buf); // send to debugger, which will free buf when done. -#else - fputs (stderr, buf); -#endif } int diff --git a/bochs/gui/siminterface.cc b/bochs/gui/siminterface.cc index 0b6160efb..23d336067 100644 --- a/bochs/gui/siminterface.cc +++ b/bochs/gui/siminterface.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: siminterface.cc,v 1.59 2002-09-15 11:21:33 bdenney Exp $ +// $Id: siminterface.cc,v 1.60 2002-09-15 12:07:09 bdenney Exp $ ///////////////////////////////////////////////////////////////////////// // // See siminterface.h for description of the siminterface concept. @@ -551,12 +551,17 @@ char *bx_real_sim_c::debug_get_next_command () return NULL; } -void bx_real_sim_c::debug_fputs (const char *cmd) +void bx_real_sim_c::debug_fputs (const char *text) { +#if BX_WITH_WX + // send message to the GUI BxEvent *event = new BxEvent (); event->type = BX_ASYNC_EVT_DBG_MSG; - event->u.logmsg.msg = cmd; + event->u.logmsg.msg = text; sim_to_ci_event (event); +#else + fputs (text, stderr); +#endif } #endif diff --git a/bochs/gui/siminterface.h b/bochs/gui/siminterface.h index 902ef796d..45e464aed 100644 --- a/bochs/gui/siminterface.h +++ b/bochs/gui/siminterface.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: siminterface.h,v 1.62 2002-09-15 11:21:33 bdenney Exp $ +// $Id: siminterface.h,v 1.63 2002-09-15 12:07:09 bdenney Exp $ ///////////////////////////////////////////////////////////////////////// // // Before I can describe what this file is for, I have to make the @@ -1041,7 +1041,7 @@ public: virtual void debug_break () {} virtual void debug_interpret_cmd (char *cmd) {} virtual char *debug_get_next_command () {return NULL;} - virtual void debug_fputs (const char *cmd) {} + virtual void debug_fputs (const char *text) {} #endif };