- fix fputs bug (args were reversed)
- now debugger code always calls SIM->debug_fputs and the siminterface code decides what to do with it.
This commit is contained in:
parent
bbae3335a2
commit
00e769f1e6
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user