Mail Archives: djgpp/1997/08/13/13:04:09
Hi,
Andrew Crabtree wrote:
>
> > the exact same code, compiled under Borland TC++ V3.0? Is this normal?
> > Is there something i;m doing wrong (most certainly!).
> Were you accessing data via structure pointers?? If so note that djgpp
> tends to pad data more than some of the older dos compilers,
> and the default size of 'int' is 32 bits, not 16. You could try using
> __attribute__ ((packed)) to get rid of the padding, and replace ints with
> shorts as needed. See the docs on gcc extensions for packing data. It may
> also be in the FAQ.
ahh i see - that would explain why the structures were being read weird.
Not a problem, i just deleted the files and started again. I surmised
something was different, but i'm thankfull to now know what :)
>
> > I still also have the problem that i cannot debug any of my code that i
> > have '#include' into modules? Do i have to link all my source files,
> > instead of just all my modules?
>
> Putting code in header files is generally a poor idea. I suspsect you have
> run into one of the limitations of sdb debugging format.
The files are not header files, but source code. i.e, i have an object
with approx 5,000 lines of code. To mkae it easier for me to debug, i
simply split the object further up into more source files. I'm sure
there is nothing wrong with that!
> The easist way to do what you want (shameless plug following) is to get
> pgcc from www.goof.com. Its fairly stable right now, with a few quirks
> with known workarounds. Just compile your code with -gstabs, and as long
> as you use gdb you should be OK. Another option would be
> to get Robert's patch to gcc and recompile it yourself.
>
> Andrew
Robert's Patch? I'm using RHIDE (lattest ver as i have checked
recently)? If i put gstabs on should it work?
I just tried it with -gstabs+, i got the error "-gstabs+ not supported
by this GCC". So i tried it with -g ang -gstabs+ and it worked. However,
i still could not trace into my sub-source code. The only thing i can
assume is that the -g took precedence and, ineffect, the -gstabs+ did
nothing??
Thanks for your contructive reply!
Cheers,
Lyle
--
NOTE: Remove The comment "NO_SPAM" To Reply via Email!
-------------------------------[ **NEW ADDRESS**
lpak1 AT ccds DOT cc DOT monash DOT edu DOT au]
" Hello Chevra Kadish, You Kill 'em, We Chill 'em " .----,
| oO |
HTTP://www-personal.monash.edu.au/~lpak1/ | \/ |
`----'
- Raw text -