GDB (xrefs)
Classes | Macros | Functions | Variables
/tmp/gdb-7.10/gdb/printcmd.c File Reference
#include "defs.h"
#include "frame.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "value.h"
#include "language.h"
#include "expression.h"
#include "gdbcore.h"
#include "gdbcmd.h"
#include "target.h"
#include "breakpoint.h"
#include "demangle.h"
#include "gdb-demangle.h"
#include "valprint.h"
#include "annotate.h"
#include "symfile.h"
#include "objfiles.h"
#include "completer.h"
#include "ui-out.h"
#include "block.h"
#include "disasm.h"
#include "dfp.h"
#include "observer.h"
#include "solist.h"
#include "parser-defs.h"
#include "charset.h"
#include "arch-utils.h"
#include "cli/cli-utils.h"
#include "format.h"
#include "source.h"

Go to the source code of this file.

Classes

struct  display
 

Macros

#define ALL_DISPLAYS(B)   for (B = display_chain; B; B = B->next)
 
#define ALL_DISPLAYS_SAFE(B, TMP)
 

Functions

static void show_max_symbolic_offset (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_print_symbol_filename (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
void _initialize_printcmd (void)
 
static void do_one_display (struct display *)
 
static struct format_data decode_format (const char **string_ptr, int oformat, int osize)
 
static void print_formatted (struct value *val, int size, const struct value_print_options *options, struct ui_file *stream)
 
static struct typefloat_type_from_length (struct type *type)
 
void print_scalar_formatted (const void *valaddr, struct type *type, const struct value_print_options *options, int size, struct ui_file *stream)
 
void set_next_address (struct gdbarch *gdbarch, CORE_ADDR addr)
 
int print_address_symbolic (struct gdbarch *gdbarch, CORE_ADDR addr, struct ui_file *stream, int do_demangle, char *leadin)
 
int build_address_symbolic (struct gdbarch *gdbarch, CORE_ADDR addr, int do_demangle, char **name, int *offset, char **filename, int *line, int *unmapped)
 
void print_address (struct gdbarch *gdbarch, CORE_ADDR addr, struct ui_file *stream)
 
const char * pc_prefix (CORE_ADDR addr)
 
int print_address_demangle (const struct value_print_options *opts, struct gdbarch *gdbarch, CORE_ADDR addr, struct ui_file *stream, int do_demangle)
 
static void do_examine (struct format_data fmt, struct gdbarch *gdbarch, CORE_ADDR addr)
 
static void validate_format (struct format_data fmt, const char *cmdname)
 
void print_command_parse_format (const char **expp, const char *cmdname, struct format_data *fmtp)
 
void print_value (struct value *val, const struct format_data *fmtp)
 
static void print_command_1 (const char *exp, int voidprint)
 
static void print_command (char *exp, int from_tty)
 
static void call_command (char *exp, int from_tty)
 
static void output_command (char *exp, int from_tty)
 
void output_command_const (const char *exp, int from_tty)
 
static void set_command (char *exp, int from_tty)
 
static void sym_info (char *arg, int from_tty)
 
static void address_info (char *exp, int from_tty)
 
static void x_command (char *exp, int from_tty)
 
static void display_command (char *arg, int from_tty)
 
static void free_display (struct display *d)
 
void clear_displays (void)
 
static void delete_display (struct display *display)
 
static void map_display_numbers (char *args, void(*function)(struct display *, void *), void *data)
 
static void do_delete_display (struct display *d, void *data)
 
static void undisplay_command (char *args, int from_tty)
 
void do_displays (void)
 
void disable_display (int num)
 
void disable_current_display (void)
 
static void display_info (char *ignore, int from_tty)
 
static void do_enable_disable_display (struct display *d, void *data)
 
static void enable_disable_display_command (char *args, int from_tty, int enable)
 
static void enable_display_command (char *args, int from_tty)
 
static void disable_display_command (char *args, int from_tty)
 
static void clear_dangling_display_expressions (struct objfile *objfile)
 
void print_variable_and_value (const char *name, struct symbol *var, struct frame_info *frame, struct ui_file *stream, int indent)
 
static void printf_c_string (struct ui_file *stream, const char *format, struct value *value)
 
static void printf_wide_c_string (struct ui_file *stream, const char *format, struct value *value)
 
static void printf_decfloat (struct ui_file *stream, const char *format, struct value *value)
 
static void printf_pointer (struct ui_file *stream, const char *format, struct value *value)
 
static void ui_printf (const char *arg, struct ui_file *stream)
 
static void printf_command (char *arg, int from_tty)
 
static void eval_command (char *arg, int from_tty)
 

Variables

static char last_format = 0
 
static char last_size = 'w'
 
static struct gdbarchnext_gdbarch
 
static CORE_ADDR next_address
 
static int branch_delay_insns
 
static CORE_ADDR last_examine_address
 
static struct valuelast_examine_value
 
static unsigned int max_symbolic_offset = UINT_MAX
 
static int print_symbol_filename = 0
 
static int current_display_number
 
static struct displaydisplay_chain
 
static int display_number
 

Macro Definition Documentation

#define ALL_DISPLAYS (   B)    for (B = display_chain; B; B = B->next)

Definition at line 151 of file printcmd.c.

Referenced by delete_display(), and enable_disable_display_command().

#define ALL_DISPLAYS_SAFE (   B,
  TMP 
)
Value:
for (B = display_chain; \
B ? (TMP = B->next, 1): 0; \
B = TMP)
Definition: ia64-tdep.c:83
static struct display * display_chain
Definition: printcmd.c:143

Definition at line 154 of file printcmd.c.

Referenced by map_display_numbers().

Function Documentation

void _initialize_printcmd ( void  )
static void address_info ( char *  exp,
int  from_tty 
)
static
int build_address_symbolic ( struct gdbarch gdbarch,
CORE_ADDR  addr,
int  do_demangle,
char **  name,
int offset,
char **  filename,
int line,
int unmapped 
)
static void call_command ( char *  exp,
int  from_tty 
)
static

Definition at line 1020 of file printcmd.c.

References print_command_1().

Referenced by _initialize_printcmd().

static void clear_dangling_display_expressions ( struct objfile objfile)
static
void clear_displays ( void  )

Definition at line 1567 of file printcmd.c.

References free_display(), and display::next.

Referenced by clear_symtab_users(), and undisplay_command().

static struct format_data decode_format ( const char **  string_ptr,
int  oformat,
int  osize 
)
static
static void delete_display ( struct display display)
static

Definition at line 1581 of file printcmd.c.

References ALL_DISPLAYS, free_display(), gdb_assert, and display::next.

Referenced by do_delete_display().

void disable_current_display ( void  )

Definition at line 1845 of file printcmd.c.

References _, current_display_number, disable_display(), fprintf_unfiltered(), and gdb_stderr.

Referenced by normal_stop().

void disable_display ( int  num)

Definition at line 1831 of file printcmd.c.

References _, display::enabled_p, display::next, display::number, and printf_unfiltered().

Referenced by disable_current_display().

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

Definition at line 1923 of file printcmd.c.

References enable_disable_display_command().

Referenced by _initialize_printcmd().

static void display_command ( char *  arg,
int  from_tty 
)
static
static void display_info ( char *  ignore,
int  from_tty 
)
static
static void do_delete_display ( struct display d,
void *  data 
)
static

Definition at line 1642 of file printcmd.c.

References delete_display().

Referenced by undisplay_command().

void do_displays ( void  )

Definition at line 1819 of file printcmd.c.

References do_one_display(), and display::next.

Referenced by display_command(), print_stop_event(), and tfind_1().

static void do_enable_disable_display ( struct display d,
void *  data 
)
static

Definition at line 1889 of file printcmd.c.

References display::enabled_p.

Referenced by enable_disable_display_command().

static void do_examine ( struct format_data  fmt,
struct gdbarch gdbarch,
CORE_ADDR  addr 
)
static
static void do_one_display ( struct display d)
static
static void enable_disable_display_command ( char *  args,
int  from_tty,
int  enable 
)
static
static void enable_display_command ( char *  args,
int  from_tty 
)
static

Definition at line 1915 of file printcmd.c.

References enable_disable_display_command().

Referenced by _initialize_printcmd().

static void eval_command ( char *  arg,
int  from_tty 
)
static
static struct type* float_type_from_length ( struct type type)
static
static void free_display ( struct display d)
static

Definition at line 1556 of file printcmd.c.

References display::exp, display::exp_string, and xfree().

Referenced by clear_displays(), and delete_display().

static void map_display_numbers ( char *  args,
void(*)(struct display *, void *)  function,
void *  data 
)
static
static void output_command ( char *  exp,
int  from_tty 
)
static

Definition at line 1028 of file printcmd.c.

References output_command_const().

Referenced by _initialize_printcmd().

void output_command_const ( const char *  exp,
int  from_tty 
)
const char* pc_prefix ( CORE_ADDR  addr)

Definition at line 752 of file printcmd.c.

References get_frame_pc_if_available(), get_selected_frame(), and has_stack_frames().

Referenced by do_examine(), and dump_insns().

void print_address ( struct gdbarch gdbarch,
CORE_ADDR  addr,
struct ui_file stream 
)
int print_address_demangle ( const struct value_print_options opts,
struct gdbarch gdbarch,
CORE_ADDR  addr,
struct ui_file stream,
int  do_demangle 
)
int print_address_symbolic ( struct gdbarch gdbarch,
CORE_ADDR  addr,
struct ui_file stream,
int  do_demangle,
char *  leadin 
)
static void print_command ( char *  exp,
int  from_tty 
)
static

Definition at line 1013 of file printcmd.c.

References print_command_1().

Referenced by _initialize_printcmd().

static void print_command_1 ( const char *  exp,
int  voidprint 
)
static
void print_command_parse_format ( const char **  expp,
const char *  cmdname,
struct format_data fmtp 
)
static void print_formatted ( struct value val,
int  size,
const struct value_print_options options,
struct ui_file stream 
)
static
void print_scalar_formatted ( const void *  valaddr,
struct type type,
const struct value_print_options options,
int  size,
struct ui_file stream 
)
void print_value ( struct value val,
const struct format_data fmtp 
)
void print_variable_and_value ( const char *  name,
struct symbol var,
struct frame_info frame,
struct ui_file stream,
int  indent 
)
static void printf_c_string ( struct ui_file stream,
const char *  format,
struct value value 
)
static

Definition at line 2015 of file printcmd.c.

References fprintf_filtered(), QUIT, read_memory(), and value_as_address().

Referenced by ui_printf().

static void printf_command ( char *  arg,
int  from_tty 
)
static

Definition at line 2458 of file printcmd.c.

References gdb_flush(), gdb_stdout, and ui_printf().

Referenced by _initialize_printcmd().

static void printf_decfloat ( struct ui_file stream,
const char *  format,
struct value value 
)
static
static void printf_pointer ( struct ui_file stream,
const char *  format,
struct value value 
)
static

Definition at line 2183 of file printcmd.c.

References fprintf_filtered(), gdb_assert, and value_as_long().

Referenced by ui_printf().

static void printf_wide_c_string ( struct ui_file stream,
const char *  format,
struct value value 
)
static
static void set_command ( char *  exp,
int  from_tty 
)
static
void set_next_address ( struct gdbarch gdbarch,
CORE_ADDR  addr 
)
static void show_max_symbolic_offset ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static

Definition at line 86 of file printcmd.c.

References _, and fprintf_filtered().

Referenced by _initialize_printcmd().

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

Definition at line 99 of file printcmd.c.

References _, and fprintf_filtered().

Referenced by _initialize_printcmd().

static void sym_info ( char *  arg,
int  from_tty 
)
static
static void ui_printf ( const char *  arg,
struct ui_file stream 
)
static
static void undisplay_command ( char *  args,
int  from_tty 
)
static
static void validate_format ( struct format_data  fmt,
const char *  cmdname 
)
static
static void x_command ( char *  exp,
int  from_tty 
)
static

Variable Documentation

int branch_delay_insns
static

Definition at line 70 of file printcmd.c.

Referenced by do_examine(), and print_formatted().

int current_display_number
static

Definition at line 111 of file printcmd.c.

Referenced by _initialize_printcmd(), disable_current_display(), and do_one_display().

struct display* display_chain
static

Definition at line 143 of file printcmd.c.

Referenced by display_command().

int display_number
static

Definition at line 145 of file printcmd.c.

Referenced by display_command().

CORE_ADDR last_examine_address
static

Definition at line 74 of file printcmd.c.

Referenced by do_examine(), and x_command().

struct value* last_examine_value
static

Definition at line 79 of file printcmd.c.

char last_format = 0
static

Definition at line 57 of file printcmd.c.

Referenced by print_command_parse_format(), and x_command().

char last_size = 'w'
static

Definition at line 61 of file printcmd.c.

Referenced by x_command().

unsigned int max_symbolic_offset = UINT_MAX
static

Definition at line 84 of file printcmd.c.

Referenced by _initialize_printcmd(), and build_address_symbolic().

CORE_ADDR next_address
static

Definition at line 66 of file printcmd.c.

Referenced by do_examine(), print_formatted(), set_next_address(), and x_command().

struct gdbarch* next_gdbarch
static

Definition at line 65 of file printcmd.c.

int print_symbol_filename = 0
static

Definition at line 97 of file printcmd.c.

Referenced by _initialize_printcmd(), build_address_symbolic(), and print_address_symbolic().