GDB (xrefs)
Classes | Macros | Functions | Variables
scm-type.c File Reference
#include "defs.h"
#include "arch-utils.h"
#include "value.h"
#include "gdbtypes.h"
#include "objfiles.h"
#include "language.h"
#include "vec.h"
#include "bcache.h"
#include "dwarf2loc.h"
#include "typeprint.h"
#include "guile-internal.h"

Go to the source code of this file.

Classes

struct  _type_smob
 
struct  field_smob
 

Macros

#define X(SYM)   { #SYM, SYM }
 

Functions

static struct typetyscm_get_composite (struct type *type)
 
struct typetyscm_type_smob_type (type_smob *t_smob)
 
static char * tyscm_type_name (struct type *type, SCM *excp)
 
static hashval_t tyscm_hash_type_smob (const void *p)
 
static int tyscm_eq_type_smob (const void *ap, const void *bp)
 
static htab_t tyscm_type_map (struct type *type)
 
static size_t tyscm_free_type_smob (SCM self)
 
static int tyscm_print_type_smob (SCM self, SCM port, scm_print_state *pstate)
 
static SCM tyscm_equal_p_type_smob (SCM type1_scm, SCM type2_scm)
 
static SCM tyscm_make_type_smob (void)
 
int tyscm_is_type (SCM self)
 
static SCM gdbscm_type_p (SCM self)
 
SCM tyscm_scm_from_type (struct type *type)
 
static SCM tyscm_get_type_arg_unsafe (SCM self, int arg_pos, const char *func_name)
 
type_smobtyscm_get_type_smob_arg_unsafe (SCM self, int arg_pos, const char *func_name)
 
static int tyscm_copy_type_recursive (void **slot, void *info)
 
static void save_objfile_types (struct objfile *objfile, void *datum)
 
static int tyscm_print_field_smob (SCM self, SCM port, scm_print_state *pstate)
 
static SCM tyscm_make_field_smob (SCM type_scm, int field_num)
 
static int tyscm_is_field (SCM self)
 
static SCM gdbscm_field_p (SCM self)
 
SCM tyscm_scm_from_field (SCM type_scm, int field_num)
 
static SCM tyscm_get_field_arg_unsafe (SCM self, int arg_pos, const char *func_name)
 
static field_smobtyscm_get_field_smob_arg_unsafe (SCM self, int arg_pos, const char *func_name)
 
static struct typetyscm_field_smob_containing_type (field_smob *f_smob)
 
static struct fieldtyscm_field_smob_to_field (field_smob *f_smob)
 
static SCM gdbscm_type_code (SCM self)
 
static SCM gdbscm_type_fields (SCM self)
 
static SCM gdbscm_type_tag (SCM self)
 
static SCM gdbscm_type_name (SCM self)
 
static SCM gdbscm_type_print_name (SCM self)
 
static SCM gdbscm_type_sizeof (SCM self)
 
static SCM gdbscm_type_strip_typedefs (SCM self)
 
static SCM tyscm_array_1 (SCM self, SCM n1_scm, SCM n2_scm, int is_vector, const char *func_name)
 
static SCM gdbscm_type_array (SCM self, SCM n1, SCM n2)
 
static SCM gdbscm_type_vector (SCM self, SCM n1, SCM n2)
 
static SCM gdbscm_type_pointer (SCM self)
 
static SCM gdbscm_type_range (SCM self)
 
static SCM gdbscm_type_reference (SCM self)
 
static SCM gdbscm_type_target (SCM self)
 
static SCM gdbscm_type_const (SCM self)
 
static SCM gdbscm_type_volatile (SCM self)
 
static SCM gdbscm_type_unqualified (SCM self)
 
static SCM gdbscm_type_num_fields (SCM self)
 
static SCM gdbscm_type_field (SCM self, SCM field_scm)
 
static SCM gdbscm_type_has_field_p (SCM self, SCM field_scm)
 
static SCM gdbscm_make_field_iterator (SCM self)
 
static SCM gdbscm_type_next_field_x (SCM self)
 
static SCM gdbscm_field_name (SCM self)
 
static SCM gdbscm_field_type (SCM self)
 
static SCM gdbscm_field_enumval (SCM self)
 
static SCM gdbscm_field_bitpos (SCM self)
 
static SCM gdbscm_field_bitsize (SCM self)
 
static SCM gdbscm_field_artificial_p (SCM self)
 
