Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!akgua!mcnc!decvax!harpo!ulysses!mhuxl!houxm!hogpc!houti!ariel!vax135!cornell!uw-beaver!tektronix!hplabs!sri-unix!baer@Rand-Unix.ARPA From: baer@Rand-Unix.ARPA@sri-unix.UUCP Newsgroups: net.unix Subject: calling procedures from dbx Message-ID: <277@sri-arpa.UUCP> Date: Mon, 26-Mar-84 13:33:00 EST Article-I.D.: sri-arpa.277 Posted: Mon Mar 26 13:33:00 1984 Date-Received: Sat, 31-Mar-84 10:11:02 EST Lines: 59 From: Larry Baer I am moving my C programming effort from our 4.1bsd system to our 4.2bsd system; therefore I will be using dbx instead of sdb. I have come to rely heavily on my own data-structure printing routines while debugging under sdb. I cannot figure out how to call these procedures successfully under dbx. Often dbx complains that I am giving it arguments of incorrect type when trying to call a procedure (I claim I am not), and on those occasions when it does accept my arguments to a procedure, it invariably dies with the message "program terminated by signal 1". Once this has happened the debugger no longer pays any attention to breakpoints that have been set, and my program terminates "unexpectedly" when I give the "run" command. This happens even with a procedure that tries to print its single argument of type int. Appended to this message are a simple test program, and a script from a dbx session over said program illustrating my problem. Can anyone tell me what magic to invoke to get this to work correctly? Helpful or informative responses will be summarized & posted to this newsgroup unless (1) the newsgroup was copied in the response OR (2) the sender asks that his response not be posted. Thanks, Larry Baer ----------------------------------------- #include typedef struct SimpleStruct { char simple_char; int simple_int; } SimpleObject; typedef SimpleObject *SimpleObjectPtr; ShowSimple(s) SimpleObject s; { fprintf(stderr, "SimpleObject = (char: %c, int: %d)\n", s.simple_char, s.simple_int); } ShowSimplePtr(sp) SimpleObjectPtr sp; { ***Sender closed connection*** === Network Mail from host brl-tgr on Mon Mar 26 11:17:20 ===