GDB (xrefs)
Classes | Functions | Variables
/tmp/gdb-7.10/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 "valprint.h"
#include <ctype.h>
#include "cli/cli-utils.h"
#include "extension.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 *newobj, 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 *type_name, 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

const 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)
static int copy_typedef_hash_element ( void **  slot,
void *  nt 
)
static

Definition at line 212 of file typeprint.c.

Referenced by copy_typedef_hash().

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

Definition at line 346 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 196 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 99 of file typeprint.c.

References typedef_field::type, and 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 88 of file typeprint.c.

References check_typedef(), typedef_field::type, and TYPE_SAFE_NAME.

Referenced by create_typedef_hash().

void maintenance_print_type ( char *  type_name,
int  from_tty 
)
struct cleanup* make_cleanup_free_typedef_hash ( struct typedef_hash_table table)

Definition at line 204 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 *  type_name,
int  from_tty 
)
static

Definition at line 504 of file typeprint.c.

References whatis_exp().

Referenced by _initialize_typeprint().

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 634 of file typeprint.c.

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

Referenced by _initialize_typeprint().

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

Definition at line 650 of file typeprint.c.

References type_print_options::print_methods, and print_methods.

Referenced by _initialize_typeprint().

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

Definition at line 666 of file typeprint.c.

References type_print_options::print_typedefs, and print_typedefs.

Referenced by _initialize_typeprint().

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

Definition at line 642 of file typeprint.c.

References cmd_show_list().

Referenced by _initialize_typeprint().

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 656 of file typeprint.c.

References _, and fprintf_filtered().

Referenced by _initialize_typeprint().

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 672 of file typeprint.c.

References _, and fprintf_filtered().

Referenced by _initialize_typeprint().

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 newobj,
struct ui_file stream 
)

Definition at line 338 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 493 of file typeprint.c.

References whatis_exp().

Referenced by _initialize_typeprint().

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

Variable Documentation

struct type_print_options default_ptype_flags
static
Initial value:
=
{
0,
1,
1,
NULL,
NULL,
NULL
}

Definition at line 60 of file typeprint.c.

Referenced by whatis_exp().

int print_methods = 1
static

Definition at line 647 of file typeprint.c.

Referenced by _initialize_typeprint(), and set_print_type_methods().

int print_typedefs = 1
static

Definition at line 663 of file typeprint.c.

Referenced by _initialize_typeprint(), and set_print_type_typedefs().

struct cmd_list_element* setprinttypelist

Definition at line 629 of file typeprint.c.

struct cmd_list_element* showprinttypelist

Definition at line 631 of file typeprint.c.

const struct type_print_options type_print_raw_options