static SCM gdbscm_field_baseclass_p (SCM self)
 
static struct typetyscm_lookup_typename (const char *type_name, const struct block *block)
 
static SCM gdbscm_lookup_type (SCM name_scm, SCM rest)
 
void gdbscm_initialize_types (void)
 

Variables

static const char type_smob_name [] = "gdb:type"
 
static const char field_smob_name [] = "gdb:field"
 
static const char not_composite_error []
 
static scm_t_bits type_smob_tag
 
static scm_t_bits field_smob_tag
 
static SCM tyscm_next_field_x_proc
 
static SCM block_keyword
 
static const struct objfile_data * tyscm_objfile_data_key
 
static htab_t global_types_map
 
static const scheme_integer_constant type_integer_constants []
 
static const scheme_function type_functions []
 

Macro Definition Documentation

#define X (   SYM)    { #SYM, SYM }

Function Documentation

static SCM gdbscm_field_artificial_p ( SCM  self)
static
static SCM gdbscm_field_baseclass_p ( SCM  self)
static
static SCM gdbscm_field_bitpos ( SCM  self)
static
static SCM gdbscm_field_bitsize ( SCM  self)
static
static SCM gdbscm_field_enumval ( SCM  self)
static
static SCM gdbscm_field_name ( SCM  self)
static
static SCM gdbscm_field_p ( SCM  self)
static

Definition at line 457 of file scm-type.c.

References tyscm_is_field().

static SCM gdbscm_field_type ( SCM  self)
static
void gdbscm_initialize_types ( void  )
static SCM gdbscm_lookup_type ( SCM  name_scm,
SCM  rest 
)
static
static SCM gdbscm_make_field_iterator ( SCM  self)
static
static SCM gdbscm_type_array ( SCM  self,
SCM  n1,
SCM  n2 
)
static

Definition at line 762 of file scm-type.c.

References FUNC_NAME, and tyscm_array_1().

static SCM gdbscm_type_code ( SCM  self)
static

Definition at line 528 of file scm-type.c.

References FUNC_NAME, _type_smob::type, TYPE_CODE, and tyscm_get_type_smob_arg_unsafe().

static SCM gdbscm_type_const ( SCM  self)
static
static SCM gdbscm_type_field ( SCM  self,
SCM  field_scm 
)
static
static SCM gdbscm_type_fields ( SCM  self)
static
static SCM gdbscm_type_has_field_p ( SCM  self,
SCM  field_scm 
)
static
static SCM gdbscm_type_name ( SCM  self)
static
static SCM gdbscm_type_next_field_x ( SCM  self)
static
static SCM gdbscm_type_num_fields ( SCM  self)
static
static SCM gdbscm_type_p ( SCM  self)
static

Definition at line 294 of file scm-type.c.

References tyscm_is_type().

static SCM gdbscm_type_pointer ( SCM  self)
static
static SCM gdbscm_type_print_name ( SCM  self)
static
static SCM gdbscm_type_range ( SCM  self)
static
static SCM gdbscm_type_reference ( SCM  self)
static
static SCM gdbscm_type_sizeof ( SCM  self)
static
static SCM gdbscm_type_strip_typedefs ( SCM  self)
static
static SCM gdbscm_type_tag ( SCM  self)
static
static SCM gdbscm_type_target ( SCM  self)
static
static SCM gdbscm_type_unqualified ( SCM  self)
static
static SCM gdbscm_type_vector ( SCM  self,
SCM  n1,
SCM  n2 
)
static

Definition at line 778 of file scm-type.c.

References FUNC_NAME, and tyscm_array_1().

static SCM gdbscm_type_volatile ( SCM  self)
static
static void save_objfile_types ( struct objfile objfile,
void *  datum 
)
static
static SCM tyscm_array_1 ( SCM  self,
SCM  n1_scm,
SCM  n2_scm,
int  is_vector,
const char *  func_name 
)
static
static int tyscm_copy_type_recursive ( void **  slot,
void *  info 
)
static
static int tyscm_eq_type_smob ( const void *  ap,
const void *  bp 
)
static

Definition at line 150 of file scm-type.c.

References _type_smob::type.

Referenced by gdbscm_initialize_types(), and tyscm_type_map().

