gdb/
2006-09-21 Vladimir Prus <vladimir@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
* Makefile.in (SFILES): Add memory-map.c and xml-support.c.
(memory_map_h, xml_support_h): New.
(target_h): Add vec_h dependency.
(COMMON_OBS): Add memory-map.o and xml-support.o.
(memory-map.o, xml-support.o): New rules.
(remote.o): Update.
* exceptions.h (enum errors): Add XML_PARSE_ERROR.
* infcmd.c (run_command_1, attach_command): Call target_pre_inferior.
* memattr.c (default_mem_attrib): Initialize blocksize.
(target_mem_region_list, mem_use_target)
(target_mem_regions_valid, mem_region_cmp, mem_region_init)
(require_user_regions, require_target_regions)
(invalidate_target_mem_regions): New.
(create_mem_region): Use mem_region_init.
(mem_clear): Move higher.
(lookup_mem_region): Use require_target_regions.
(mem_command): Implement "mem auto".
(mem_info_command): Handle target-supplied regions and flash
attributes.
(mem_enable_command, mem_disable_command, mem_delete_command): Use
require_user_regions.
(_initialize_mem): Mention "mem auto" in help.
* memattr.h (enum mem_access_mode): Add MEM_FLASH.
(struct mem_attrib): Add blocksize.
(invalidate_target_mem_regions, mem_region_init, mem_region_cmp): New
prototypes.
* remote.c: Include "memory-map.h".
(PACKET_qXfer_memory_map): New enum value.
(remote_protocol_features): Add qXfer:memory-map:read.
(remote_xfer_partial): Handle memory maps.
(remote_memory_map): New.
(init_remote_ops, init_remote_async_ops): Set to_memory_map.
(_initialize_remote): Register qXfer:memory-map:read.
* target.c (update_current_target): Mention to_memory_map.
(target_memory_map, target_pre_inferior): New.
(target_preopen): Call target_pre_inferior.
* target.h: Include "vec.h".
(enum target_object): Add TARGET_OBJECT_MEMORY_MAP.
(struct target_ops): Add to_memory_map.
(target_memory_map, target_pre_inferior): New prototypes.
* memory-map.c, memory-map.h, xml-support.c, xml-support.h: New files.
gdb/doc/
2006-09-21 Vladimir Prus <vladimir@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
* gdb.texinfo (Memory Region Attributes): Mention target-supplied
memory regions and "mem auto".
2006-09-21 15:54:03 +02:00
|
|
|
/* Routines for handling XML memory maps provided by target.
|
|
|
|
|
2011-01-01 16:34:07 +01:00
|
|
|
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
|
|
|
|
Free Software Foundation, Inc.
|
gdb/
2006-09-21 Vladimir Prus <vladimir@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
* Makefile.in (SFILES): Add memory-map.c and xml-support.c.
(memory_map_h, xml_support_h): New.
(target_h): Add vec_h dependency.
(COMMON_OBS): Add memory-map.o and xml-support.o.
(memory-map.o, xml-support.o): New rules.
(remote.o): Update.
* exceptions.h (enum errors): Add XML_PARSE_ERROR.
* infcmd.c (run_command_1, attach_command): Call target_pre_inferior.
* memattr.c (default_mem_attrib): Initialize blocksize.
(target_mem_region_list, mem_use_target)
(target_mem_regions_valid, mem_region_cmp, mem_region_init)
(require_user_regions, require_target_regions)
(invalidate_target_mem_regions): New.
(create_mem_region): Use mem_region_init.
(mem_clear): Move higher.
(lookup_mem_region): Use require_target_regions.
(mem_command): Implement "mem auto".
(mem_info_command): Handle target-supplied regions and flash
attributes.
(mem_enable_command, mem_disable_command, mem_delete_command): Use
require_user_regions.
(_initialize_mem): Mention "mem auto" in help.
* memattr.h (enum mem_access_mode): Add MEM_FLASH.
(struct mem_attrib): Add blocksize.
(invalidate_target_mem_regions, mem_region_init, mem_region_cmp): New
prototypes.
* remote.c: Include "memory-map.h".
(PACKET_qXfer_memory_map): New enum value.
(remote_protocol_features): Add qXfer:memory-map:read.
(remote_xfer_partial): Handle memory maps.
(remote_memory_map): New.
(init_remote_ops, init_remote_async_ops): Set to_memory_map.
(_initialize_remote): Register qXfer:memory-map:read.
* target.c (update_current_target): Mention to_memory_map.
(target_memory_map, target_pre_inferior): New.
(target_preopen): Call target_pre_inferior.
* target.h: Include "vec.h".
(enum target_object): Add TARGET_OBJECT_MEMORY_MAP.
(struct target_ops): Add to_memory_map.
(target_memory_map, target_pre_inferior): New prototypes.
* memory-map.c, memory-map.h, xml-support.c, xml-support.h: New files.
gdb/doc/
2006-09-21 Vladimir Prus <vladimir@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
* gdb.texinfo (Memory Region Attributes): Mention target-supplied
memory regions and "mem auto".
2006-09-21 15:54:03 +02:00
|
|
|
|
|
|
|
This file is part of GDB.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2007-08-23 20:08:50 +02:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
gdb/
2006-09-21 Vladimir Prus <vladimir@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
* Makefile.in (SFILES): Add memory-map.c and xml-support.c.
(memory_map_h, xml_support_h): New.
(target_h): Add vec_h dependency.
(COMMON_OBS): Add memory-map.o and xml-support.o.
(memory-map.o, xml-support.o): New rules.
(remote.o): Update.
* exceptions.h (enum errors): Add XML_PARSE_ERROR.
* infcmd.c (run_command_1, attach_command): Call target_pre_inferior.
* memattr.c (default_mem_attrib): Initialize blocksize.
(target_mem_region_list, mem_use_target)
(target_mem_regions_valid, mem_region_cmp, mem_region_init)
(require_user_regions, require_target_regions)
(invalidate_target_mem_regions): New.
(create_mem_region): Use mem_region_init.
(mem_clear): Move higher.
(lookup_mem_region): Use require_target_regions.
(mem_command): Implement "mem auto".
(mem_info_command): Handle target-supplied regions and flash
attributes.
(mem_enable_command, mem_disable_command, mem_delete_command): Use
require_user_regions.
(_initialize_mem): Mention "mem auto" in help.
* memattr.h (enum mem_access_mode): Add MEM_FLASH.
(struct mem_attrib): Add blocksize.
(invalidate_target_mem_regions, mem_region_init, mem_region_cmp): New
prototypes.
* remote.c: Include "memory-map.h".
(PACKET_qXfer_memory_map): New enum value.
(remote_protocol_features): Add qXfer:memory-map:read.
(remote_xfer_partial): Handle memory maps.
(remote_memory_map): New.
(init_remote_ops, init_remote_async_ops): Set to_memory_map.
(_initialize_remote): Register qXfer:memory-map:read.
* target.c (update_current_target): Mention to_memory_map.
(target_memory_map, target_pre_inferior): New.
(target_preopen): Call target_pre_inferior.
* target.h: Include "vec.h".
(enum target_object): Add TARGET_OBJECT_MEMORY_MAP.
(struct target_ops): Add to_memory_map.
(target_memory_map, target_pre_inferior): New prototypes.
* memory-map.c, memory-map.h, xml-support.c, xml-support.h: New files.
gdb/doc/
2006-09-21 Vladimir Prus <vladimir@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
* gdb.texinfo (Memory Region Attributes): Mention target-supplied
memory regions and "mem auto".
2006-09-21 15:54:03 +02:00
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2007-08-23 20:08:50 +02:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
gdb/
2006-09-21 Vladimir Prus <vladimir@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
* Makefile.in (SFILES): Add memory-map.c and xml-support.c.
(memory_map_h, xml_support_h): New.
(target_h): Add vec_h dependency.
(COMMON_OBS): Add memory-map.o and xml-support.o.
(memory-map.o, xml-support.o): New rules.
(remote.o): Update.
* exceptions.h (enum errors): Add XML_PARSE_ERROR.
* infcmd.c (run_command_1, attach_command): Call target_pre_inferior.
* memattr.c (default_mem_attrib): Initialize blocksize.
(target_mem_region_list, mem_use_target)
(target_mem_regions_valid, mem_region_cmp, mem_region_init)
(require_user_regions, require_target_regions)
(invalidate_target_mem_regions): New.
(create_mem_region): Use mem_region_init.
(mem_clear): Move higher.
(lookup_mem_region): Use require_target_regions.
(mem_command): Implement "mem auto".
(mem_info_command): Handle target-supplied regions and flash
attributes.
(mem_enable_command, mem_disable_command, mem_delete_command): Use
require_user_regions.
(_initialize_mem): Mention "mem auto" in help.
* memattr.h (enum mem_access_mode): Add MEM_FLASH.
(struct mem_attrib): Add blocksize.
(invalidate_target_mem_regions, mem_region_init, mem_region_cmp): New
prototypes.
* remote.c: Include "memory-map.h".
(PACKET_qXfer_memory_map): New enum value.
(remote_protocol_features): Add qXfer:memory-map:read.
(remote_xfer_partial): Handle memory maps.
(remote_memory_map): New.
(init_remote_ops, init_remote_async_ops): Set to_memory_map.
(_initialize_remote): Register qXfer:memory-map:read.
* target.c (update_current_target): Mention to_memory_map.
(target_memory_map, target_pre_inferior): New.
(target_preopen): Call target_pre_inferior.
* target.h: Include "vec.h".
(enum target_object): Add TARGET_OBJECT_MEMORY_MAP.
(struct target_ops): Add to_memory_map.
(target_memory_map, target_pre_inferior): New prototypes.
* memory-map.c, memory-map.h, xml-support.c, xml-support.h: New files.
gdb/doc/
2006-09-21 Vladimir Prus <vladimir@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
* gdb.texinfo (Memory Region Attributes): Mention target-supplied
memory regions and "mem auto".
2006-09-21 15:54:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef MEMORY_MAP_H
|
|
|
|
#define MEMORY_MAP_H
|
|
|
|
|
|
|
|
#include "memattr.h"
|
|
|
|
|
|
|
|
/* Parses XML memory map passed as argument and returns the memory
|
|
|
|
regions it describes. On any error, emits error message and
|
2011-01-09 04:20:33 +01:00
|
|
|
returns 0. Does not throw. Ownership of result is passed to the
|
|
|
|
caller. */
|
gdb/
2006-09-21 Vladimir Prus <vladimir@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
* Makefile.in (SFILES): Add memory-map.c and xml-support.c.
(memory_map_h, xml_support_h): New.
(target_h): Add vec_h dependency.
(COMMON_OBS): Add memory-map.o and xml-support.o.
(memory-map.o, xml-support.o): New rules.
(remote.o): Update.
* exceptions.h (enum errors): Add XML_PARSE_ERROR.
* infcmd.c (run_command_1, attach_command): Call target_pre_inferior.
* memattr.c (default_mem_attrib): Initialize blocksize.
(target_mem_region_list, mem_use_target)
(target_mem_regions_valid, mem_region_cmp, mem_region_init)
(require_user_regions, require_target_regions)
(invalidate_target_mem_regions): New.
(create_mem_region): Use mem_region_init.
(mem_clear): Move higher.
(lookup_mem_region): Use require_target_regions.
(mem_command): Implement "mem auto".
(mem_info_command): Handle target-supplied regions and flash
attributes.
(mem_enable_command, mem_disable_command, mem_delete_command): Use
require_user_regions.
(_initialize_mem): Mention "mem auto" in help.
* memattr.h (enum mem_access_mode): Add MEM_FLASH.
(struct mem_attrib): Add blocksize.
(invalidate_target_mem_regions, mem_region_init, mem_region_cmp): New
prototypes.
* remote.c: Include "memory-map.h".
(PACKET_qXfer_memory_map): New enum value.
(remote_protocol_features): Add qXfer:memory-map:read.
(remote_xfer_partial): Handle memory maps.
(remote_memory_map): New.
(init_remote_ops, init_remote_async_ops): Set to_memory_map.
(_initialize_remote): Register qXfer:memory-map:read.
* target.c (update_current_target): Mention to_memory_map.
(target_memory_map, target_pre_inferior): New.
(target_preopen): Call target_pre_inferior.
* target.h: Include "vec.h".
(enum target_object): Add TARGET_OBJECT_MEMORY_MAP.
(struct target_ops): Add to_memory_map.
(target_memory_map, target_pre_inferior): New prototypes.
* memory-map.c, memory-map.h, xml-support.c, xml-support.h: New files.
gdb/doc/
2006-09-21 Vladimir Prus <vladimir@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
* gdb.texinfo (Memory Region Attributes): Mention target-supplied
memory regions and "mem auto".
2006-09-21 15:54:03 +02:00
|
|
|
VEC(mem_region_s) *parse_memory_map (const char *memory_map);
|
|
|
|
|
|
|
|
#endif
|