On Wed, Jan 20, 2010 at 8:40 AM, David Brownell <[email protected]> wrote: > On Tuesday 19 January 2010, Øyvind Harboe wrote: >> New thread on new features to gdb memory maps. >> >> > Not sure what you mean by caching ... if the CPU is running, we >> > can't assume it's not going to touch such areas. >> >> We can tell GDB to read data from an area(e.g. disassembly) from >> the elf file rather than the target memory, I think. > > That'd be reasonable for flash and ROM type regions. Not for RAM, > which as a rule can be trivially overwritten. When that happens, > people driving a debugger will want the current status. > > >> > Though: I looked at the GDB protocol spec and it says that undefined >> > areas are presumed to be RAM. So I'm a bit puzzled about just what >> > that current code is there for... >> >> If you have *any* memory map, then, as I recall, it would be defined as >> invalid memory if it wasn't ram. >> >> If you have *no* memory map, then it's all assumed to be RAM. > > I'm going by: > > http://sourceware.org/gdb/current/onlinedocs/gdb/Memory-Map-Format.html > > which says (among other things): "GDB assumes that areas of memory > not covered by the memory map are RAM". I don't know if older versions > assumed otherwise, though.
When I played with it some time ago, it behaved as Øyvind described. There is an option, i think it's called 'mem inaccessible-by-default', that selects the other behavior. The default value may have changed recently. Regards, Andreas _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
