GDB (xrefs)
Loading...
Searching...
No Matches
Functions | Variables
typeprint.c File Reference
#include "defs.h"
#include "gdbsupport/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"
#include "cli/cli-style.h"

Go to the source code of this file.

Functions

static hashval_t hash_typedef_field (const void *p)
 
static int eq_typedef_field (const void *a, const void *b)
 
static int copy_typedef_hash_element (void **slot, void *nt)
 
void typedef_print (struct type *type, struct symbol *newobj, struct ui_file *stream)
 
void type_print (struct type *type, const char *varstring, struct ui_file *stream, int show)
 
std::string type_to_string (struct type *type)
 
void type_print_unknown_return_type (struct ui_file *stream)
 
void error_unknown_type (const char *sym_print_name)
 
static void whatis_exp (const char *exp, int show)
 
static void whatis_command (const char *exp, int from_tty)
 
static void ptype_command (const char *type_name, int from_tty)
 
void print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
 
void print_type_fixed_point (struct type *type, struct ui_file *stream)
 
void maintenance_print_type (const char *type_name, int from_tty)
 
static void set_print_type_methods (const 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 (const 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)
 
static void set_print_type_nested_types (const char *args, int from_tty, struct cmd_list_element *c)
 
static void show_print_type_nested_types (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void set_print_offsets_and_sizes_in_hex (const char *args, int from_tty, struct cmd_list_element *c)
 
static void show_print_offsets_and_sizes_in_hex (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
void _initialize_typeprint ()
 
void val_print_not_allocated (struct ui_file *stream)
 
void val_print_not_associated (struct ui_file *stream)
 

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 bool print_methods = true
 
static bool print_typedefs = true
 
static int print_nested_type_limit = 0
 
static bool print_offsets_and_sizes_in_hex = false
 

Function Documentation

◆ _initialize_typeprint()

void _initialize_typeprint ( )

Definition at line 824 of file typeprint.c.

Referenced by initialize_all_files().

◆ copy_typedef_hash_element()

static int copy_typedef_hash_element ( void ** slot,
void * nt )
static

Definition at line 281 of file typeprint.c.

Referenced by typedef_hash_table::typedef_hash_table().

◆ eq_typedef_field()

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

Definition at line 211 of file typeprint.c.

References decl_field::type, and types_equal().

Referenced by typedef_hash_table::typedef_hash_table().

◆ error_unknown_type()

void error_unknown_type ( const char * sym_print_name)

◆ hash_typedef_field()

static hashval_t hash_typedef_field ( const void * p)
static

Definition at line 201 of file typeprint.c.

References decl_field::type, and TYPE_SAFE_NAME.

Referenced by typedef_hash_table::typedef_hash_table().

◆ maintenance_print_type()

void maintenance_print_type ( const char * type_name,
int from_tty )

Definition at line 706 of file typeprint.c.

References parse_expression(), recursive_dump_type(), and value::type().

◆ print_type_fixed_point()

void print_type_fixed_point ( struct type * type,
struct ui_file * stream )

◆ print_type_scalar()

void print_type_scalar ( struct type * type,
LONGEST val,
struct ui_file * stream )

◆ ptype_command()

static void ptype_command ( const char * type_name,
int from_tty )
static

Definition at line 598 of file typeprint.c.

References whatis_exp().

◆ set_print_offsets_and_sizes_in_hex()

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

◆ set_print_type_methods()

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

◆ set_print_type_nested_types()

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

◆ set_print_type_typedefs()

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

◆ show_print_offsets_and_sizes_in_hex()

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

Definition at line 813 of file typeprint.c.

References gdb_printf().

◆ show_print_type_methods()

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

References gdb_printf().

◆ show_print_type_nested_types()

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

Definition at line 777 of file typeprint.c.

References gdb_printf().

◆ show_print_type_typedefs()

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

References gdb_printf().

◆ type_print()

void type_print ( struct type * type,
const char * varstring,
struct ui_file * stream,
int show )

◆ type_print_unknown_return_type()

void type_print_unknown_return_type ( struct ui_file * stream)

◆ type_to_string()

std::string type_to_string ( struct type * type)

◆ typedef_print()

void typedef_print ( struct type * type,
struct symbol * newobj,
struct ui_file * stream )

Definition at line 375 of file typeprint.c.

References current_language, and language_defn::print_typedef().

Referenced by symbol_to_info_string().

◆ val_print_not_allocated()

void val_print_not_allocated ( struct ui_file * stream)

◆ val_print_not_associated()

void val_print_not_associated ( struct ui_file * stream)

◆ whatis_command()

static void whatis_command ( const char * exp,
int from_tty )
static

Definition at line 587 of file typeprint.c.

References whatis_exp().

◆ whatis_exp()

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

Variable Documentation

◆ default_ptype_flags

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

Definition at line 56 of file typeprint.c.

Referenced by set_print_offsets_and_sizes_in_hex(), set_print_type_methods(), set_print_type_nested_types(), set_print_type_typedefs(), type_print(), and whatis_exp().

◆ print_methods

bool print_methods = true
static

Definition at line 724 of file typeprint.c.

Referenced by set_print_type_methods().

◆ print_nested_type_limit

int print_nested_type_limit = 0
static

Definition at line 762 of file typeprint.c.

Referenced by set_print_type_nested_types().

◆ print_offsets_and_sizes_in_hex

bool print_offsets_and_sizes_in_hex = false
static

Definition at line 797 of file typeprint.c.

Referenced by set_print_offsets_and_sizes_in_hex().

◆ print_typedefs

bool print_typedefs = true
static

Definition at line 741 of file typeprint.c.

Referenced by set_print_type_typedefs().

◆ setprinttypelist

struct cmd_list_element* setprinttypelist

Definition at line 720 of file typeprint.c.

◆ showprinttypelist

struct cmd_list_element* showprinttypelist

Definition at line 722 of file typeprint.c.

◆ type_print_raw_options

const struct type_print_options type_print_raw_options