Commands

This section contains a list of the valid commands that may be entered on the command line.

L/text/ or /text

This command performs a search forward within the source window for text and repositions the cursor if the text is found. The search is case insensitive.

 

BL/text/ or ?text

This command performs a search backward within the source window for text and repositions the cursor if the text is found. The search is case insensitive.

 

MOVETO n

Moves the cursor to line n. If n is greater than the number of lines within the file then the command is ignored.

 

PROFILE

Toggles profile information and has exactly the same effect as pressing F9.

 

PROFILE filename

This will write the source window, together with any profile counts, into the file filename. The profile information must already be displayed.

 

PRINT expr or P expr

Produce a data view window for the expression expr. The type of data view displayed is dependent on the expression given and will be automatically adjusted. This command provides a more general mechanism than displaying individual variables or marked expressions.

Examples

print machine_data[i] - C syntax

print machine_data(i) - Fortran syntax

print mph*1.6

print *ptr+stru->element - C syntax

 

PRINTMEM expr or PM expr

Produce a memory dump window centred about the value of expr. The given expression does not have to be a pointer type. It can be an integer or even a calculation.

 

VIEW filename

This command opens a new source window and displays the file filename in it. If the file is not an object file that makes up the current program or the relevant object file does not have debugging information then you will not be able to display expressions or set breakpoints from it. Any ASCII file can be displayed with this command.

 

FIND routine

This command will search for routines whose names contain the text routine. If one match is found that routine will be displayed. If more than one routine name matches the text given then a Find window will appear displaying all the matches.

The window will respond to the following key presses:

Key

Action

Up

Move the highlight bar up one line

Down

Move the highlight bar down one line

Home

Move the highlight bar to the top of the list

End

Move the highlight bar to the end of the list

Page Up

Move the highlight bar up one page

Page Up

Move the highlight bar down one page

Enter

Display the routine. If the words '(no debugging information)' appear after the routine name then a machine code window will be displayed. Otherwise the file appearing in brackets after the routine name will be displayed.

Esc

Close the window

 

The Find window will be kept open to allow further selections to be made, although it will probably be initially hidden by the new source (or machine code) window. You can easily cycle through all open windows by pressing Alt+N.

Example

find init

Could find the routines initialise_module, AnswerInIteration and DOINIT

 

WRITE_BREAK expr or WB expr

Places a write data break on the address indicated by evaluating expr. The break point will be set on the address of the result. For example:

write_break count

breakpoint placed on address of count

write_break *ptr

breakpoint placed on value of pointer ptr

write_break arr(9)

breakpoint placed on ninth element of arr

write_break 0x78647292

breakpoint placed on address 0x78647292

 

USE_BREAK expr or UB expr

Places a use (i.e. read or write) data break on the address indicated by evaluating expr. The break point will be set on the address of the result as is the case with WRITE_BREAK.

 

REGS

Displays a window that shows the current values of the CPU registers. The values are in hexadecimal. The floating point stack is also shown.

 

BREAKPOINTS or BPS

Displays a window which contains the status of currently active breakpoints.

 

STREAMS

Opens a window that lists the currently open Fortran units.

 

STREAM n

Opens a window showing the status of Fortran unit n.

 

LET expr1=expr2

This command allows you to make changes to data without having to recompile. The value of expr2 is assigned to the item indicated by expr1. expr1 must be an expression to which a value can be assigned, for example let 12=6+a is invalid. If the two expressions refer to different data types a conversion will be applied to the result of expr2 to allow it to be used. You should, however, exercise caution when using differing types.

Examples

let i=10

Simple variable assignment

let arr(j)=arr(count)

Array element assignment

let shape.colour=0x0f3229

Structures

 

DOS cmdline or EXECUTE cmdline or X cmdline (DOS debugger only, not Win16/Win32)

This will load the command processor and execute the command cmdline, which may be a standard '.COM', '.EXE' or '.BAT' file. The command line may be omitted in which case the command shell will be started into which you can type commands. You should type the command EXIT to return to SDBG. You should not execute commands which:

  • Modify (or attempt to modify) any open files. This includes removing disks from the floppy drive that your program is using.

  • Try to execute Microsoft Windows or DosShell.

  • Execute any TSR program, including network shells.

  • Run any DBOS application. This includes Salford compilers and linkers.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited