In This Book

Use the prede￿ned alias w to print the 10 source lines surrounding the current line.

dde> w

26V int list[], low, high;

27#endif

28{

29int total, num_elements, average;

30total = sum(list, low, high);

31> num_elements = high - low;

32

33average = total / num_elements;

34printf("%10.d\n", average);

35}

Print source, assembly, watched variables, and traceback in the transcript area.

dde> property transcript -source-asm-variable-tb

dde>

step

 

 

 

Stepped

to: \\average\print_average\33

 

33

>

 

 

average = total / num_elements;

 

asm:

>

33:

00001FCC print_average+0040 LDW

-64(%r30),%r26

tb:

 

1

 

$START$+0094 (0000192C)

 

tb:

 

2

 

_start+0068 (80041D9C)

 

tb:

 

3

 

\\average\main\44 (0000203C)

 

tb:

 

4

>

\\average\print_average\33

 

Single step one statement using the prede￿ned alias s.

dde> property transcript -source

dde> s

Stepped to: \\average\print_average\34

34 > printf("%10.d\n", average);

Repeat the last command (single step). (The 4 is the output of the printf call on the previous line.)

dde> <RETURN>

4

Stepped to: \\average\print_average\35

35 >

}

A-6 Line-Mode User Interface