dbx and source files

Glen Story story at calma.UUCP
Sun Mar 2 14:51:50 AEST 1986


Help!  I (a new Un*x user) am having trouble with the dbx debugger.

The problem is that we have several large multi-source-file programs that we
are porting to Unix 4.2BSD.  When I try to work with one of these programs
with dbx, it can't seem to corrolate the object code back to the the 
source code.  If I issue stop commands, or if the program crashes,
dbx shows machine-language insructions instead of source code.

An example follows:

% make $c/systems/defnet
cc -g -o /tmp/cn26/src/clinks/systems/defnet \
/tmp/cn26/src/clinks/systems/defnet.o \
/tmp/cn26/src/clinks/systems/defnetdel.o \
/tmp/cn26/src/clinks/systems/defnetent.o \
/tmp/cn26/src/clinks/systems/defnetenu.o \
/tmp/cn26/src/clinks/systems/defnetlst.o \
/tmp/cn26/src/clinks/systems/defnetrev.o \
/tmp/cn26/src/clinks/systems/defnettpm.o \
/tmp/cn26/src/clinks/systems/defnetu.o \
/tmp/cn26/src/links/systems/defnetu2.o \
/tmp/cn26/src/clinks/systems/defnetupd.o \
/tmp/cn26/src/clinks/libraries/cnlib /usr/lib/libtermcap.a
% cd /tmp/cn26/src/clinks/systems
% dbx defnet
dbx version 7 of 3/18/85 13:07 (ISI).
Type 'help' for help.
reading symbolic information ...
(dbx) file defnet.c
(dbx) stop in mt_main
[1] stop in mt_main
(dbx) run

[1] stopped in mt_main at 0x336
00000336  bra	#398  <<<---- this doen't look like c to me
(dbx) list
    1   /*  DEFNET.CC								    */       <--- this s my failing statemnt??
    2   /*  W.T.SUMERLIN,JR.							    */
    3   /*  CALMA								    */
    4   /*  APRIL 5, 1984							    */
    5   /*									    */
    6   /*									    */
    7   /*  NETWORK ROUTE DEFINITION PROGRAM  REV2.0				    */
    8   /*									    */
    9   
   10   
(dbx) step
stopped in mt_main at 0x398
00000398  link	fp,#0xfffc  <-- still wrong lang.
(dbx) quit
%

You will note that I am running from the directory that contains the
source code in question.  Moreover, I specified the module containing
the breakpoint in a "file" command.

Is there something else I have to do?  Do I have to specify paths for
*all* source modules?  Or, have I hit some kind of limit in dbx?

Any help (preferably via email) will be greatly appreciated.  



Glenn Story
calma!story at ucbvax.ARPA
{ucbvax,sun,csd-gould}!calma!story



More information about the Comp.unix mailing list