gnupic: __wcsrtombs: Assertion ... failed.


Previous by date: 10 Sep 2001 16:57:01 -0000 Re: __wcsrtombs: Assertion ... failed., John Sutton
Next by date: 10 Sep 2001 16:57:01 -0000 Re: There are some user spoke spanish., Nestor A. Marchesini
Previous in thread: 10 Sep 2001 16:57:01 -0000 Re: __wcsrtombs: Assertion ... failed., John Sutton
Next in thread:

Subject: Re: __wcsrtombs: Assertion ... failed.
From: Scott Dattalo ####@####.####
Date: 10 Sep 2001 16:57:01 -0000
Message-Id: <Pine.LNX.4.33.0109100934400.428-100000@ruckus.brouhaha.com>

On Mon, 10 Sep 2001, John Sutton wrote:

> Thanks for that.  After a wasted day trying to build a static version of gwave,
> I've just upgraded glib and gtk+ from 1.2.9 to 1.2.10 and rebuilt
> gtk+extra-0.99.16 on top, and all is well!  I've got gpsim and gwave running
> and am now trying to hack gpsim to give me an output log...  gpsim is
> beautifully written but my knowledge of C++ is very meagre, so it's going to be
> a pretty shameful hack I fear ;-(

John,

Good News!

When you start hacking, you may wish to look at src/trace.cc and
src/pic-processors.cc. At the end of trace.cc is the code for logging to a
file. This code has been tested and works, but as I said before it creates
enormous log files. To enable the functionality there's a gross hack in
pic-processors.cc that's currently commented out. In the
pic_processors::pic_processor concstructor are two lines:

  //trace_log.switch_cpus(this);
  //trace_log.enable_logging("gpsim.log");

If you uncomment these, then a log file will be opened when a new
processor is instantiated.

To save time, trace.cc will copy the entire trace buffer to this file
(about a 1000 or so traces at a time). Look in:

void TraceLog::callback(void) {...}

for the code that does this. Also, the trace buffer is copied using
"fwrite". As a consquence, the traces are not decode and they're binary
(not human readable). However, the trace buffer can be parsed and dumped
into a file by:

int Trace::dump(unsigned int n=0, FILE *out_stream=NULL)

Incidently, this routine also implements a trace filter. Now there are at
least three problems with this routine that will prevent it from being
used as is to decode an arbitrary trace buffer. 1) It assumes the trace
buffer is that which was created when the class was instantiated. 2) It
calls the gui trace window if the gui is being run. 3) The filter is not
an input parameter.

If we make the trace filter an input to Trace::dump(), then we can call
this from within TraceLog::callback() to get a human readable parsed file.


Scott


Previous by date: 10 Sep 2001 16:57:01 -0000 Re: __wcsrtombs: Assertion ... failed., John Sutton
Next by date: 10 Sep 2001 16:57:01 -0000 Re: There are some user spoke spanish., Nestor A. Marchesini
Previous in thread: 10 Sep 2001 16:57:01 -0000 Re: __wcsrtombs: Assertion ... failed., John Sutton
Next in thread:


Powered by ezmlm-browse 0.20.