intro_debugger


				Debugger Information

	There are two debugger environments available under Linux.  The default
	choice is ddd, and that is the program that the following applies to.
	We also support Totalview which can be better for some situations.
	To use Totalview, you must define the environment variable "DEBUGGER"
	using the command "export DEBUGGER=totalview".

	If you are debugging a nonconsole application, you simply need to
	enter the name of the debugger followed by the executable name
	(e.g. ddd my_program).

	If you are debugging a console application, you must have a terminal
	window which is logged into the machine on which your console is
	running.  In that window you type in the command "debug_slot".  This
	command has an optional argument which is the console process slot
	number you wish to run the application to be debugged in.  If you
	don't specify this argument, a menu of possible options will be
	displayed.  After you have successfully selected a process slot number,
	you will be asked to start up the application to be debugged.  Once
	the application has been started, you will find yourself in the
	debugger as in the nonconsole case above.

	You can also attach the debugger to a running process.  To do this
	with ddd, you can use the command "ddd {source path} {pid}".  If
	you are attaching to a console application, you should become
	user "xconsole" first.

	Debugger Commands:

	Command					Meaning
	-------------------------------------	----------------------------------------
	help					display help for debugger commands
	--------------------------------------------------------------------------------
	set language (c/fortran)		tells debugger in what language to
						interpret entered commands
	--------------------------------------------------------------------------------
	next					step one source code line
						(treat a subroutine call as a
						 single instruction)
	--------------------------------------------------------------------------------
	step					step one source code line
	--------------------------------------------------------------------------------
	step {n}				step 'n' source code lines
	--------------------------------------------------------------------------------
	stepi					step one assembly language instruction
	--------------------------------------------------------------------------------
	finish					finish the current routine and stop
	--------------------------------------------------------------------------------
	until {function or line number}		continue execution until you reach
						a desired location
	--------------------------------------------------------------------------------
	run					execute the program
	--------------------------------------------------------------------------------
	quit					exit the debugger
	--------------------------------------------------------------------------------
	b[reak] {routine}			stop the program when {routine} is
						called
	--------------------------------------------------------------------------------
	b[reak] {source file}:{routine}		stop the program when {routine} in
						{source file} is called
	--------------------------------------------------------------------------------
	b[reak] {source file}:{line}		stop the program when {line} is reached
	--------------------------------------------------------------------------------
	tb[reak] {spec}				stop the program only once when a
						desired location is reached
	--------------------------------------------------------------------------------
	condition {number} {expr}		modify a breakpoint to only happen if
						the supplied expression has a value
						of TRUE
	--------------------------------------------------------------------------------
	commands {number}			modify a breakpoint to execute a
	{command 1}				set of commands if it occurs
	      .
	      .
	      .
	{command n}
	end
	--------------------------------------------------------------------------------
	watch {expr}				stop the program when the value of
						{expr} changes
	--------------------------------------------------------------------------------
	p[rint] {variable}			examine the value of the variable
						in the current radix (default is
						decimal)
	--------------------------------------------------------------------------------
	p[rint] {variable}[{start}]@{number}	examine the values of an array variable
						in the current radix (default is
						decimal)
	--------------------------------------------------------------------------------
	p[rint]/x {variable}			examine the value of the variable in hex
	--------------------------------------------------------------------------------
	p[rint]/d {variable}			examine the value of the variable
						as a signed integer
	--------------------------------------------------------------------------------
	p[rint]/u {variable}			examine the value of the variable
						as an unsigned integer
	--------------------------------------------------------------------------------
	p[rint]/c {variable}			examine the value of the variable
						as a character string
	--------------------------------------------------------------------------------
	p[rint]/a {variable}			examine the value of the variable
						as a hex address
	--------------------------------------------------------------------------------
	p[rint]/t {variable}			examine the value of the variable
						in binary
	--------------------------------------------------------------------------------
	p[rint] ((char *) &{variable})[0]@n	examine the value of the variable as
						{n} ASCII digits
	--------------------------------------------------------------------------------
	p[rint] *(({type} *) {variable})	examine the value of a void pointer
	--------------------------------------------------------------------------------
	p[rint] *({variable})			displays the value of a pointer
	--------------------------------------------------------------------------------
	p[rint] &{variable}			displays the address of a variable
	--------------------------------------------------------------------------------
	p[rint] ${register}			displays the value of a register
	--------------------------------------------------------------------------------
	display {variable}			display the value of a variable
						graphically
	--------------------------------------------------------------------------------
	set {variable} = {value}		sets the value of a variable
	--------------------------------------------------------------------------------
	press <enter>				repeat the previous command
	--------------------------------------------------------------------------------
	set radix {radix}			sets the default radix for integer
						values (input and output)
	--------------------------------------------------------------------------------
	set output-radix {radix}		sets the default radix for integer
						values (output only) (default is 10)
	--------------------------------------------------------------------------------
	call {routine} {arg1 ... argn}		call a routine and prints the
						return value
	--------------------------------------------------------------------------------
	where					displays current function and
						line number
	--------------------------------------------------------------------------------
	dir[ectory] {path}			add a source code path
	--------------------------------------------------------------------------------