static SCM tyscm_equal_p_type_smob ( SCM  type1_scm,
SCM  type2_scm 
)
static
static struct type* tyscm_field_smob_containing_type ( field_smob f_smob)
static
static struct field* tyscm_field_smob_to_field ( field_smob f_smob)
static
static size_t tyscm_free_type_smob ( SCM  self)
static
static struct type * tyscm_get_composite ( struct type type)
static
static SCM tyscm_get_field_arg_unsafe ( SCM  self,
int  arg_pos,
const char *  func_name 
)
static

Definition at line 475 of file scm-type.c.

References field_smob_name, and tyscm_is_field().

Referenced by tyscm_get_field_smob_arg_unsafe().

static field_smob* tyscm_get_field_smob_arg_unsafe ( SCM  self,
int  arg_pos,
const char *  func_name 
)
static
static SCM tyscm_get_type_arg_unsafe ( SCM  self,
int  arg_pos,
const char *  func_name 
)
static

Definition at line 330 of file scm-type.c.

References type_smob_name, and tyscm_is_type().

Referenced by tyscm_get_type_smob_arg_unsafe().

type_smob* tyscm_get_type_smob_arg_unsafe ( SCM  self,
int  arg_pos,
const char *  func_name 
)
static hashval_t tyscm_hash_type_smob ( const void *  p)
static

Definition at line 140 of file scm-type.c.

References _type_smob::type.

Referenced by gdbscm_initialize_types(), and tyscm_type_map().

static int tyscm_is_field ( SCM  self)
static

Definition at line 449 of file scm-type.c.

References field_smob_tag.

Referenced by gdbscm_field_p(), and tyscm_get_field_arg_unsafe().

int tyscm_is_type ( SCM  self)
static struct type* tyscm_lookup_typename ( const char *  type_name,
const struct block block 
)
static
static SCM tyscm_make_field_smob ( SCM  type_scm,
int  field_num 
)
static
static SCM tyscm_make_type_smob ( void  )
static
static int tyscm_print_field_smob ( SCM  self,
SCM  port,
scm_print_state *  pstate 
)
static
static int tyscm_print_type_smob ( SCM  self,
SCM  port,
scm_print_state *  pstate 
)
static
SCM tyscm_scm_from_field ( SCM  type_scm,
int  field_num 
)

Definition at line 466 of file scm-type.c.

References tyscm_make_field_smob().

SCM tyscm_scm_from_type ( struct type type)
static htab_t tyscm_type_map ( struct type type)
static
static char* tyscm_type_name ( struct type type,
SCM *  excp 
)
static
struct type* tyscm_type_smob_type ( type_smob t_smob)

Definition at line 97 of file scm-type.c.

References _type_smob::type.

Referenced by gdbscm_make_lazy_value(), gdbscm_make_value(), and vlscm_do_cast().

Variable Documentation

SCM block_keyword
static

Definition at line 84 of file scm-type.c.

Referenced by gdbscm_initialize_types(), and gdbscm_lookup_type().

const char field_smob_name[] = "gdb:field"
static
scm_t_bits field_smob_tag
static

Definition at line 78 of file scm-type.c.

Referenced by gdbscm_initialize_types(), tyscm_is_field(), and tyscm_make_field_smob().

htab_t global_types_map
static

Definition at line 89 of file scm-type.c.

Referenced by gdbscm_initialize_types(), and tyscm_type_map().

const char not_composite_error[]
static
Initial value:
=
N_("type is not a structure, union, or enum type")
#define N_(String)
Definition: gdb_locale.h:41

Definition at line 71 of file scm-type.c.

Referenced by gdbscm_make_field_iterator(), gdbscm_type_field(), gdbscm_type_fields(), gdbscm_type_has_field_p(), and gdbscm_type_num_fields().

const scheme_function type_functions[]
static

Definition at line 1342 of file scm-type.c.

const scheme_integer_constant type_integer_constants[]
static

Definition at line 1308 of file scm-type.c.

const char type_smob_name[] = "gdb:type"
static
scm_t_bits type_smob_tag
static

Definition at line 75 of file scm-type.c.

Referenced by gdbscm_initialize_types(), tyscm_is_type(), and tyscm_make_type_smob().

SCM tyscm_next_field_x_proc
static

Definition at line 81 of file scm-type.c.

Referenced by gdbscm_initialize_types(), and gdbscm_make_field_iterator().

const struct objfile_data* tyscm_objfile_data_key
static

Definition at line 86 of file scm-type.c.

Referenced by gdbscm_initialize_types(), and tyscm_type_map().