I took another look at this, and there is no core file being created.
It looks like the sc_user exception is not being caught?
If I edit systemc-2.0.1/src/systemc/kernel/sc_main.cpp
and add
std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
to the top
(For info about __gnu_cxx::__verbose_terminate_handler, see
http://www.doubleand.tv/doc/cpp-3.1/libstdc++/html/19_diagnostics/howto.html)
and muck with the includes
and recompile systemc with:
cd systemc-2.0.1
rm -rf objdir
mkdir objdir
cd objdir
../configure
make CXXFLAGS="-g -DSC_INCLUDE_FX -Wno-deprecated" CFLAGS=-g
OPT_CXXFLAGS=-Wno-deprecated
make install
then when running the kernel/watching/test01 regression test with
cd ~/src/regtests-2.0.1
rm -rf systemc
~/src/regtests-2.0.1/scripts/verify.pl -no-cleanup -v
systemc/kernel/watching/test01
systemc/kernel/watching/test01/systemc.exe
I get
...
19
20
21
terminate called after throwing a `sc_user'
So, now I know that sc_user is what is thrown.
If I modify sc_main.cpp and add:
catch( const sc_user& x )
{
message_function("Caught sc_user! This should not be happening." );
}
then I catch the sc_user exception!
sc_user is thrown in systemc-2.0.1/src/systemc/kernel/sc_process_int.h
from
sc_cthread_process::wait_clock(int n)
and
sc_cthread_process::wait_lambda( const sc_lambda_ptr& lambda )
and systemc-2.0.1/src/systemc/kernel/sc_process_int.cpp
sc_cthread_cor_fn( void* arg ) catches it while calling execute:
void
sc_cthread_cor_fn( void* arg )
{
sc_cthread_handle cthread_h = RCAST<sc_cthread_handle>( arg );
while( true ) {
try {
cthread_h->execute();
}
catch( sc_user ) {
assert( cthread_h->m_watch_level == 0 );
continue;
}
The above looks reasonable to me.
So, it would appear that for some reason the sc_user exception is not being
caught. I'm running gcc-3.3.1 under Cygwin.
Has anyone out there run the regression tests under Cygwin?
-Christopher
Sandeep S Srinivasa <srinivasa@xxxxxxxx> wrote:
> hi,
> I have used SystemC on WinXP-Cygwin, but I have never run
> regression tests. Check if a core file is generated. You can backtrace
> the symbols in the core-file using gdb.
> I would think that the problem would be with threads, if any. There has
> been several "issues" with SystemC/POSIX threads. Check the archives for
> further information.
> Just my $0.02
>
> regards
> Sandeep
Christopher Hylands Brooks wrote:
> I'm attempting to run SystemC-2.0.1 under WindowsXP using
> Cygwin with gcc-3.3.1
>
> My environment is:
> bash-2.05b$ uname -a
> CYGWIN_NT-5.1 DOPLAP03 1.5.7(0.109/3/2) 2004-01-30 19:32 i686 unknown unknown
> C
> ygwin
> bash-2.05b$ gcc -v
> Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/specs
> Configured with: /GCC/gcc-3.3.1-3/configure --with-gcc --with-gnu-ld
> --with-gnu
> -as --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
> --
> libexecdir=/usr/sbin --mandir=/usr/share/man --infodir=/usr/share/info
> --en
> able-languages=c,ada,c++,f77,pascal,java,objc --enable-libgcj
> --enable-thre
> ads=posix --with-system-zlib --enable-nls --without-included-gettext
> --enab
> le-interpreter --enable-sjlj-exceptions
> --disable-version-specific-runtime-
> libs --enable-shared --disable-win32-registry --enable-java-gc=boehm
> --disa
> ble-hash-synchronization --verbose --target=i686-pc-cygwin
> --host=i686-pc-c
> ygwin --build=i686-pc-cygwin
> Thread model: posix
> gcc version 3.3.1 (cygming special)
> bash-2.05b$
>
>
> I built SystemC with:
> cd systemc-2.0.1
> mkdir objdir
> cd objdir
> ../configure
> make >& make.out &
> make install
>
> The few examples I tried worked fine. However, it seems like
> 81 SystemC regression tests from regtests-2.0.1 failed under Cygwin
> and 557 pass.
>
> Some of the failures are overflow errors, and are not that big a
> problem.
>
> However, some of the failures are because we got an
> UNKNOWN EXCEPTION OCURRED
> message while running the Cygwin generated binary.
> (Note the misspelling of occured.)
>
> That string comes the catch statement in
> systemc-2.0.1/src/systemc/kernel/sc_main.cpp
>
> For example, systemc/kernel/watching/test01/ fails with:
>
> - --start--
> bash-2.05b$ cd regtests-2.0.1/systemc/kernel/watching/test01
> bash-2.05b$ ls
> systemc.exe
> test01
> test01.diff
> test01.log
> test01.log.stripped
> test01.o
> bash-2.05b$ ./systemc.exe
>
> SystemC 2.0.1 --- Nov 13 2003 15:15:26
> Copyright (c) 1996-2002 by all Contributors
> ALL RIGHTS RESERVED
> main_action
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
> 11
> 12
> 13
> 14
> 15
> 16
> 17
> 18
> 19
> 20
> 21
>
> UNKNOWN EXCEPTION OCCURED
> - --end--
>
> BTW - To run the regtests, I did:
> 1. Download and untar regtestrs-2.0.1.tar.gz from http://www.systemc.org
>
> 2. Edit regtests-2.0.1/scripts/verify.pl
> and change the first line to
>
> #!/usr/bin/perl
>
> and the Cygwin version check line to
>
> } elsif( $uname_s eq "CYGWIN_NT-5.1" ) {
>
> 3. Set SYSTEMC_HOME to point to your
> systemc-2.0.1 directory. I did:
> export SYSTEMC_HOME=c:/cxh/src/systemc-2.0.1
>
> 4. Run the tests:
> c:/cxh/src/regtests-2.0.1/scripts/verify.pl -no-cleanup -v systemc
>
> I used -no-cleanup so that all the tests would run. When verify.pl
> is run without -no-cleanup, then only one test is run, and I think
> that test is deleted if it is successful
>
> I also tried compiling systemc-2.0.1 under Cygwin with out optimization.
> I used:
> make CXXFLAGS="-g -DSC_INCLUDE_FX -Wno-deprecated" CFLAGS=-g
> OPT_CXXFLAGS=-Wno-
> deprecated
> I got the same results.
>
>
>
> Has anyone had any success running the regression tests under
> Cygwin?
>
> - -Christopher
>
> Christopher Hylands Brooks University of California
> Programmer/Analyst Chess/Ptolemy/GSRC US Mail: 558 Cory Hall #1770
> ph: 510.643.9841 fax:510.642.2739 Berkeley, CA 94720-1770
> home: (F-Tu) 707.665.0131 (W-F) 510.655.5480 (office: 400A Cory)
>
>
> ------- End of Blind-Carbon-Copy
--------
------- Blind-Carbon-Copy
To: systemc-forum@xxxxxxxxxxxxxxxxxxx
Subject: SystemC under Cygwin compiles, but regression tests fail.
From: "Christopher Hylands Brooks" <cxh@xxxxxxxxxxxxxxxxx>
Date: Fri, 20 Feb 2004 11:54:17 -0800
I'm attempting to run SystemC-2.0.1 under WindowsXP using
Cygwin with gcc-3.3.1
My environment is:
bash-2.05b$ uname -a
CYGWIN_NT-5.1 DOPLAP03 1.5.7(0.109/3/2) 2004-01-30 19:32 i686 unknown unkno
wn Cygwin
bash-2.05b$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/specs
Configured with: /GCC/gcc-3.3.1-3/configure --with-gcc --with-gnu-ld --with
-gnu-as --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
--libexecdir=/usr/sbin --mandir=/usr/share/man --infodir=/usr/share/info --
enable-languages=c,ada,c++,f77,pascal,java,objc --enable-libgcj --enable-thr
eads=posix --with-system-zlib --enable-nls --without-included-gettext --enab
le-interpreter --enable-sjlj-exceptions --disable-version-specific-runtime-l
ibs --enable-shared --disable-win32-registry --enable-java-gc=boehm --disabl
e-hash-synchronization --verbose --target=i686-pc-cygwin --host=i686-pc-cygw
in --build=i686-pc-cygwin
Thread model: posix
gcc version 3.3.1 (cygming special)
bash-2.05b$
I built SystemC with:
cd systemc-2.0.1
mkdir objdir
cd objdir
../configure
make >& make.out &
make install
The few examples I tried worked fine. However, it seems like
81 SystemC regression tests from regtests-2.0.1 failed under Cygwin
and 557 pass.
Some of the failures are overflow errors, and are not that big a
problem.
However, some of the failures are because we got an
UNKNOWN EXCEPTION OCURRED
message while running the Cygwin generated binary.
(Note the misspelling of occured.)
That string comes the catch statement in
systemc-2.0.1/src/systemc/kernel/sc_main.cpp
For example, systemc/kernel/watching/test01/ fails with:
- --start--
bash-2.05b$ cd regtests-2.0.1/systemc/kernel/watching/test01
bash-2.05b$ ls
systemc.exe
test01
test01.diff
test01.log
test01.log.stripped
test01.o
bash-2.05b$ ./systemc.exe
SystemC 2.0.1 --- Nov 13 2003 15:15:26
Copyright (c) 1996-2002 by all Contributors
ALL RIGHTS RESERVED
main_action
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
UNKNOWN EXCEPTION OCCURED
- --end--
BTW - To run the regtests, I did:
1. Download and untar regtestrs-2.0.1.tar.gz from http://www.systemc.org
2. Edit regtests-2.0.1/scripts/verify.pl
and change the first line to
#!/usr/bin/perl
and the Cygwin version check line to
} elsif( $uname_s eq "CYGWIN_NT-5.1" ) {
3. Set SYSTEMC_HOME to point to your
systemc-2.0.1 directory. I did:
export SYSTEMC_HOME=c:/cxh/src/systemc-2.0.1
4. Run the tests:
c:/cxh/src/regtests-2.0.1/scripts/verify.pl -no-cleanup -v systemc
I used -no-cleanup so that all the tests would run. When verify.pl
is run without -no-cleanup, then only one test is run, and I think
that test is deleted if it is successful
I also tried compiling systemc-2.0.1 under Cygwin with out optimization.
I used:
make CXXFLAGS="-g -DSC_INCLUDE_FX -Wno-deprecated" CFLAGS=-g OPT_CXXFLAGS=-
Wno-deprecated
I got the same results.
Has anyone had any success running the regression tests under
Cygwin?
- -Christopher
Christopher Hylands Brooks University of California
Programmer/Analyst Chess/Ptolemy/GSRC US Mail: 558 Cory Hall #1770
ph: 510.643.9841 fax:510.642.2739 Berkeley, CA 94720-1770
home: (F-Tu) 707.665.0131 (W-F) 510.655.5480 (office: 400A Cory)
------- End of Blind-Carbon-Copy
--------
|