1 /* Memory attributes support, for GDB.
3 Copyright (C) 2001, 2006 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA. */
29 MEM_RW
, /* read/write */
30 MEM_RO
, /* read only */
31 MEM_WO
, /* write only */
33 /* Read/write, but special steps are required to write to it. */
39 MEM_WIDTH_UNSPECIFIED
,
40 MEM_WIDTH_8
, /* 8 bit accesses */
41 MEM_WIDTH_16
, /* 16 " " */
42 MEM_WIDTH_32
, /* 32 " " */
43 MEM_WIDTH_64
/* 64 " " */
46 /* The set of all attributes that can be set for a memory region.
48 This structure was created so that memory attributes can be passed
49 to target_ functions without exposing the details of memory region
50 list, which would be necessary if these fields were simply added to
51 the mem_region structure.
53 FIXME: It would be useful if there was a mechanism for targets to
54 add their own attributes. For example, the number of wait states. */
58 /* read/write, read-only, or write-only */
59 enum mem_access_mode mode
;
61 enum mem_access_width width
;
63 /* enables hardware breakpoints */
66 /* enables host-side caching of memory region data */
69 /* enables memory verification. after a write, memory is re-read
70 to verify that the write was successful. */
73 /* Block size. Only valid if mode == MEM_FLASH. */
82 /* Item number of this memory region. */
85 /* Status of this memory region (enabled if non-zero, otherwise disabled) */
88 /* Attributes for this region */
89 struct mem_attrib attrib
;
92 /* Declare a vector type for a group of mem_region structures. The
93 typedef is necessary because vec.h can not handle a struct tag.
94 Except during construction, these vectors are kept sorted. */
95 typedef struct mem_region mem_region_s
;
96 DEF_VEC_O(mem_region_s
);
98 extern struct mem_region
*lookup_mem_region(CORE_ADDR
);
100 void invalidate_target_mem_regions (void);
102 void mem_region_init (struct mem_region
*);
104 int mem_region_cmp (const void *, const void *);
106 #endif /* MEMATTR_H */
This page took 0.033793 seconds and 5 git commands to generate.