Memory region attributes allow you to describe special handling required by regions of your target's memory. gdb uses attributes to determine whether to allow certain types of memory accesses; whether to use specific width accesses; and whether to cache target memory.
Defined memory regions can be individually enabled and disabled. When a memory region is disabled, gdb uses the default attributes when accessing memory in that region. Similarly, if no memory regions have been defined, gdb uses the default attributes when accessing all memory.
When a memory region is defined, it is given a number to identify it; to enable, disable, or remove a memory region, you specify that number.
Define memory region bounded by lower and upper with attributes attributes…. Note that upper == 0 is a special case: it is treated as the the target's maximum memory address. (0xffff on 16 bit targets, 0xffffffff on 32 bit targets, etc.)
Remove memory regions nums….
Disable memory regions nums…. A disabled memory region is not forgotten. It may be enabled again later.
Enable memory regions nums….
Print a table of all defined memory regions, with the following columns for each region.
Enabled memory regions are marked with y. Disabled memory regions are marked with n.
The address defining the inclusive lower bound of the memory region.
The address defining the exclusive upper bound of the memory region.
The list of attributes set for this memory region.
The access mode attributes set whether gdb may make read or write accesses to a memory region.
While these attributes prevent gdb from performing invalid memory accesses, they do nothing to prevent the target system, I/O DMA, etc. from accessing memory.
Memory is read only.
Memory is write only.
Memory is read/write. This is the default.
The acccess size attributes tells gdb to use specific sized accesses in the memory region. Often memory mapped device registers require specific sized accesses. If no access size attribute is specified, gdb may use accesses of any size.
Use 8 bit memory accesses.
Use 16 bit memory accesses.
Use 32 bit memory accesses.
Use 64 bit memory accesses.
The data cache attributes set whether gdb will cache target memory. While this generally improves performance by reducing debug protocol overhead, it can lead to incorrect results because gdb does not know about volatile variables or memory mapped device registers.
Enable gdb to cache target memory.
Disable gdb from caching target memory. This is the default.