Date: Mon, 25 Jul 94 10:10:13 EDT From: hvb AT netrix DOT com To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Help with djgpp 1.11 build Reply-To: hvb AT netrix DOT com Dear all, I recently encountered a problem when trying to build the debuggers to use with go32 version 1.11. I built these debuggers with gcc 2.57 (came with the djgpp 1.11 package), but go32 reported a segmentation violation when it loaded them. (I obtained djgpp version 1.11 including the five patches m1 to m5 from oak.oakland.edu). Segmentation violation in pointer 0xa018e0e7 at d8:900000a8 ( That's the value of tss_ptr->tss_eip after the external debugger was loaded. ) eax=00387088 ebx=e00b8000 ecx=00000000 edx=0001cfe8 esi=0000002a edi=e001e075 ebp=e00b8000 esp=9ffffff4 cs=d8 ds=48 es=48 fs=48 gs=38 ss=48 cr2=0000e0e7 Call frame taceback EIPs: 0x900000a8 0x076c076f - Size of edebug32 after striped : 49,232 Bytes. - Size of edebug32 before striped : 111,750 Bytes. - Size of original edebug32 : 49,152 Bytes. The error occurred in either case, no matter if the file was striped or not. The source has not been modified, nor was the makefile, except for the library path. The content of the makefile that I used is: >>CFLAGS = -I.. -O2 -g -Wformat >> >>EO = \ >> ed.o\ >> debug.o\ >> unassmbl.o\ >> $E >> >>CO = \ >> syms.o\ >> wild.o\ >> $E >> >>.c.o: >> gcc $(CFLAGS) -c $*.c >> >>LIB=/djgpp111/lib >> >>all : edebug32 ed32-dpmi symify.exe >> >>edebug32 : $(EO) $(CO) >> ld -Ttext 0x900000a8 -N -o edebug32 $(LIB)/crt0.o >> $(EO) $(CO) $(LIB)/libc.a >> >>ed32-dpmi : $(EO) $(CO) >> ld -Ttext 0x000000a8 -N -o ed32-dpmi $(LIB)/crt0.o >> $(EO) $(CO) $(LIB)/libc.a >> >>symify.exe : symify.o $(CO) >> gcc -o symify symify.o $(CO) -lpc >> strip symify >> coff2exe symify >> -del symify >> >>clean : >> -del *.o >> -del edebug32 >> -del ed32-dpmi >> -del symify.exe >> >># DEPENDENCIES >> >>unassmbl.o : ed.h ../gotypes.h ../tss.h ../extdebug.h >> unassmbl.h syms.h >> >>debug.o : ed.h ../extdebug.h ../tss.h ../gotypes.h >> unassmbl.h syms.h >> >>syms.o : ed.h ../extdebug.h ../tss.h ../gotypes.h coff.h >> syms.h stab.h >> >>symsaout.o : ed.h ../extdebug.h ../tss.h ../gotypes.h >> >>ed.o : ed.h ../extdebug.h ../tss.h ../gotypes.h ../paging.h >> unassmbl.h debug.h >> >>symify.o : ed.h ../extdebug.h ../tss.h ../gotypes.h syms.h More over, the a.out files that gcc 2.57 produced did not seems to have a correct symbols table (as when debug32 tried to load one, it took it 1/2 hours to load more than 1,600,000 symbols just to reported: "Undefined symbol _main" (The a.out file was about 16K, and contained only one printf statement.) However, the other debugger that comes with go32, gdb 4.12 is capable of reading a djgcc compiled file, but not a UNIX gcc compiled and linked file (It reported: "c:/djgpp111/dgb32/xps_386.abs": not in executable format. File format not recognized.) But when it loaded the a.out file, there is no way to set breakpoints or start that program since no symbol table was loaded. Therefore, I have the following questions: 1. Which version of djgcc compiler I should use to build v1.11 stuff. 2. If djgcc is capable of making such a file, what compiler directive(s) should I use to make that file compatible with go32 / debug32 / gdb? 3. How can I load a UNIX gcc compiled file into gdb? Thanks ============================================================== Hung Bui Internet: hvb AT netrix DOT com Netrix Corporation Phone: +1 703 793 1016 13595 Dulles Technology Drive Fax: +1 703 713 3805 Herndon Va 22071 ==============================================================