xenix: Debugging background process

Bob Drotleff bobd at telxon.UUCP
Sat Oct 27 06:03:57 AEST 1990



	Hello,

	I am having a problem on a 386 SCO 2.3.2 System.
	Any help is appreciated greatly !!!

	-------
	PROBLEM
	-------
	Trying to debug a program that can only run in the background
	using `adb' or `sdb' or something.

	---------
	SITUATION
	---------
	We have difficulty determining where the problem exists since
	the program can only be run in the background , started by
	another background process.
	We have tried `printf()' but this is cumbersome and time
	consuming.

	---------------------
	ATTEMPTED WORKAROUNDS
	---------------------
	I have also substituted a script file in place of the
	normally executed binary file to start `adb' on the
	program with command line arguments, an `adb' input
	file containing `adb' commands, and an output file  
	containing all program and `adb' output.
	Note: Below, the `adb' program must be `exec'd'.

	------------------------------------------------------
	Here is a brief listing of the script named cslu62 ...
	------------------------------------------------------

echo $0 starting > $COMMLINK/test/adbout
exec adb $COMMLINK/test/cslu62.orig < $COMMLINK/test/adbin >> $COMMLINK/test/adbout


	----------------------------------------------------------------------
	Here is the `adb' input file (i.e. the file $COMMLINK/test/adbin) ....
	----------------------------------------------------------------------

$d
$e
:r $COMMLINK/test/cslu62.cfg 
$d
$C
$q


	--------------------------------------------------------------
	Here is the output file, in this example $COMMLINK/test/adbout
	Note: There is info deleted below.
	--------------------------------------------------------------


/usr/COMMLINK/test/cslu62 starting
* * _environ:   0.
_cv_to_host_full:	0.
_rnode:	    0.
_flush_send:		0.
_cv_to_cri_msg:		0.
cs_rpt_error: cri_ipc[1].ipcqid = 0


	                        <---------------- WHAT'S THIS !?!?!?!?!?
  memory fault			<---------------- WHAT'S THIS !?!?!?!?!?
	                        <---------------- WHAT'S THIS !?!?!?!?!?

stopped	at	_strlen+19.:	repne	scasb
* * _strlen(12918.)	from __doprnt+1327.
__doprnt(25699504., 25684812., 25721288.)	from _printf+54.
_printf(25699504., 12918., 25697596., 25684832.)	from _cs_time+142.
_cs_time(12918., 25697596.)	from _cs_find_code+43.
_cs_find_code(400., 25696956.)	from _cs_rpt_error+1114.
_cs_rpt_error(0., 0., 400., 0.,	0., 0.,	3015., 262400.)	from _cs_lu_attach+460.
_cs_lu_attach()	from _cs_s_start+65.
_cs_s_start()	from _cs_lu62+262.
_cs_lu62()	from _main+257.
_main(2., 25685108., 25685120.)	from __start+57.
__start()	from start0+30.
* 


	----------
	Questions:
	----------
	What does the `memory fault' message above mean ?
		(see the "WHAT'S THIS !?!?" above)
	How do you use (or can you) a debugger for a background process ?
	How can one debug a program that can only be run in the background ?
	What am I doing wrong ?
	Any suggestions ???


	Again, any help is appreciated.
	Please Email me for responses to this post.

	Thanx.



More information about the Comp.unix.xenix.misc mailing list