Hello, this patch is the second part of my work to add flash memory programming support to gdb. Since the complete patch is large, it's split in 3 part for easier review. First part added support for getting target memory map. This patch: - Adds new target interfaces for working with flash. - Implements those interfaces for remote protocol, using previously discussed vFlashErase, vFlashWrite and vFlashDone packets. - Introduces new function target_write_memory_blocks, that can take several memory requests at once, and uses target memory map to property drive flash - Changes the 'generic_load' function to use the target_write_memory_blocks function. This patch was hand-tested with a real hardware. - Volodya 2006-07-18 Vladimir Prus * Makefile.in (SFILES): Add target-memory.c. (COMMON_OBJS): Add target-memory.o. (target-memory.o): New, specify dependencies. * target.h (enum target_object): New value TARGET_OBJECT_FLASH. (struct target_ops): New methods to_flash_erase, and to_flash_done. (struct memory_write_request): New. (typedef target_write_memory_2_progress_cb): New (enum flash_preserve_mode): New. (target_flash_erase, target_flash_done) (target_write_memory_blocks): New. (target_write_partial): Declare. * target-memory.c: New. * symfile.c (add_section_size_callback): Remove. (struct load_section_data): New field memory_write_requests. Remove write_count, data_count, and total_size fields. (load_section_callback): Just record data to write, don't write. (allow_flash_write, dont_preserve_flash) (clear_memory_write_data): New. (donwload_progress_cb): New; (generic_load): Don't compute total size. Don't do memory transfers here. Call target_write_memory_blocks.