View email archives for the history of this mailing list.
systemc-forum - Re: [systemc-forum] UNKNOWN EXCEPTION on Cygwin
- To: Emily Dong <emily.dong1@xxxxxxxxx>
- From: "Philipp A. Hartmann" <philipp.hartmann@xxxxxxxx>
- Date: Wed, 03 Nov 2010 10:23:34 +0100
- Cc: "systemc-forum@xxxxxxxxxxxxxxxxx" <systemc-forum@xxxxxxxxxxxxxxxxx>
- Send Email to firstname.lastname@example.org:
- Send new message
- Reply to this message
please keep the mailing list on the recipient list.
On 03/11/10 09:57, Emily Dong wrote:
> thanks for your reply, I'm sure the design itself is ok on
> VC or Linux, as tested. but on Cygwin, it errors out.
> I think it is due to environment's issue.
Well, I'm quite sure, that the error is on your end. It's far more
common, that you invoke so-called "undefined behaviour" somewhere in
your code and you seem to get away with it on the other platforms.
> I've used gdb to trace the problem:
Did you use 'catch throw' to find the exact point of the exception's origin?
Try 'gdb your-program.exe' and then:
(gdb) catch throw
Catchpoint 1 (throw)
Catchpoint 1 (exception thrown), 0xb7f86355 in __cxa_throw () from ...
This should point you to the exact location in your code. If it only
refers to (unknown) symbols in the SystemC library, try to build the
library with debug symbols (make clean ; make debug; make install).
[snip body of sc_elab_and_sim]
> in sc_main(). when it comes to sc_start(...), it will error out, I did not
> trace in step by step.
Stepping through your program is only a very small part of the
functionality of your debugger ...
Greetings from Oldenburg,
> 2010/11/3 Philipp A. Hartmann <philipp.hartmann@xxxxxxxx>
>> On 03/11/10 08:50, Dong Emily wrote:
>>> When I run my SC design on Cygwin platform, compilation/linking all
>>> passed, but when run the simulation, it will error out:
>>> UNKNOWN EXCEPTION OCCURED
>>> 'grep' the message, it was printed by the following function:
>>> sc_elab_and_sim( int argc, char* argv )
>> The OSCI simulator catches (most of) the exceptions, that are thrown
>> from within your model. It tries to make some sense out of it, but only
>> a few types are statically checked.
>>> can any body tell me what's wrong ?
>> Your code throws an exception, which is not caught inside your model.
>> Which one? Frome where? Well, you have to find out.
>> Do you have a debugger on your platform (e.g. GDB)? You can try to
>> "break on exceptions". In GDB, this could be done with the command
>> 'catch throw'. You could also try to break on the function '__cxa_throw'.
>> The the execution stops immediately, when the exception is thrown, and
>> you can look at the backtrace in the debugger to find the origin in your
>> You don't have a debugger?
>> Well, get one. ;-)
>> Greetings from Oldenburg,
>> Philipp A. Hartmann
>> Hardware/Software Design Methodology Group
>> OFFIS Institute for Information Technology
>> R&D Division Transportation · FuE-Bereich Verkehr
>> Escherweg 2 · 26121 Oldenburg · Germany
>> Phone/Fax: +49-441-9722-420/282 · PGP: 0x9161A5C0 · http://www.offis.de/
Philipp A. Hartmann
Hardware/Software Design Methodology Group
OFFIS Institute for Information Technology
R&D Division Transportation · FuE-Bereich Verkehr
Escherweg 2 · 26121 Oldenburg · Germany
Phone/Fax: +49-441-9722-420/282 · PGP: 0x9161A5C0 · http://www.offis.de/
Description: OpenPGP digital signature