GDB (xrefs)
Classes | Functions | Variables
/home/stan/gdb/src/gdb/typeprint.c File Reference
#include "defs.h"
#include "gdb_obstack.h"
#include "bfd.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
#include "value.h"
#include "gdbcore.h"
#include "command.h"
#include "gdbcmd.h"
#include "target.h"
#include "language.h"
#include "cp-abi.h"
#include "typeprint.h"
#include "gdb_string.h"
#include "exceptions.h"
#include "valprint.h"
#include <errno.h>
#include <ctype.h>
#include "cli/cli-utils.h"
#include "python/python.h"
#include "completer.h"

Go to the source code of this file.

Classes

struct  typedef_hash_table

Functions

void _initialize_typeprint (void)
static void ptype_command (char *, int)
static void whatis_command (char *, int)
static void whatis_exp (char *, int)
static hashval_t hash_typedef_field (const void *p)
static int eq_typedef_field (const void *a, const void *b)
void recursively_update_typedef_hash (struct typedef_hash_table *table, struct type *t)
void add_template_parameters (struct typedef_hash_table *table, struct type *t)
struct typedef_hash_tablecreate_typedef_hash (void)
void free_typedef_hash (struct typedef_hash_table *table)
static void do_free_typedef_hash (void *arg)
struct cleanupmake_cleanup_free_typedef_hash (struct typedef_hash_table *table)
static int copy_typedef_hash_element (void **slot, void *nt)
struct typedef_hash_tablecopy_typedef_hash (struct typedef_hash_table *table)
static void do_free_global_table (void *arg)
static struct cleanupcreate_global_typedef_table (struct type_print_options *flags)
static const char * find_global_typedef (const struct type_print_options *flags, struct type *t)
const char * find_typedef_in_hash (const struct type_print_options *flags, struct type *t)
void typedef_print (struct type *type, struct symbol *new, struct ui_file *stream)
void default_print_typedef (struct type *type, struct symbol *new_symbol, struct ui_file *stream)
void type_print (struct type *type, const char *varstring, struct ui_file *stream, int show)
char * type_to_string (struct type *type)
void print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
void maintenance_print_type (char *typename, int from_tty)
static void set_print_type (char *arg, int from_tty)
static void show_print_type (char *args, int from_tty)
static void set_print_type_methods (char *args, int from_tty, struct cmd_list_element *c)
static void show_print_type_methods (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void set_print_type_typedefs (char *args, int from_tty, struct cmd_list_element *c)
static void show_print_type_typedefs (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)

Variables

struct type_print_options type_print_raw_options
static struct type_print_options default_ptype_flags
struct cmd_list_elementsetprinttypelist
struct cmd_list_elementshowprinttypelist
static int print_methods = 1
static int print_typedefs = 1

Function Documentation

void _initialize_typeprint ( void  )
void add_template_parameters ( struct typedef_hash_table table,
struct type t 
)
struct typedef_hash_table* copy_typedef_hash ( struct typedef_hash_table table) [read]
static int copy_typedef_hash_element ( void **  slot,
void *  nt 
) [static]

Definition at line 215 of file typeprint.c.

Referenced by copy_typedef_hash().

static struct cleanup* create_global_typedef_table ( struct type_print_options flags) [static, read]
struct typedef_hash_table* create_typedef_hash ( void  ) [read]
void default_print_typedef ( struct type type,
struct symbol new_symbol,
struct ui_file stream 
)

Definition at line 349 of file typeprint.c.

References _, and error().

static void do_free_global_table ( void *  arg) [static]
static void do_free_typedef_hash ( void *  arg) [static]

Definition at line 199 of file typeprint.c.

References free_typedef_hash().

Referenced by make_cleanup_free_typedef_hash().

static int eq_typedef_field ( const void *  a,
const void *  b 
) [static]

Definition at line 102 of file typeprint.c.

References types_equal().

Referenced by create_typedef_hash().

static const char* find_global_typedef ( const struct type_print_options flags,
struct type t 
) [static]
const char* find_typedef_in_hash ( const struct type_print_options flags,
struct type t 
)
void free_typedef_hash ( struct typedef_hash_table table)
static hashval_t hash_typedef_field ( const void *  p) [static]

Definition at line 91 of file typeprint.c.

References check_typedef(), and TYPE_SAFE_NAME.

Referenced by create_typedef_hash().

void maintenance_print_type ( char *  typename,
int  from_tty 
)
struct cleanup* make_cleanup_free_typedef_hash ( struct typedef_hash_table table) [read]

Definition at line 207 of file typeprint.c.

References do_free_typedef_hash(), and make_cleanup().

Referenced by c_type_print_base().

void print_type_scalar ( struct type type,
LONGEST  val,
struct ui_file stream 
)
static void ptype_command ( char *  typename,
int  from_tty 
) [static]

Definition at line 505 of file typeprint.c.

References whatis_exp().

void recursively_update_typedef_hash ( struct typedef_hash_table table,
struct type t 
)
static void set_print_type ( char *  arg,
int  from_tty 
) [static]

Definition at line 635 of file typeprint.c.

References gdb_stdout, help_list(), printf_unfiltered(), and setprintlist.

static void set_print_type_methods ( char *  args,
int  from_tty,
struct cmd_list_element c 
) [static]

Definition at line 651 of file typeprint.c.

References type_print_options::print_methods, and print_methods.

static void set_print_type_typedefs ( char *  args,
int  from_tty,
struct cmd_list_element c 
) [static]

Definition at line 667 of file typeprint.c.

References type_print_options::print_typedefs, and print_typedefs.

static void show_print_type ( char *  args,
int  from_tty 
) [static]

Definition at line 643 of file typeprint.c.

References cmd_show_list().

static void show_print_type_methods ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
) [static]

Definition at line 657 of file typeprint.c.

References _, and fprintf_filtered().

static void show_print_type_typedefs ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
) [static]

Definition at line 673 of file typeprint.c.

References _, and fprintf_filtered().

void type_print ( struct type type,
const char *  varstring,
struct ui_file stream,
int  show 
)
char* type_to_string ( struct type type)
void typedef_print ( struct type type,
struct symbol new,
struct ui_file stream 
)

Definition at line 341 of file typeprint.c.

References LA_PRINT_TYPEDEF.

Referenced by print_symbol_info().

static void whatis_command ( char *  exp,
int  from_tty 
) [static]

Definition at line 494 of file typeprint.c.

References whatis_exp().

static void whatis_exp ( char *  exp,
int  show 
) [static]

Variable Documentation

Initial value:
{
  0,                            
  1,                            
  1,                            
  NULL,                         
  NULL,                         
  NULL                          
}

Definition at line 63 of file typeprint.c.

Referenced by whatis_exp().

int print_methods = 1 [static]

Definition at line 648 of file typeprint.c.

Referenced by set_print_type_methods().

int print_typedefs = 1 [static]

Definition at line 664 of file typeprint.c.

Referenced by set_print_type_typedefs().

Definition at line 630 of file typeprint.c.

Definition at line 632 of file typeprint.c.

Initial value:
{
  1,                            
  1,                            
  1,                            
  NULL,                         
  NULL,                         
  NULL                          
}

Definition at line 51 of file typeprint.c.

Referenced by ada_print_subexp(), ada_print_typedef(), cp_print_class_member(), dwarf2_compute_name(), gnuv3_print_method_ptr(), print_symbol(), typy_str(), and user_select_syms().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines