
Display Data in Another Format
2-25
An Introductory Tutorial to the C Source Debugger
Display data in another format
Usually, when you add an item to the WATCH window or open a DISP window,
the data is shown in its
natural format. This means that ints are shown as
integers,
floats are shown as floating-point values, pointers are shown as hex-
adecimal values, etc. Occasionally, you may wish to view data in a different
format. This can be especially important if you want to show memory or regis-
ter contents in another format.
One way to display data in another format is through casting (which is part of
the C language). In the expression below, the *(float *) portion of the expres-
sion tells the debugger to treat address 0x100 as type float (exponential floa-
ting-point format).
Display memory contents in floating-point format:
disp *(float *)0x100
This opens a DISP window to show memory contents in an array format. The
array member identifiers don’t necessarily correspond to actual addresses—
they’re relative to the first address you request with the DISP command. In this
case, the item displayed as item [0] is the contents of address 0x0100—
it isn’t
memory location 0. Note that you can scroll through the memory displayed in
the DISP window; item [1] is at 0x0101, and item [–1] is at 0x0ffe.
lesson continues on the next page
→
Summary of Contents for TMS320C6 Series
Page 10: ...x ...
Page 20: ...xx ...
Page 118: ...4 20 ...
Page 144: ...6 16 ...
Page 164: ...7 20 ...
Page 170: ...8 6 ...
Page 284: ...B 18 ...
Page 290: ...C 6 ...