GDB (xrefs)

Classes | Functions | Variables
/tmp/gdb-8.1/gdb/osdata.c File Reference
`#include "defs.h"`
`#include "target.h"`
`#include "vec.h"`
`#include "xml-support.h"`
`#include "osdata.h"`
`#include "ui-out.h"`
`#include "gdbcmd.h"`

Go to the source code of this file.

## Classes
struct | osdata_parsing_data

## Functions
static void | osdata_start_osdata (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
static void | osdata_start_item (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
static void | osdata_start_column (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
static void | osdata_end_column (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, const char *body_text)
std::unique_ptr< osdata > | osdata_parse (const char *xml)
std::unique_ptr< osdata > | get_osdata (const char *type)
const std::string * | get_osdata_column (const osdata_item &item, const char *name)
void | info_osdata (const char *type)
static void | info_osdata_command (const char *arg, int from_tty)
void | _initialize_osdata (void)

## Variables
const struct gdb_xml_attribute | column_attributes []
const struct gdb_xml_element | item_children []
const struct gdb_xml_attribute | osdata_attributes []
const struct gdb_xml_element | osdata_children []
const struct gdb_xml_element | osdata_elements []

## Function Documentation

## ◆ _initialize_osdata()

void _initialize_osdata | ( | void |  | ) |

Definition at line 291 of file osdata.c.

References _, add_info(), and info_osdata_command().

## ◆ get_osdata()

std::unique_ptr<osdata> get_osdata | ( | const char * | type | ) |

Definition at line 160 of file osdata.c.

References _, error(), osdata_parse(), target_get_osdata(), and warning().

Referenced by info_osdata(), and list_available_thread_groups().

## ◆ get_osdata_column()

const std::string* get_osdata_column | ( | const osdata_item & | item,
|  | const char * | name
| ) |  |

Definition at line 185 of file osdata.c.

References osdata_item::columns, osdata_column::name, name, and osdata_column::value.

Referenced by list_available_thread_groups().

## ◆ info_osdata()

void info_osdata | ( | const char * | type | ) |

Definition at line 195 of file osdata.c.

References _, osdata_item::columns, current_uiout, error(), ui_out::field_string(), get_osdata(), ui_out::is_mi_like_p(), osdata::items, ui_out::table_body(), ui_out::table_header(), ui_out::text(), and ui_left.

Referenced by info_osdata_command(), and mi_cmd_info_os().

## ◆ info_osdata_command()

static void info_osdata_command | ( | const char * | arg,
|  | int | from_tty
| ) |  |
| static

Definition at line 285 of file osdata.c.

References info_osdata().

Referenced by _initialize_osdata().

## ◆ osdata_end_column()

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

Definition at line 98 of file osdata.c.

References osdata_item::columns, osdata::items, osdata_parsing_data::osdata, osdata_parsing_data::property_name, and string.

## ◆ osdata_parse()

std::unique_ptr<osdata> osdata_parse | ( | const char * | xml | ) |

Definition at line 144 of file osdata.c.

References _, gdb_xml_parse_quick(), osdata_parsing_data::osdata, and osdata_elements.

Referenced by get_osdata().

## ◆ osdata_start_column()

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

Definition at line 84 of file osdata.c.

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

## ◆ osdata_start_item()

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

Definition at line 73 of file osdata.c.

References osdata_parsing_data::osdata.

## ◆ osdata_start_osdata()

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

Definition at line 57 of file osdata.c.

References _, gdb_xml_error(), osdata_parsing_data::osdata, string, gdb_xml_value::value, and xml_find_attribute().

## Variable Documentation

## ◆ column_attributes

const struct gdb_xml_attribute column_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 113 of file osdata.c.

## ◆ item_children

const struct gdb_xml_element item_children[]

Initial value:
= {
{ "column", column_attributes, NULL,
GDB_XML_EF_REPEATABLE | GDB_XML_EF_OPTIONAL,
osdata_start_column, osdata_end_column },
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
osdata_end_column
static void osdata_end_column(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, const char *body_text)
Definition: osdata.c:98
column_attributes
const struct gdb_xml_attribute column_attributes[]
Definition: osdata.c:113
GDB_XML_EF_NONE
Definition: xml-support.h:127
GDB_XML_EF_REPEATABLE
Definition: xml-support.h:129
osdata_start_column
static void osdata_start_column(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
Definition: osdata.c:84
GDB_XML_EF_OPTIONAL
Definition: xml-support.h:128

Definition at line 118 of file osdata.c.

## ◆ osdata_attributes

const struct gdb_xml_attribute osdata_attributes[]

Initial value:
= {
{ "type", 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 125 of file osdata.c.

## ◆ osdata_children

const struct gdb_xml_element osdata_children[]

Initial value:
= {
{ "item", NULL, item_children,
GDB_XML_EF_REPEATABLE | GDB_XML_EF_OPTIONAL,
osdata_start_item, NULL },
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
GDB_XML_EF_NONE
Definition: xml-support.h:127
osdata_start_item
static void osdata_start_item(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
Definition: osdata.c:73
GDB_XML_EF_REPEATABLE
Definition: xml-support.h:129
GDB_XML_EF_OPTIONAL
Definition: xml-support.h:128
item_children
const struct gdb_xml_element item_children[]
Definition: osdata.c:118

Definition at line 130 of file osdata.c.

## ◆ osdata_elements

const struct gdb_xml_element osdata_elements[]

Initial value:
= {
{ "osdata", osdata_attributes, osdata_children,
GDB_XML_EF_NONE, osdata_start_osdata, NULL },
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
GDB_XML_EF_NONE
Definition: xml-support.h:127
osdata_start_osdata
static void osdata_start_osdata(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
Definition: osdata.c:57
osdata_children
const struct gdb_xml_element osdata_children[]
Definition: osdata.c:130
osdata_attributes
const struct gdb_xml_attribute osdata_attributes[]
Definition: osdata.c:125

Definition at line 137 of file osdata.c.

Referenced by osdata_parse().