GDB on SCO Unix SysV v3.2 ?

Lyle Seaman lws at comm.wang.com
Tue Mar 27 14:03:56 AEST 1990


seanf at 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 at comm.wang.com
508 967 2322         Lowell, MA, USA       uunet!comm.wang.com!lws



More information about the Comp.unix.i386 mailing list