Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3B1BBB70.64DAE168@unidui.uni-duisburg.de> Date: Mon, 04 Jun 2001 18:46:40 +0200 From: Holger Vogt Reply-To: holger DOT vogt AT uni-duisburg DOT de X-Mailer: Mozilla 4.73 [de]C-CCK-MCD CSO 2.0 (Win98; U) X-Accept-Language: de,en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: SystemC on CYGWIN: status and question Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I am trying to port SystemC (a C++ library for simulation of clock and event 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: Windows98 CYGWIN 1.3.2 (incl. w32api-20010520-1) insight gdb debugger SystemC-1.0.2 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 threads or w32api) and MINGW32 (w32api). Most sample applications fail during execution (as has been already reported): 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' add $0x10,%esp lea 0x4(%ebx),%edx mov (%edx),%eax add $0x4,%eax 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 code. 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. Regards Holger Vogt -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple