Re: [ng-spice-devel] ACS on Win32 with MinGW


To ng-spice-devel@ieee.ing.uniroma1.it
From Al Davis <aldavis@ieee.org>
Date Wed, 25 Apr 2001 11:23:14 -0700
Delivered-To mailing list ng-spice-devel@ieee.ing.uniroma1.it
In-Reply-To <CF654D964573D311A1CA0090278A36FF4CBE44@EDIN_EXM1 >
Mailing-List contact ng-spice-devel-help@ieee.ing.uniroma1.it; run by ezmlm
References <CF654D964573D311A1CA0090278A36FF4CBE44@EDIN_EXM1 >
Reply-To ng-spice-devel@ieee.ing.uniroma1.it

On Mon, 23 Apr 2001, Gillespie, Alan wrote:
> This is not worth spending much thought on, but I
> got ACS to compile using the MinGW version of gcc.
>
> However, it crashes before it even gets into the
> main program. That is, it seems to crash during
> the construction of some global objects.

It works fine with the "cygwin" version of gcc.

> Does anyone know how you debug that part of a C++
> program with gdb ?

The same way as any other part of the program.

For me, the most useful feature is the back-trace.  This is the 
command "bt" in gdb.  It usually points directly to the problem.

Of course, you need to compile with debugging enabled.
("make debug" with the standard ACS makefile.)


> Al, someone here told me that the C++ constructor
> stuff can be a nightmare, since the order of
> initialization is undefined, apparently. Do you
> know of any "risky" stuff in your constructors ?

The order of construction is very well defined, within a module, as 
is the order of destruction.  What is undefined is the order of 
construction of globals and statics in different modules.  The 
solution is to declare everything where this matters in a single 
module, which is why "globals.cc" exists.  (also, because of some old 
junk hanging around).


By the way ....  I highly recommend the "cygwin" tools for windows.  
It contains many of the gnu tools, often making porting a unix 
program to windows trivial.  For ACS, modelgen, and the ibis 
translator, "just type make" works.  No changes required.

Partial thread listing: