OS2 World.Com Forum

Subject  :  What Debugger for Innotek gcc 3.3.5?
Author  :  cytan
Date  :  04 Apr, 2006 on 22:17
This has annoyed me for a long time and has prevented me from moving from emx gcc 2.8.1 to gcc 3.3.5. What debugger can I use to debug my crappy C++ programmes?

cytan

B.T.W. Is there a dump utility like nm which shows the contents of a dll file?


Subject  :  Re:What Debugger for Innotek gcc 3.3.5?
Author  :  Smedles
Date  :  05 Apr, 2006 on 00:58

cytan (04 Apr, 2006 22:17):
This has annoyed me for a long time and has prevented me from moving from emx gcc 2.8.1 to gcc 3.3.5. What debugger can I use to debug my crappy C++ programmes?

cytan

B.T.W. Is there a dump utility like nm which shows the contents of a dll file?



If you link with -Zomf you can use the debugger that comes with Visualage C++


Subject  :  Re:What Debugger for Innotek gcc 3.3.5?
Author  :  cytan
Date  :  05 Apr, 2006 on 14:15
I just tried it out and have failed miserably .

Here's what I did. Programme is the usual hello world:

First I compiled to make the object file:

g++ -Zomf -c main.cpp

Unlike the old gcc 2.8.1, I don't get a main.obj file but just a
main.o file.

I linked with:

g++ -Zomf -o main.exe main.o main.def

where main.def contains:

********************
NAME main WINDOWCOMPAT

DATA MULTIPLE

STACKSIZE 65536
HEAPSIZE 65536

PROTMODE

***********************

After linking I get the following error message:
*******************************
[D:\tmp\hello]make
g++ -Zomf -c main.cpp
g++ -Zomf -o main.exe main.o main.def

LINK386 : warning L4087: internal fix-up applied to uninitialized area at 2C in
object 3

*******************************

And of course, running it fails:

[D:\tmp\hello].\main
SYS1808:
The process has stopped. The software diagnostic
code (exception code) is 0005.

*********************************

I'm sure I'm doing something stupid but the above sequence works for gcc 2.8.1. Any pointers from you gurus out there?

cytan


Subject  :  Re:What Debugger for Innotek gcc 3.3.5?
Author  :  abwillis abwillis@comcast.net
Date  :  05 Apr, 2006 on 17:42
You really want to use ilink for most things (the one from vac 336 available on the Mozilla build page preferaby unless you have 10000+ exports then the ilink from 3.0 - wlink may be usable in the not too distant future.
To get debug info you need -g (make sure there is no -s or it will strip the debug info).
Andy

Subject  :  Re:What Debugger for Innotek gcc 3.3.5?
Author  :  phaelonimaire
Date  :  06 Apr, 2006 on 18:24
It has been a long time since I've done the -Zomf option, but I think -Zomf only creates .obj files, not .o files. LINK386 can only use OMF objects, so .o files will not work with it. (Which looks to be what's happening by the error you have)
The .o files are the a.out format, I think.

gcc -c -Zomf test.c yeilds test.obj
gcc -c test.c yields test.o


Subject  :  Re:What Debugger for Innotek gcc 3.3.5?
Author  :  Smedles
Date  :  07 Apr, 2006 on 04:12

phaelonimaire (06 Apr, 2006 18:24):
It has been a long time since I've done the -Zomf option, but I think -Zomf only creates .obj files, not .o files. LINK386 can only use OMF objects, so .o files will not work with it. (Which looks to be what's happening by the error you have)
The .o files are the a.out format, I think.

gcc -c -Zomf test.c yeilds test.obj
gcc -c test.c yields test.o


In my experience with Innotek GCC - .o or .obj depends on the makefile and has nothing to do on a.out or omf format. perhaps this was different in the EMX days...

of course "-g" is required for debug mode - I figured this was stating the obvious

Cheers,

Paul.


Subject  :  Success with ilink 5.0 but not with ilink from 3.6.5
Author  :  cytan
Date  :  07 Apr, 2006 on 15:21
Well, thanks to everyone who told me what to do. I have successfully compiled with debug info with

g++ -g -Zomf -c main.cpp
g++ -g -Zomf -o main.exe main.o

using ilink 5.0 from the Mozilla build page. However, using ilink from my VAC++ 3.6.5 gives a memory fault. I will download the fixpak for VAC++ and try again. idebug works and can debug the main.cpp code.

I'll keep you guys posted once I load the fixpak.

Anyhow, is there an nm for dll's?


cytan


Subject  :  Re:What Debugger for Innotek gcc 3.3.5?
Author  :  abwillis abwillis1@gmail.com
Date  :  08 Apr, 2006 on 17:32
There is an nm.exe in the gcc 3.3.5 bin directory. I've never used nm so I don't know anything about it.

Subject  :  Re:What Debugger for Innotek gcc 3.3.5?
Author  :  cytan
Date  :  08 Apr, 2006 on 21:40

abwillis (08 Apr, 2006 17:32):
There is an nm.exe in the gcc 3.3.5 bin directory. I've never used nm so I don't know anything about it.

nm only works for *.a library files and *.o files. It lists the functions in the library and object files. Unfortunately this does not work for *.dll files.

cytan


Powered by UltraBoard 2000 <www.ub2k.com>