[comp.sys.amiga.tech] Manx SDB

paolucci@snll-arpagw.UUCP (Sam Paolucci) (04/30/89)

I'm trying to debug a large library created with the Manx compiler.  So
I compile the functions with -n.  Then I link the library to a test driver
program (which is also compiled with -n) using the -g flag.  The linker
appears to generate the executable fine, but it also prints a bunch of
messages all similar to:

Structure definition 'VSprite' never completed.

In other messages 'VSprite' is replaced by 'collTable', 'LayerInfo_extra',
and 'Region'.  Nowhere in my main program or library functions do I use
any such structures.  Where does this come from?  Also, does anybody
know what the linker messages mean?  Any clue is appreciated.
-- 
					-+= SAM =+-
"the best things in life are free"

				ARPA: paolucci@snll-arpagw.llnl.gov

new@udel.EDU (Darren New) (04/30/89)

In article <103@snll-arpagw.UUCP> paolucci@snll-arpagw.UUCP (Sam Paolucci) writes:
>... but it also prints a bunch of
>messages all similar to:
>Structure definition 'VSprite' never completed.
>...  Where does this come from?  Also, does anybody
>know what the linker messages mean?  Any clue is appreciated.
>				ARPA: paolucci@snll-arpagw.llnl.gov

I've not used Manx, but the Lattice compiler used to do similar things.
I suspect that you are including a file that does something
like

struct XXX {
    blah blah blah;
    struct VSprite * spritelist;
    blah blah blah;
    };

and then declaring something of type struct XXX.
Since you don't reference the VSprite, you don't
get compiler errors (because all pointers are the same
size (is this true in ANSI C?)). However, maybe the
linker is looking for how big (*spritelist) should
be for some reason. As you requested,
this is just a clue, because I really have no idea
what I'm talking about (or how you could automatically
find where such a thing is declared). -- Darren

papa@pollux.usc.edu (Marco Papa) (05/01/89)

In article <103@snll-arpagw.UUCP> paolucci@snll-arpagw.UUCP (Sam Paolucci) writes:
>[...] The linker
>appears to generate the executable fine, but it also prints a bunch of
>messages all similar to:
>Structure definition 'VSprite' never completed.
>In other messages 'VSprite' is replaced by 'collTable', 'LayerInfo_extra',
>and 'Region'.  Nowhere in my main program or library functions do I use
>any such structures.  Where does this come from?  Also, does anybody
>know what the linker messages mean?  Any clue is appreciated.

They are "spurious" messages that you should disregard.  They are due to the
"order" in which your "Amiga" include files are processed.  Just forget about
them.  They told me this will be fixed in MANX 5.0 SDB.

-- Marco Papa 'Doc'
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
uucp:...!pollux!papa       BIX:papa       ARPAnet:pollux!papa@oberon.usc.edu
 "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

ralph@atrp.media.mit.edu (Ralph L. Vinciguerra) (05/01/89)

Yep. I get that silly set of VSprite errors too. And I always get them,
even when I don't use any special flags on the compiler. I'm interested
in the answer too....

ralph@atrp.media.mit.edu (Ralph L. Vinciguerra) (05/01/89)

In article <103@snll-arpagw.UUCP> paolucci@snll-arpagw.UUCP (Sam Paolucci) writes:
>...The linker
>appears to generate the executable fine, but it also prints a bunch of
>messages all similar to:
>
>Structure definition 'VSprite' never completed.
>
>In other messages 'VSprite' is replaced by 'collTable', 'LayerInfo_extra',
>and 'Region'.  Nowhere in my main program or library functions do I use
>any such structures.....

I get these errors too, even not using any special compiler flags.
I'd like to know what's going on too....
  it makes me nervous.

chk@dretor.dciem.dnd.ca (C. Harald Koch) (05/02/89)

In article <3755@mit-amt> ralph@atrp.media.mit.edu (Ralph L. Vinciguerra) writes:
>In article <103@snll-arpagw.UUCP> paolucci@snll-arpagw.UUCP (Sam Paolucci) writes:
>>...The linker
>>appears to generate the executable fine, but it also prints a bunch of
>>messages all similar to:
>>
>>Structure definition 'VSprite' never completed.
>>
>>In other messages 'VSprite' is replaced by 'collTable', 'LayerInfo_extra',
>>and 'Region'.  Nowhere in my main program or library functions do I use
>>any such structures.....
>
>I get these errors too, even not using any special compiler flags.
>I'd like to know what's going on too....
>  it makes me nervous.

As we all know :-), C allows you to declare a pointer to a structure without
declaring the structure itself. If you don't need to access the fields, you
don't need to declare the structure.

When you include intuition.h, you also include some of the graphics library
header files. These files declare structures containing pointers to
VSprites, LayerInfos, etc., but unless you include the appropriate header
files, the structures never get declared.

The linker is informing you that some structures have been referenced but
never declared, and thus that SDB will not be able to manipulate the fields
of these structures.

Unless you actually do want to access the structure contents (this is
uncommon) you don't need to worry about these messages.

One way around the problem is to always compile using a precompiled symbol
table containing all the amiga header files (i.e. include/*/* but not
include/*). This will result in SDB always knowing about all the Amiga data
structures. The only problem with this is that you get huge object files
(20-30K for average C files).

I hope this puts your minds at rest.

-- 
          EARTH          | C. Harald Koch  NTT Systems, Inc., Toronto, Ontario
      smog  |   bricks   |           
   AIR     mud       FIRE| chk@gpu.utcs.utoronto.ca        (long-term address)
 soda water |   tequila  | chk@zorac.dciem.dnd.ca             (my current job)
          WATER          | chk@chkent.UUCP                (my machine at home)
Element chart from "Science Made Stupid".

fche@db.toronto.edu (Frank Ch. Eigler) (01/04/90)

Hi, again, folks.

I haven't quite gotten to Manx 5.0 yet..  But just found a
seeming anomaly in SDB of 3.6a.

Singlestepping a program behaves differently than actually
running it.  Everything else is the same (ie. plenty of
memory, etc.), except it's not getting stopped after every line.

The problem seems to be around an AllocMem() call.  I invoke it
as:

#define SSIZE ((ULONG) sizeof(struct Big96ByteStruct))

	ptr = AllocMem(SSIZE, MEMF_PUBLIC | MEMF_CLEAR);

This AllocMem() just doesn't want to succeed while being single-
stepped.  SSIZE is confirmed at 96L.  There is 400K free.

When the program is run straight, it does succeed (but fail at
a different point ...  I don't know WHERE because SDB dies long
before then!).


This is strange.

Any suggestions?  (I will try using a variable instead of a macro
there, and see how it works out, but it _shouldn't_ make any
difference, should it?!)

Thanks! (again!)

--Frank
-- 
  Frank Ch. Eigler                                              //
    fche@db.toronto.edu                                        //
                                                           \\ //
"I'll be your sledgehammer"                           AMIGA \X/