GDB (xrefs)

Classes | Typedefs | Functions | Variables
/tmp/gdb-8.1/gdb/xml-syscall.c File Reference
`#include "defs.h"`
`#include "gdbtypes.h"`
`#include "xml-support.h"`
`#include "xml-syscall.h"`
`#include "gdbarch.h"`
`#include "target.h"`
`#include "filenames.h"`

Go to the source code of this file.

## Classes
struct | syscall_desc
struct | syscall_group_desc
struct | syscalls_info
struct | syscall_parsing_data

## Typedefs
typedef std::unique_ptr< syscall_desc > | syscall_desc_up
typedef std::unique_ptr< syscall_group_desc > | syscall_group_desc_up
typedef std::unique_ptr< syscalls_info > | syscalls_info_up

## Functions
static struct syscall_group_desc * | syscall_group_create_syscall_group_desc (struct syscalls_info *syscalls_info, const char *group)
static void | syscall_group_add_syscall (struct syscalls_info *syscalls_info, struct syscall_desc *syscall, const char *group)
static void | syscall_create_syscall_desc (struct syscalls_info *syscalls_info, const char *name, int number, char *groups)
static void | syscall_start_syscall (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
static struct syscalls_info * | syscall_parse_xml (const char *document, xml_fetch_another fetcher, void *fetcher_baton)
static struct syscalls_info * | xml_init_syscalls_info (const char *filename)
static void | init_syscalls_info (struct gdbarch *gdbarch)
static struct syscall_group_desc * | syscall_group_get_group_by_name (const struct syscalls_info *syscalls_info, const char *group)
static int | xml_get_syscall_number (struct gdbarch *gdbarch, const char *syscall_name)
static const char * | xml_get_syscall_name (struct gdbarch *gdbarch, int syscall_number)
static const char ** | xml_list_of_syscalls (struct gdbarch *gdbarch)
static struct syscall * | xml_list_syscalls_by_group (struct gdbarch *gdbarch, const char *group)
static const char ** | xml_list_of_groups (struct gdbarch *gdbarch)
void | set_xml_syscall_file_name (struct gdbarch *gdbarch, const char *name)
void | get_syscall_by_number (struct gdbarch *gdbarch, int syscall_number, struct syscall *s)
void | get_syscall_by_name (struct gdbarch *gdbarch, const char *syscall_name, struct syscall *s)
const char ** | get_syscall_names (struct gdbarch *gdbarch)
struct syscall * | get_syscalls_by_group (struct gdbarch *gdbarch, const char *group)
const char ** | get_syscall_group_names (struct gdbarch *gdbarch)

## Variables
static const struct gdb_xml_attribute | syscall_attr []
static const struct gdb_xml_element | syscalls_info_children []
static const struct gdb_xml_element | syselements []

## Typedef Documentation

## ◆ syscall_desc_up

typedef std::unique_ptr<syscall_desc> syscall_desc_up

Definition at line 112 of file xml-syscall.c.

## ◆ syscall_group_desc_up

typedef std::unique_ptr<syscall_group_desc> syscall_group_desc_up

Definition at line 131 of file xml-syscall.c.

## ◆ syscalls_info_up

typedef std::unique_ptr<syscalls_info> syscalls_info_up

Definition at line 151 of file xml-syscall.c.

## Function Documentation

## ◆ get_syscall_by_name()

void get_syscall_by_name | ( | struct gdbarch * | gdbarch,
|  | const char * | syscall_name,
|  | struct syscall * | s
| ) |  |

Definition at line 529 of file xml-syscall.c.

References init_syscalls_info(), syscall::name, syscall::number, and xml_get_syscall_number().

Referenced by catch_syscall_split_args().

## ◆ get_syscall_by_number()

void get_syscall_by_number | ( | struct gdbarch * | gdbarch,
|  | int | syscall_number,
|  | struct syscall * | s
| ) |  |

Definition at line 519 of file xml-syscall.c.

References init_syscalls_info(), syscall::name, syscall::number, and xml_get_syscall_name().

Referenced by catch_syscall_command_1(), catch_syscall_split_args(), print_it_catch_syscall(), print_mention_catch_syscall(), print_one_catch_syscall(), and print_recreate_catch_syscall().

## ◆ get_syscall_group_names()

const char** get_syscall_group_names | ( | struct gdbarch * | gdbarch | ) |

Definition at line 559 of file xml-syscall.c.

References init_syscalls_info(), and xml_list_of_groups().

Referenced by catch_syscall_completer().

## ◆ get_syscall_names()

const char** get_syscall_names | ( | struct gdbarch * | gdbarch | ) |

Definition at line 539 of file xml-syscall.c.

References init_syscalls_info(), and xml_list_of_syscalls().

Referenced by catch_syscall_completer().

## ◆ get_syscalls_by_group()

struct syscall* get_syscalls_by_group | ( | struct gdbarch * | gdbarch,
|  | const char * | group
| ) |  |

Definition at line 549 of file xml-syscall.c.

References init_syscalls_info(), and xml_list_syscalls_by_group().

Referenced by catch_syscall_split_args().

## ◆ init_syscalls_info()

static void init_syscalls_info | ( | struct gdbarch * | gdbarch | ) |
| static

Definition at line 324 of file xml-syscall.c.

References _, gdb_datadir, gdbarch_syscalls_info(), gdbarch_xml_syscall_file(), syscalls_info::my_gdb_datadir, set_gdbarch_syscalls_info(), syscalls_info::syscalls, warning(), and xml_init_syscalls_info().

Referenced by get_syscall_by_name(), get_syscall_by_number(), get_syscall_group_names(), get_syscall_names(), and get_syscalls_by_group().

## ◆ set_xml_syscall_file_name()

void set_xml_syscall_file_name | ( | struct gdbarch * | gdbarch,
|  | const char * | name
| ) |  |

Definition at line 513 of file xml-syscall.c.

References name, and set_gdbarch_xml_syscall_file().

Referenced by aarch64_linux_init_abi(), amd64_linux_init_abi_common(), arm_linux_init_abi(), bfin_linux_init_abi(), fbsd_init_abi(), i386_linux_init_abi(), mips_linux_init_abi(), ppc_linux_init_abi(), s390_gdbarch_init(), sparc32_linux_init_abi(), and sparc64_linux_init_abi().

## ◆ syscall_create_syscall_desc()

static void syscall_create_syscall_desc | ( | struct syscalls_info * | syscalls_info,
|  | const char * | name,
|  | int | number,
|  | char * | groups
| ) |  |
| static

Definition at line 208 of file xml-syscall.c.

References name, syscall_group_add_syscall(), and syscalls_info::syscalls.

Referenced by syscall_start_syscall().

## ◆ syscall_group_add_syscall()

static void syscall_group_add_syscall | ( | struct syscalls_info * | syscalls_info,
|  | struct syscall_desc * | syscall,
|  | const char * | group
| ) |  |
| static

Definition at line 178 of file xml-syscall.c.

References syscalls_info::groups, syscall_group_create_syscall_group_desc(), and syscall_group_desc::syscalls.

Referenced by syscall_create_syscall_desc().

## ◆ syscall_group_create_syscall_group_desc()

static struct syscall_group_desc* syscall_group_create_syscall_group_desc | ( | struct syscalls_info * | syscalls_info,
|  | const char * | group
| ) |  |
| static

Definition at line 165 of file xml-syscall.c.

References syscalls_info::groups, and syscall_group_desc::syscall_group_desc().

Referenced by syscall_group_add_syscall().

## ◆ syscall_group_get_group_by_name()

static struct syscall_group_desc* syscall_group_get_group_by_name | ( | const struct syscalls_info * | syscalls_info,
|  | const char * | group
| ) |  |
| static

Definition at line 376 of file xml-syscall.c.

References syscalls_info::groups.

Referenced by xml_list_syscalls_by_group().

## ◆ syscall_parse_xml()

static struct syscalls_info* syscall_parse_xml | ( | const char * | document,
|  | xml_fetch_another | fetcher,
|  | void * | fetcher_baton
| ) |  |
| static

Definition at line 282 of file xml-syscall.c.

References _, gdb_xml_parse_quick(), syscall_parsing_data::syscalls_info, syselements, and warning().

Referenced by xml_init_syscalls_info().

## ◆ syscall_start_syscall()

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

Definition at line 228 of file xml-syscall.c.

References _, gdb_assert, internal_error(), name, syscall_create_syscall_desc(), syscall_parsing_data::syscalls_info, gdb_xml_value::value, VEC_address, and VEC_length.

## ◆ xml_get_syscall_name()

static const char* xml_get_syscall_name | ( | struct gdbarch * | gdbarch,
|  | int | syscall_number
| ) |  |
| static

Definition at line 413 of file xml-syscall.c.

References gdbarch_syscalls_info(), and syscalls_info::syscalls.

Referenced by get_syscall_by_number().

## ◆ xml_get_syscall_number()

static int xml_get_syscall_number | ( | struct gdbarch * | gdbarch,
|  | const char * | syscall_name
| ) |  |
| static

Definition at line 396 of file xml-syscall.c.

References gdbarch_syscalls_info(), syscalls_info::syscalls, and UNKNOWN_SYSCALL.

Referenced by get_syscall_by_name().

## ◆ xml_init_syscalls_info()

static struct syscalls_info* xml_init_syscalls_info | ( | const char * | filename | ) |
| static

Definition at line 309 of file xml-syscall.c.

References gdb_datadir, ldirname(), syscall_parse_xml(), and xml_fetch_content_from_file().

Referenced by init_syscalls_info().

## ◆ xml_list_of_groups()

static const char** xml_list_of_groups | ( | struct gdbarch * | gdbarch | ) |
| static

Definition at line 491 of file xml-syscall.c.

References gdbarch_syscalls_info(), syscalls_info::groups, and xmalloc().

Referenced by get_syscall_group_names().

## ◆ xml_list_of_syscalls()

static const char** xml_list_of_syscalls | ( | struct gdbarch * | gdbarch | ) |
| static

Definition at line 430 of file xml-syscall.c.

References gdbarch_syscalls_info(), syscalls_info::syscalls, and XNEWVEC.

Referenced by get_syscall_names().

## ◆ xml_list_syscalls_by_group()

static struct syscall* xml_list_syscalls_by_group | ( | struct gdbarch * | gdbarch,
|  | const char * | group
| ) |  |
| static

Definition at line 454 of file xml-syscall.c.

References gdbarch_syscalls_info(), syscall::name, syscall::number, syscall_group_get_group_by_name(), syscall_group_desc::syscalls, and xmalloc().

Referenced by get_syscalls_by_group().

## Variable Documentation

## ◆ syscall_attr

const struct gdb_xml_attribute syscall_attr[]
| static

Initial value:
= {
{ "number", GDB_XML_AF_NONE, gdb_xml_parse_attr_ulongest, NULL },
{ "name", GDB_XML_AF_NONE, NULL, NULL },
{ "groups", GDB_XML_AF_OPTIONAL, NULL, NULL },
{ NULL, GDB_XML_AF_NONE, NULL, NULL }
}
GDB_XML_AF_NONE
Definition: xml-support.h:106
GDB_XML_AF_OPTIONAL
Definition: xml-support.h:107
gdb_xml_parse_attr_ulongest
gdb_xml_attribute_handler gdb_xml_parse_attr_ulongest

Definition at line 261 of file xml-syscall.c.

## ◆ syscalls_info_children

const struct gdb_xml_element syscalls_info_children[]
| static

Initial value:
= {
{ "syscall", syscall_attr, NULL,
GDB_XML_EF_OPTIONAL | GDB_XML_EF_REPEATABLE,
syscall_start_syscall, NULL },
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
syscall_attr
static const struct gdb_xml_attribute syscall_attr[]
Definition: xml-syscall.c:261
GDB_XML_EF_NONE
Definition: xml-support.h:127
GDB_XML_EF_REPEATABLE
Definition: xml-support.h:129
GDB_XML_EF_OPTIONAL
Definition: xml-support.h:128
syscall_start_syscall
static void syscall_start_syscall(struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes)
Definition: xml-syscall.c:228

Definition at line 268 of file xml-syscall.c.

## ◆ syselements

const struct gdb_xml_element syselements[]
| static

Initial value:
= {
{ "syscalls_info", NULL, syscalls_info_children,
GDB_XML_EF_NONE, NULL, NULL },
{ NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
}
GDB_XML_EF_NONE
Definition: xml-support.h:127
syscalls_info_children
static const struct gdb_xml_element syscalls_info_children[]
Definition: xml-syscall.c:268

Definition at line 275 of file xml-syscall.c.

Referenced by syscall_parse_xml().