/* XML target description support for GDB.
- Copyright (C) 2006, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2015 Free Software Foundation, Inc.
Contributed by CodeSourcery.
#include "filenames.h"
-#include "gdb_assert.h"
-
#if !defined(HAVE_LIBEXPAT)
/* Parse DOCUMENT into a target description. Or don't, since we don't have
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
const struct bfd_arch_info *arch;
arch = bfd_scan_arch (body_text);
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
enum gdb_osabi osabi;
osabi = osabi_from_tdesc_string (body_text);
const struct gdb_xml_element *element,
void *user_data, const char *body_text)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
const struct bfd_arch_info *arch;
arch = bfd_scan_arch (body_text);
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- char *version = xml_find_attribute (attributes, "version")->value;
+ char *version = (char *) xml_find_attribute (attributes, "version")->value;
if (strcmp (version, "1.0") != 0)
gdb_xml_error (parser,
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
- char *name = xml_find_attribute (attributes, "name")->value;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+ char *name = (char *) xml_find_attribute (attributes, "name")->value;
data->current_feature = tdesc_create_feature (data->tdesc, name);
}
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
struct gdb_xml_value *attrs = VEC_address (gdb_xml_value_s, attributes);
int ix = 0, length;
char *name, *group, *type;
length = VEC_length (gdb_xml_value_s, attributes);
- name = attrs[ix++].value;
+ name = (char *) attrs[ix++].value;
bitsize = * (ULONGEST *) attrs[ix++].value;
if (ix < length && strcmp (attrs[ix].name, "regnum") == 0)
regnum = data->next_regnum;
if (ix < length && strcmp (attrs[ix].name, "type") == 0)
- type = attrs[ix++].value;
+ type = (char *) attrs[ix++].value;
else
type = "int";
if (ix < length && strcmp (attrs[ix].name, "group") == 0)
- group = attrs[ix++].value;
+ group = (char *) attrs[ix++].value;
else
group = NULL;
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
- char *id = xml_find_attribute (attributes, "id")->value;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+ char *id = (char *) xml_find_attribute (attributes, "id")->value;
data->current_type = tdesc_create_union (data->current_feature, id);
data->current_type_size = 0;
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
- char *id = xml_find_attribute (attributes, "id")->value;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+ char *id = (char *) xml_find_attribute (attributes, "id")->value;
struct tdesc_type *type;
struct gdb_xml_value *attr;
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
- char *id = xml_find_attribute (attributes, "id")->value;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
+ char *id = (char *) xml_find_attribute (attributes, "id")->value;
int length = (int) * (ULONGEST *)
xml_find_attribute (attributes, "size")->value;
struct tdesc_type *type;
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
struct gdb_xml_value *attr;
struct tdesc_type *field_type;
char *field_name, *field_type_id;
int start, end;
- field_name = xml_find_attribute (attributes, "name")->value;
+ field_name = (char *) xml_find_attribute (attributes, "name")->value;
attr = xml_find_attribute (attributes, "type");
if (attr != NULL)
- field_type_id = attr->value;
+ field_type_id = (char *) attr->value;
else
field_type_id = NULL;
const struct gdb_xml_element *element,
void *user_data, VEC(gdb_xml_value_s) *attributes)
{
- struct tdesc_parsing_data *data = user_data;
+ struct tdesc_parsing_data *data = (struct tdesc_parsing_data *) user_data;
struct gdb_xml_value *attrs = VEC_address (gdb_xml_value_s, attributes);
struct tdesc_type *field_type;
char *id, *field_type_id;
int count;
- id = attrs[0].value;
- field_type_id = attrs[1].value;
+ id = (char *) attrs[0].value;
+ field_type_id = (char *) attrs[1].value;
count = * (ULONGEST *) attrs[2].value;
field_type = tdesc_named_type (data->current_feature, field_type_id);
static char *
fetch_available_features_from_target (const char *name, void *baton_)
{
- struct target_ops *ops = baton_;
+ struct target_ops *ops = (struct target_ops *) baton_;
/* Read this object as a string. This ensures that a NUL
terminator is added. */