Wednesday, June 24, 2009


1. GDB:

"display" in three flavors:

display expr
Add the expression expr to the list of expressions to display each time your program stops. See section Expressions.

display does not repeat if you press RET again after using it.

display/fmt expr
For fmt specifying only a display format and not a size or count, add the expression expr to the auto-display list but arrange to display it each time in the specified format fmt. See section Output Formats.

display/fmt addr
For fmt `i' or `s', or including a unit-size or a number of units, add the expression addr as a memory address to be examined each time your program stops. Examining means in effect doing `x/fmt addr'. See section Examining Memory.

Example for the 3rd usage:
display/1xh 0xffc00fc0

This is useful to examine a 16-bit register

2. /proc/devices: show the major number

root:/> cat /proc/devices
Character devices:
1 mem
5 /dev/tty
5 /dev/console
5 /dev/ptmx
10 misc
13 input
128 ptm
136 pts
150 rtpipe
204 ttyBF
254 rtc

Block devices:
1 ramdisk
259 blkext
31 mtdblock

3. About Trace Buffer

Blackfin records every program sequence change in trace buffer, if trace buffer is enabled. There is a 16-entry TBUF register table.

- A bit (TBUGOVF) in the TB control register can enable exception when the TBUF overflows (>16 entry). In the exception handler, TBUF can be read into memory, so that we can record more than 16 traces.
- The trace buffer can be configured to omit the recording of changes in program flow that match either the last entry or one of the last two entries.
- If TBUFOVF = 1, then the Trace Unit does not record discontinuities in the exception, NMI, and reset routines, because TB itself triggers exception.
- Setting TBUFOVF have impact on performance - every 16 sequence change would trigger an exception.

No comments:

Blog Archive