Beispiel #1
0
static void
memory_map_end_memory (struct gdb_xml_parser *parser,
		       const struct gdb_xml_element *element,
		       void *user_data, const char *body_text)
{
  struct memory_map_parsing_data *data
    = (struct memory_map_parsing_data *) user_data;
  const mem_region &r = data->memory_map->back ();

  if (r.attrib.mode == MEM_FLASH && r.attrib.blocksize == -1)
    gdb_xml_error (parser, _("Flash block size is not set"));
}
Beispiel #2
0
static void
osdata_start_osdata (struct gdb_xml_parser *parser,
                        const struct gdb_xml_element *element,
                        void *user_data,
			std::vector<gdb_xml_value> &attributes)
{
  struct osdata_parsing_data *data = (struct osdata_parsing_data *) user_data;

  if (data->osdata != NULL)
    gdb_xml_error (parser, _("Seen more than on osdata element"));

  char *type = (char *) xml_find_attribute (attributes, "type")->value.get ();
  data->osdata.reset (new struct osdata (std::string (type)));
}