Xref: utzoo gnu.gdb.bug:577 comp.unix.i386:3790 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!wang!comm.wang.com!lws From: lws@comm.wang.com (Lyle Seaman) Newsgroups: gnu.gdb.bug,comp.unix.i386 Subject: Re: GDB on SCO Unix SysV v3.2 ? Keywords: gdb,sco,unix,sysv,sys5,v3.2,readline Message-ID: <1990Mar27.040356.5926@comm.wang.com> Date: 27 Mar 90 04:03:56 GMT References: <8468@pt.cs.cmu.edu> <8532@pt.cs.cmu.edu> <1990Mar21.205356.5766@esegue.segue.boston.ma.us> <5345@scolex.sco.COM> Distribution: usa Organization: Wang Labs, Platform Comms. Lines: 39 seanf@sco.COM (Sean Fagan) writes: >I've built gdb with the MSC compiler (under SCO UNIX, of course 8-)), and >don't really remember this. Well, I take that back: I now have a vague >recollection of it, and I may have just used rcc (which is the AT&T >compiler) to compile the one module that had the asm's. (I also didn't >think that gcc would take the syntax that dep.c uses, but maybe I'm wrong.) >Anyway, if you choose to go that route, you may need to use the following >flags when compiling any module with rcc: -DM_UNIX -DM_XENIX -DM_I386 >-DM_COFF. I think that will take care of it. I don't use the MS cc that comes with SCO, there's too much it gets wrong. However, I do have a couple of bits re: rcc. You may also want to include -DM_SYSV -DSYSV -DNO_PROTOTYPE as some of the .h files and other UNIX sources use these. Also, there is a problem with rcc in that an assignment like this: { char a[6]; a[6] = NULL; } will overwrite the following couple of bytes as well, as the generated code is for a move long instead of a move byte. NOTE: I DON'T WRITE CODE LIKE THAT, it was in ISODE. stdio.h defines NULL (void *) 0 interestingly enough, rcc doesn't have any problem with a[6] = (long) 0; only with a[6] = (anything *) 0; So I also use -DNULL=0 on the command line to avoid that little problem. BTW, rcc does generate a warning before it generates that bad code. illegal pointer combination op = or something like that. -- Lyle Wang lws@comm.wang.com 508 967 2322 Lowell, MA, USA uunet!comm.wang.com!lws