Previous: Character Sets, Up: Data


8.18 Caching Data of Remote Targets

gdb can cache data exchanged between the debugger and a remote target (see Remote Debugging). Such caching generally improves performance, because it reduces the overhead of the remote protocol by bundling memory reads and writes into large chunks. Unfortunately, gdb does not currently know anything about volatile registers, and thus data caching will produce incorrect results when volatile registers are in use.

set remotecache on
set remotecache off
Set caching state for remote targets. When ON, use data caching. By default, this option is OFF.


show remotecache
Show the current state of data caching for remote targets.


info dcache
Print the information about the data cache performance. The information displayed includes: the dcache width and depth; and for each cache line, how many times it was referenced, and its data and state (dirty, bad, ok, etc.). This command is useful for debugging the data cache operation.