/* Routines for handling XML generic OS data provided by target.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of GDB.
{
struct osdata_parsing_data *data = user_data;
struct osdata_item item = { NULL };
+
VEC_safe_push (osdata_item_s, data->osdata->items, &item);
}
{
struct osdata_parsing_data *data = user_data;
const char *name = VEC_index (gdb_xml_value_s, attributes, 0)->value;
+
data->property_name = xstrdup (name);
}
clear_parsing_data (void *p)
{
struct osdata_parsing_data *data = p;
+
osdata_free (data->osdata);
data->osdata = NULL;
xfree (data->property_name);
{
struct osdata_column *col;
int ix;
+
for (ix = 0;
VEC_iterate (osdata_column_s, item->columns,
ix, col);
{
struct osdata_item *item;
int ix;
+
for (ix = 0;
VEC_iterate (osdata_item_s, osdata->items,
ix, item);
osdata_free_cleanup (void *arg)
{
struct osdata *osdata = arg;
+
osdata_free (osdata);
}
{
struct osdata *osdata = NULL;
char *xml = target_get_osdata (type);
+
if (xml)
{
struct cleanup *old_chain = make_cleanup (xfree, xml);
{
struct osdata_column *col;
int ix;
+
for (ix = 0;
VEC_iterate (osdata_column_s, last->columns,
ix, col);
{
struct osdata_item *item;
int ix_items;
+
for (ix_items = 0;
VEC_iterate (osdata_item_s, osdata->items,
ix_items, item);