GDBserver

Classes | Functions
tdesc.c File Reference
`#include "server.h"`
`#include "tdesc.h"`
`#include "regdef.h"`

Go to the source code of this file.

## Classes
struct | default_description
struct | tdesc_type

## Functions
void | init_target_desc (struct target_desc *tdesc)
struct target_desc * | allocate_target_description (void)
void | copy_target_description (struct target_desc *dest, const struct target_desc *src)
const struct target_desc * | current_target_desc (void)
void | set_tdesc_architecture (struct target_desc *target_desc, const char *name)
void | set_tdesc_osabi (struct target_desc *target_desc, const char *name)
const char * | tdesc_get_features_xml (target_desc *tdesc)
struct tdesc_feature * | tdesc_create_feature (struct target_desc *tdesc, const char *name, const char *xml)
tdesc_type_with_fields * | tdesc_create_flags (struct tdesc_feature *feature, const char *name, int size)
void | tdesc_add_flag (tdesc_type_with_fields *type, int start, const char *flag_name)
struct tdesc_type * | tdesc_named_type (const struct tdesc_feature *feature, const char *id)
tdesc_type_with_fields * | tdesc_create_union (struct tdesc_feature *feature, const char *id)
tdesc_type_with_fields * | tdesc_create_struct (struct tdesc_feature *feature, const char *id)
void | tdesc_create_reg (struct tdesc_feature *feature, const char *name, int regnum, int save_restore, const char *group, int bitsize, const char *type)
struct tdesc_type * | tdesc_create_vector (struct tdesc_feature *feature, const char *name, struct tdesc_type *field_type, int count)
void | tdesc_add_bitfield (tdesc_type_with_fields *type, const char *field_name, int start, int end)
void | tdesc_add_field (tdesc_type_with_fields *type, const char *field_name, struct tdesc_type *field_type)
void | tdesc_set_struct_size (tdesc_type_with_fields *type, int size)

## Function Documentation

## ◆ allocate_target_description()

struct target_desc* allocate_target_description | ( | void |  | ) |

Definition at line 41 of file tdesc.c.

References target_desc::target_desc().

Referenced by handle_extended_wait(), and initialize_low_arch().

## ◆ copy_target_description()

void copy_target_description | ( | struct target_desc * | dest,
|  | const struct target_desc * | src
| ) |  |

Definition at line 51 of file tdesc.c.

References target_desc::expedite_regs, target_desc::reg_defs, target_desc::registers_size, and target_desc::xmltarget.

Referenced by handle_extended_wait(), and initialize_low_arch().

## ◆ current_target_desc()

const struct target_desc* current_target_desc | ( | void |  | ) |

Definition at line 61 of file tdesc.c.

References current_process(), current_thread, and process_info::tdesc.

Referenced by get_features_xml(), prepare_resume_reply(), process_serial_event(), traceframe_get_pc(), and traceframe_walk_blocks().

## ◆ init_target_desc()

void init_target_desc | ( | struct target_desc * | tdesc | ) |

Definition at line 23 of file tdesc.c.

References gdb_assert, offset, PBUFSIZ, target_desc::reg_defs, and target_desc::registers_size.

Referenced by aarch64_linux_read_description(), i386_arch_setup(), i386_linux_read_description(), lynx_i386_arch_setup(), nto_x86_arch_setup(), and tic6x_read_description().

## ◆ set_tdesc_architecture()

void set_tdesc_architecture | ( | struct target_desc * | target_desc,
|  | const char * | name
| ) |  |

Definition at line 72 of file tdesc.c.

References target_desc::arch, name, and xstrdup().

## ◆ set_tdesc_osabi()

void set_tdesc_osabi | ( | struct target_desc * | target_desc,
|  | const char * | name
| ) |  |

Definition at line 81 of file tdesc.c.

References name, target_desc::osabi, and xstrdup().

## ◆ tdesc_add_bitfield()

void tdesc_add_bitfield | ( | tdesc_type_with_fields * | type,
|  | const char * | field_name,
|  | int | start,
|  | int | end
| ) |  |

Definition at line 225 of file tdesc.c.

## ◆ tdesc_add_field()

void tdesc_add_field | ( | tdesc_type_with_fields * | type,
|  | const char * | field_name,
|  | struct tdesc_type * | field_type
| ) |  |

Definition at line 232 of file tdesc.c.

## ◆ tdesc_add_flag()

void tdesc_add_flag | ( | tdesc_type_with_fields * | type,
|  | int | start,
|  | const char * | flag_name
| ) |  |

Definition at line 159 of file tdesc.c.

## ◆ tdesc_create_feature()

struct tdesc_feature* tdesc_create_feature | ( | struct target_desc * | tdesc,
|  | const char * | name,
|  | const char * | xml
| ) |  |

Definition at line 138 of file tdesc.c.

References VEC_safe_push, and xstrdup().

## ◆ tdesc_create_flags()

tdesc_type_with_fields* tdesc_create_flags | ( | struct tdesc_feature * | feature,
|  | const char * | name,
|  | int | size
| ) |  |

Definition at line 150 of file tdesc.c.

## ◆ tdesc_create_reg()

void tdesc_create_reg | ( | struct tdesc_feature * | feature,
|  | const char * | name,
|  | int | regnum,
|  | int | save_restore,
|  | const char * | group,
|  | int | bitsize,
|  | const char * | type
| ) |  |

Definition at line 190 of file tdesc.c.

References gdb_assert, name, target_desc::reg_defs, and XCNEW.

## ◆ tdesc_create_struct()

tdesc_type_with_fields* tdesc_create_struct | ( | struct tdesc_feature * | feature,
|  | const char * | id
| ) |  |

Definition at line 182 of file tdesc.c.

## ◆ tdesc_create_union()

tdesc_type_with_fields* tdesc_create_union | ( | struct tdesc_feature * | feature,
|  | const char * | id
| ) |  |

Definition at line 174 of file tdesc.c.

## ◆ tdesc_create_vector()

struct tdesc_type* tdesc_create_vector | ( | struct tdesc_feature * | feature,
|  | const char * | name,
|  | struct tdesc_type * | field_type,
|  | int | count
| ) |  |

Definition at line 218 of file tdesc.c.

## ◆ tdesc_get_features_xml()

const char* tdesc_get_features_xml | ( | target_desc * | tdesc | ) |

Definition at line 90 of file tdesc.c.

References target_desc::arch, gdb_assert, target_desc::osabi, string, VEC_iterate, target_desc::xmltarget, and xstrdup().

Referenced by get_features_xml().

## ◆ tdesc_named_type()

struct tdesc_type* tdesc_named_type | ( | const struct tdesc_feature * | feature,
|  | const char * | id
| ) |  |

Definition at line 166 of file tdesc.c.

## ◆ tdesc_set_struct_size()

void tdesc_set_struct_size | ( | tdesc_type_with_fields * | type,
|  | int | size
| ) |  |

Definition at line 239 of file tdesc.c.