GDB (xrefs)
Classes | Defines | Functions | Variables
/home/stan/gdb/src/gdb/printcmd.c File Reference
#include "defs.h"
#include "gdb_string.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 "gdb_assert.h"
#include "block.h"
#include "disasm.h"
#include "dfp.h"
#include "exceptions.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  format_data
struct  display

Defines

#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, char *cmdname)
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 so_list *solib)
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

Define Documentation

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

Definition at line 166 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 at line 169 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 1023 of file printcmd.c.

References print_command_1().

static void clear_dangling_display_expressions ( struct so_list solib) [static]
void clear_displays ( void  )

Definition at line 1578 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, read]
static void delete_display ( struct display display) [static]

Definition at line 1592 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 1851 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 1837 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 1929 of file printcmd.c.

References enable_disable_display_command().

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 1653 of file printcmd.c.

References delete_display().

Referenced by undisplay_command().

void do_displays ( void  )

Definition at line 1825 of file printcmd.c.

References do_one_display(), and display::next.

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

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

Definition at line 1895 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 1921 of file printcmd.c.

References enable_disable_display_command().

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

Definition at line 1567 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 1031 of file printcmd.c.

References output_command_const().

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

Definition at line 767 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 1016 of file printcmd.c.

References print_command_1().

static void print_command_1 ( const char *  exp,
int  voidprint 
) [static]
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_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_stdout, and ui_printf().

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, p, 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 101 of file printcmd.c.

References _, and fprintf_filtered().

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 114 of file printcmd.c.

References _, and fprintf_filtered().

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,
char *  cmdname 
) [static]

Definition at line 934 of file printcmd.c.

References _, format_data::count, error(), format_data::format, and format_data::size.

Referenced by output_command_const(), and print_command_1().

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

Variable Documentation

Definition at line 85 of file printcmd.c.

Referenced by do_examine(), and print_formatted().

Definition at line 126 of file printcmd.c.

Referenced by disable_current_display(), and do_one_display().

struct display* display_chain [static]

Definition at line 158 of file printcmd.c.

Referenced by display_command().

int display_number [static]

Definition at line 160 of file printcmd.c.

Referenced by display_command().

Definition at line 89 of file printcmd.c.

Referenced by do_examine(), and x_command().

struct value* last_examine_value [static]

Definition at line 94 of file printcmd.c.

char last_format = 0 [static]

Definition at line 72 of file printcmd.c.

Referenced by print_command_1(), and x_command().

char last_size = 'w' [static]

Definition at line 76 of file printcmd.c.

Referenced by x_command().

unsigned int max_symbolic_offset = UINT_MAX [static]

Definition at line 99 of file printcmd.c.

Referenced by build_address_symbolic().

Definition at line 81 of file printcmd.c.

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

struct gdbarch* next_gdbarch [static]

Definition at line 80 of file printcmd.c.

int print_symbol_filename = 0 [static]

Definition at line 112 of file printcmd.c.

Referenced by build_address_symbolic(), and print_address_symbolic().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines