Eli Zaretskii wrote: >> From: Vladimir Prus >> Date: Thu, 9 Nov 2006 23:36:22 +0300 >> >> This patch makes gdb, when target memory map is available, optionally >> reject all memory accesses outside of regions in memory map. The >> rationale is that: >> >> 1. It's sometimes better to get error that have the write silently do >> nothing or read returning garbase. >> >> 2. For some targets, accesses to non-existent memory "wedge" them. >> >> Since memory maps are still rare, this behaviour is enabled only by a new >> command. >> >> OK? > > This patch introduces a new user command, but doesn't include a patch > for the user manual. Please provide one. Sorry. This version of the patch includes documentation. - Volodya gdb/ * memattr.h (enum mem_access_mode): New value MEM_NONE. * memattr.c (unknown_mem_attrib): New. (inaccessible_by_default): New. (show_inaccessible_by_default): New. (lookup_mem_region): Check inaccessible_by_default. (dummy_cmd): New. (mem_set_cmdlist, mem_show_cmdlist): New. (_initialize_mem): Register new "set" and "show" commands. * target.c (memory_xfer_partial): If memory type is MEM_NONE, return an error. Clip to region size when calling to_xfer_partial. If upper limit of memory range is 0, don't clip anything. gdb/doc/ * gdb.texinfo (Memory Access Checking): New.