zarth@drutx.UUCP (07/12/84)
I recently started trying to use SDB to set break points in my C
program so that I could read variable values there and
encountered some difficulties. I have the UNIX users manual and
have read that, does anyone have further info for me or can the
help me interpret what I read. Basically I have the a.out file
which is made up of four file.c's which include some 10-15 morre
files. In one of those included files is a procedure call, say
proc(). I would like to set a breakpoint at proc() in file
include.z which is included in file1.c and then read the value of
array[x]. Can some one help me out??? If you need more info on
the problem or need a more detailed explaination send me mail or
post.
Thanks,
Dave Covartmoss@BRL-VLD.ARPA (07/18/84)
From: "Gary S. Moss (DRXBR-VLD-V)" <moss@BRL-VLD.ARPA> Sorry, can't help with SDB, but it seems to me that you should not put procedures in include files. If you are doing so because more than one program requires them, they should be archived in a library (see ar(1)). If only one program uses the procedures, than including them can only cause confusion, lint(1) for example has enough trouble determining what module and line number to report. Of course, the library should be debugged via a simple test program which is kept in the directory with the library sources to test the procedures after each version of the archive is produced. The best things to put in include files are macros, external declarations and typedefs. Global definitions and procedures should reside in '.c' files. Also, the use of '.z' as a suffix could be bad news, pack(1) uses this for output files. -- Moss.