Hello, this patch is part of my work to add flash memory programming support to gdb. Since the complete patch is large, it's split in 3 parts for easier review. This part adds target interface to get a list of memory regions, and their properties, including whether the memory region is flash, and if so, what its block size it. This is the information that gdb needs to property decide how to program flash. That target interface is implemented to remote target, by introducing new qXfer:memory-map:read packet that reads XML memory map document from remote side, and then parsing that XML document into gdb data structures. Second part of the patch will add the code to actually handle flash programming, and third part of the patch will add documentation. This patch depends on the following previously sumbitted patches, but not yet committed, patches: - adding vector data structure to gdb - adding Expat dependency - zero-terminating result of target_read_alloc - removing the 'download_write_size' variable - Volodya 2006-07-18 Vladimir Prus * Makefile.in (SFILES): Add memory-map.c (memory_map_h): New. (target_h): Add dependency on memory-map.h. (remote.o): Likewise. * exceptions.h (enum errors): New value XML_MEMORY_MAP_ERROR. * remote.c: (struct remote_state): New fields current_memory_map and fetched_memory_map. (init_remote_state, remote_open_1): Reset the above. (PACKET_qXfer_memory_map): New. (remote_protocol_features): Register qXfer:memory-map:read. (remote_xfer_partial): Handle TARGET_OBJECT_MEMORY_MAP. (remote_memory_map): New. (init_remote_ops): Register to_memory_map. (init_async_remote_ops): Likewise. (_initialize_remote): Register qXfer:memory-map:read. * target.c (target_memory_map): New. * target.h (enum target_object): New value TARGET_OBJECT_MEMORY_MAP. (struct target_ops): New method to_memory_map. (target_memory_map): Declare. * memory-map.c: New. * memory-map.h: New.