Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!osu-cis!tut!lvc From: lvc@tut.UUCP Newsgroups: comp.lang.c,comp.unix.questions Subject: Re: C Programs and sdb Message-ID: <2810@tut.cis.ohio-state.edu> Date: Fri, 4-Dec-87 08:59:15 EST Article-I.D.: tut.2810 Posted: Fri Dec 4 08:59:15 1987 Date-Received: Tue, 8-Dec-87 02:12:51 EST References: <161@mccc.UUCP> <271@thirdi.UUCP> Organization: Ohio State Computer & Info Science Lines: 24 Keywords: debug C, sdb, extra symbols Xref: utgpu comp.lang.c:5411 comp.unix.questions:4644 Summary: libraries aren't compiled -g In article <271@thirdi.UUCP>, peter@thirdi.UUCP (Peter Rowell) writes: > I suspect (but have no 3b2 to verify on) that one or more of the files > that make up your /lib/libc.a (which contains all of the standard C > library routines) were compiled with the "-g" switch. When sdb sees > this extra info, it wants to find the named file and display it. > ... Good guess, but actually, the 3b2 3b5 and 3b15 compilers insert this assembly language instruction: .file "filename" at the beginning of the .s file when you compile a file (with or without the -g option). This is where sdb is getting the file names. The assembler stores this and some other stuff in the a.out header. Which reminds me of a gripe I have with the 3b compilers, they also insert the time the program was compiled into the a.out header. I have to have a special program to compare two a.out files to see if they are the same! -- Larry Cipriani AT&T Network Systems at cbosgd!osu-cis!tut!lvc Ohio State University