SystemC on CYGWIN: status and question
Mon Jun 4 09:43:00 GMT 2001
I am trying to port SystemC (a C++ library for simulation of clock and
driven (electronic) systems, see http://www.systemc.org/ ) to CYGWIN and
MINGW32. I have been running into a problem where I need some advice.
My system is:
CYGWIN 1.3.2 (incl. w32api-20010520-1)
insight gdb debugger
quick threads (qt-001.tar from ftp://ftp.cs.washington.edu/pub/ )
For MINGW32 (-mno-cygwin flag) I copied libstdc++.a from
http://sourceforge.net/forum/forum.php?forum_id=75823 to /lib/mingw.
SystemC-1.0.2 (UNIX/LINUX sources) compiles 'out of the box' with
./configure and make to yield libsystemc.a and libnumeric_bit.a. libqt.a
is available by compiling qt-001.
After some minor changes to the SystemC sources (I will report details
later) compilation is possible with the -DWIN32 flag, which includes
the use of w32api with fibers.
The same source changes allow to compile the libraries with MINGW32
using the -mno-cygwin flag (only w32api up to now, I did not yet make
libqt.a with this flag).
All sample applications coming with SystemC compile with CYGWIN (quick
or w32api) and MINGW32 (w32api).
Most sample applications fail during execution (as has been already
pipe, rsa: o.k.
pkt_switch: Segmentation fault in sc_main.cpp:146 (return 0)
risc_cpu: Segmentation fault in paging.cpp:51 (wait_until(...))
fir: Segmentation fault in sc_main.cpp:67 (return 0)
fft: Segmentation fault in sc_main.cpp:83 (return 0)
The faults in return 0 happen during cleanup operations in sc_main in
between several function calls to destructors.
The fault in risc_cpu is in paging::entry(void).
The interesting point is that this happens independently from choosing
quick threads or fibers, CYGWIN or MINGW32.
All errors occur in code segments which are completely equal (copied
from insight SRC+ASM source window):
call 'some function'
mov (%eax),%edx here the address %eax returns 0x0 for %edx
mov (%edx),%ecx here %edx tries to access memory at 0x0 and fails.
Another complex SystemC application I am working on compiles and runs
without errors. So the behaviour depends on details of the actual source
My simple question now is:
How should I proceed? Does the code segment give any hint? Are there
further procedures or tools to catch the error?
I will put this message on the CYGWIN list and the SystemC list.
Any hints or suggestions are welcome.
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin