The attached patch makes a few changes in MI memory commands, with the goal of making it easy for frontend to just display memory view, even around the boundaries of accessible memory. The changes are as follows: - The code that reads memory is modified read around inaccessible memory regions as defined by memory map, as opposed to giving error if the first address to read happens to be inaccessible. - If we think the memory should be readable, but get an error, we now use binary search to find subrange at the beginning that is still readable. With this patch, we do the same for the end. So, if the start address is not readable but end address is, the readable tail will be returned. - The current output of -data-read-memory is totally insane. This patch introduces -data-read-memory-raw that clearly reports what regions were read, and shows the data as hex string. I've also added -data-write-memory-raw which, contrary to -data-write-memory can actually write *memory*, as opposed to a single byte. I've tested this against a certain bare-metal board, first with memory map and second with manually cleared memory map in GDB. In both cases, reads before and after accessible memory worked reasonably. OK? Thanks, -- Vladimir Prus CodeSourcery vladimir@codesourcery.com (650) 331-3385 x722