GDB (xrefs)

Classes | Functions | Variables
/tmp/gdb-8.1/gdb/memory-map.c File Reference
`#include "defs.h"`
`#include "memory-map.h"`
`#include "xml-support.h"`

Go to the source code of this file.

## Classes
struct | memory_map_parsing_data

## Functions
static void | memory_map_start_memory (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
static void | memory_map_end_memory (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, const char *body_text)
static void | memory_map_start_property (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
static void | memory_map_end_property (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, const char *body_text)
std::vector< mem_region > | parse_memory_map (const char *memory_map)

## Variables
const struct gdb_xml_attribute | property_attributes []
const struct gdb_xml_element | memory_children []
const struct gdb_xml_enum | memory_type_enum []
const struct gdb_xml_attribute | memory_attributes []
const struct gdb_xml_element | memory_map_children []
const struct gdb_xml_element | memory_map_elements []

## Function Documentation

## ◆ memory_map_end_memory()

static void memory_map_end_memory | ( | struct gdb_xml_parser * | parser,
|  | const struct gdb_xml_element * | element,
|  | void * | user_data,
|  | const char * | body_text
| ) |  |
| static

Definition at line 82 of file memory-map.c.

References _, mem_region::attrib, mem_attrib::blocksize, gdb_xml_error(), MEM_FLASH, memory_map_parsing_data::memory_map, and mem_attrib::mode.

## ◆ memory_map_end_property()

static void memory_map_end_property | ( | struct gdb_xml_parser * | parser,
|  | const struct gdb_xml_element * | element,
|  | void * | user_data,
|  | const char * | body_text
| ) |  |
| static

Definition at line 113 of file memory-map.c.

References _, mem_region::attrib, mem_attrib::blocksize, gdb_xml_debug(), gdb_xml_parse_ulongest(), memory_map_parsing_data::memory_map, and memory_map_parsing_data::property_name.

## ◆ memory_map_start_memory()

static void memory_map_start_memory | ( | struct gdb_xml_parser * | parser,
|  | const struct gdb_xml_element * | element,
|  | void * | user_data,
|  | VEC(gdb_xml_value_s) * | attributes
| ) |  |
| static

Definition at line 59 of file memory-map.c.

References memory_map_parsing_data::memory_map, gdb_xml_value::value, and xml_find_attribute().

## ◆ memory_map_start_property()

static void memory_map_start_property | ( | struct gdb_xml_parser * | parser,
|  | const struct gdb_xml_element * | element,
|  | void * | user_data,
|  | VEC(gdb_xml_value_s) * | attributes
| ) |  |
| static

Definition at line 98 of file memory-map.c.

References name, memory_map_parsing_data::property_name, gdb_xml_value::value, and xml_find_attribute().

## ◆ parse_memory_map()

std::vector<mem_region> parse_memory_map | ( | const char * | memory_map | ) |

Definition at line 172 of file memory-map.c.

References _, gdb_xml_parse_quick(), and memory_map_elements.

Referenced by remote_memory_map().

## Variable Documentation

## ◆ memory_attributes

const struct gdb_xml_attribute memory_attributes[]

Initial value:
= {
{ "start", GDB_XML_AF_NONE, gdb_xml_parse_attr_ulongest, NULL },
{ "length", GDB_XML_AF_NONE, gdb_xml_parse_attr_ulongest, NULL },
{ "type", GDB_XML_AF_NONE, gdb_xml_parse_attr_enum, &memory_type_enum },
{ NULL, GDB_XML_AF_NONE, NULL, NULL }
}
memory_type_enum
const struct gdb_xml_enum memory_type_enum[]
Definition: memory-map.c:145
gdb_xml_parse_attr_enum
gdb_xml_attribute_handler gdb_xml_parse_attr_enum
GDB_XML_AF_NONE
Definition: xml-support.h:106
gdb_xml_parse_attr_ulongest
gdb_xml_attribute_handler gdb_xml_parse_attr_ulongest

Definition at line 152 of file memory-map.c.

## ◆ memory_children

const struct gdb_xml_element memory_children[]

Initial value:
= {
{ "property", property_attributes, NULL,
GDB_XML_EF_REPEATABLE | GDB_XML_EF_OPTIONAL,
memory_map_start_property, memory_map_end_property },
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
memory_map_start_property
static void memory_map_start_property(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
Definition: memory-map.c:98
memory_map_end_property
static void memory_map_end_property(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, const char *body_text)
Definition: memory-map.c:113
GDB_XML_EF_NONE
Definition: xml-support.h:127
property_attributes
const struct gdb_xml_attribute property_attributes[]
Definition: memory-map.c:133
GDB_XML_EF_REPEATABLE
Definition: xml-support.h:129
GDB_XML_EF_OPTIONAL
Definition: xml-support.h:128

Definition at line 138 of file memory-map.c.

## ◆ memory_map_children

const struct gdb_xml_element memory_map_children[]

Initial value:
= {
{ "memory", memory_attributes, memory_children, GDB_XML_EF_REPEATABLE,
memory_map_start_memory, memory_map_end_memory },
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
memory_attributes
const struct gdb_xml_attribute memory_attributes[]
Definition: memory-map.c:152
GDB_XML_EF_NONE
Definition: xml-support.h:127
GDB_XML_EF_REPEATABLE
Definition: xml-support.h:129
memory_children
const struct gdb_xml_element memory_children[]
Definition: memory-map.c:138
memory_map_end_memory
static void memory_map_end_memory(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, const char *body_text)
Definition: memory-map.c:82
memory_map_start_memory
static void memory_map_start_memory(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
Definition: memory-map.c:59

Definition at line 159 of file memory-map.c.

## ◆ memory_map_elements

const struct gdb_xml_element memory_map_elements[]

Initial value:
= {
{ "memory-map", NULL, memory_map_children, GDB_XML_EF_NONE,
NULL, NULL },
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
memory_map_children
const struct gdb_xml_element memory_map_children[]
Definition: memory-map.c:159
GDB_XML_EF_NONE
Definition: xml-support.h:127

Definition at line 165 of file memory-map.c.

Referenced by parse_memory_map().

## ◆ memory_type_enum

const struct gdb_xml_enum memory_type_enum[]

Initial value:
= {
{ "ram", MEM_RW },
{ "rom", MEM_RO },
{ "flash", MEM_FLASH },
{ NULL, 0 }
}
MEM_RO
Definition: memattr.h:27
MEM_RW
Definition: memattr.h:26
MEM_FLASH
Definition: memattr.h:31

Definition at line 145 of file memory-map.c.

## ◆ property_attributes

const struct gdb_xml_attribute property_attributes[]

Initial value:
= {
{ "name", GDB_XML_AF_NONE, NULL, NULL },
{ NULL, GDB_XML_AF_NONE, NULL, NULL }
}
GDB_XML_AF_NONE
Definition: xml-support.h:106

Definition at line 133 of file memory-map.c.