GDB (xrefs)
Classes | Functions | Variables
/home/stan/gdb/src/gdb/stack.c File Reference
#include "defs.h"
#include "value.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
#include "language.h"
#include "frame.h"
#include "gdbcmd.h"
#include "gdbcore.h"
#include "target.h"
#include "source.h"
#include "breakpoint.h"
#include "demangle.h"
#include "inferior.h"
#include "annotate.h"
#include "ui-out.h"
#include "block.h"
#include "stack.h"
#include "dictionary.h"
#include "exceptions.h"
#include "reggroups.h"
#include "regcache.h"
#include "solib.h"
#include "valprint.h"
#include "gdbthread.h"
#include "cp-support.h"
#include "disasm.h"
#include "inline-frame.h"
#include "linespec.h"
#include "cli/cli-utils.h"
#include "gdb_assert.h"
#include <ctype.h>
#include "gdb_string.h"
#include "symfile.h"
#include "python/python.h"

Go to the source code of this file.

Classes

struct  print_variable_and_value_data
struct  function_bounds

Functions

static void print_frame_local_vars (struct frame_info *, int, struct ui_file *)
static void print_frame (struct frame_info *frame, int print_level, enum print_what print_what, int print_args, struct symtab_and_line sal)
static void set_last_displayed_sal (int valid, struct program_space *pspace, CORE_ADDR addr, struct symtab *symtab, int line)
static int frame_show_address (struct frame_info *frame, struct symtab_and_line sal)
void print_stack_frame (struct frame_info *frame, int print_level, enum print_what print_what, int set_current_sal)
static void print_frame_nameless_args (struct frame_info *frame, long start, int num, int first, struct ui_file *stream)
static void print_frame_arg (const struct frame_arg *arg)
void read_frame_local (struct symbol *sym, struct frame_info *frame, struct frame_arg *argp)
void read_frame_arg (struct symbol *sym, struct frame_info *frame, struct frame_arg *argp, struct frame_arg *entryargp)
static void print_frame_args (struct symbol *func, struct frame_info *frame, int num, struct ui_file *stream)
void set_current_sal_from_frame (struct frame_info *frame, int center)
static void show_disassemble_next_line (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void do_gdb_disassembly (struct gdbarch *gdbarch, int how_many, CORE_ADDR low, CORE_ADDR high)
void print_frame_info (struct frame_info *frame, int print_level, enum print_what print_what, int print_args, int set_current_sal)
void clear_last_displayed_sal (void)
int last_displayed_sal_is_valid (void)
struct program_spaceget_last_displayed_pspace (void)
CORE_ADDR get_last_displayed_addr (void)
struct symtabget_last_displayed_symtab (void)
int get_last_displayed_line (void)
void get_last_displayed_sal (struct symtab_and_line *sal)
void find_frame_funname (struct frame_info *frame, char **funname, enum language *funlang, struct symbol **funcp)
static void print_frame (struct frame_info *frame, int print_level, enum print_what print_what, int print_args, struct symtab_and_line sal)
static struct frame_infoparse_frame_specification_1 (const char *frame_exp, const char *message, int *selected_frame_p)
static struct frame_infoparse_frame_specification (char *frame_exp)
static void frame_info (char *addr_exp, int from_tty)
static void backtrace_command_1 (char *count_exp, int show_locals, int no_filters, int from_tty)
static void backtrace_command (char *arg, int from_tty)
static void backtrace_full_command (char *arg, int from_tty)
static void iterate_over_block_locals (struct block *b, iterate_over_block_arg_local_vars_cb cb, void *cb_data)
void iterate_over_block_local_vars (struct block *block, iterate_over_block_arg_local_vars_cb cb, void *cb_data)
static void do_print_variable_and_value (const char *print_name, struct symbol *sym, void *cb_data)
void locals_info (char *args, int from_tty)
void iterate_over_block_arg_vars (struct block *b, iterate_over_block_arg_local_vars_cb cb, void *cb_data)
static void print_frame_arg_vars (struct frame_info *frame, struct ui_file *stream)
void args_info (char *ignore, int from_tty)
static void args_plus_locals_info (char *ignore, int from_tty)
static void select_and_print_frame (struct frame_info *frame)
struct blockget_selected_block (CORE_ADDR *addr_in_block)
struct frame_infofind_relative_frame (struct frame_info *frame, int *level_offset_ptr)
void select_frame_command (char *level_exp, int from_tty)
static void frame_command (char *level_exp, int from_tty)
static void current_frame_command (char *level_exp, int from_tty)
static void up_silently_base (char *count_exp)
static void up_silently_command (char *count_exp, int from_tty)
static void up_command (char *count_exp, int from_tty)
static void down_silently_base (char *count_exp)
static void down_silently_command (char *count_exp, int from_tty)
static void down_command (char *count_exp, int from_tty)
void return_command (char *retval_exp, int from_tty)
static void func_command (char *arg, int from_tty)
enum language get_frame_language (void)
void _initialize_stack (void)

Variables

void(* deprecated_selected_frame_level_changed_hook )(int)
static const char *const print_frame_arguments_choices []
static const char * print_frame_arguments = "scalars"
static int print_raw_frame_arguments
const char print_entry_values_no [] = "no"
const char print_entry_values_only [] = "only"
const char print_entry_values_preferred [] = "preferred"
const char print_entry_values_if_needed [] = "if-needed"
const char print_entry_values_both [] = "both"
const char print_entry_values_compact [] = "compact"
const char print_entry_values_default [] = "default"
static const char *const print_entry_values_choices []
const char * print_entry_values = print_entry_values_default
int annotation_level = 0
static int last_displayed_sal_valid = 0
static struct program_spacelast_displayed_pspace = 0
static CORE_ADDR last_displayed_addr = 0
static struct symtablast_displayed_symtab = 0
static int last_displayed_line = 0
static enum auto_boolean disassemble_next_line

Function Documentation

void _initialize_stack ( void  )
void args_info ( char *  ignore,
int  from_tty 
)

Definition at line 2169 of file stack.c.

References _, gdb_stdout, get_selected_frame(), and print_frame_arg_vars().

Referenced by args_plus_locals_info(), and trace_dump_actions().

static void args_plus_locals_info ( char *  ignore,
int  from_tty 
) [static]

Definition at line 2177 of file stack.c.

References args_info(), and locals_info().

static void backtrace_command ( char *  arg,
int  from_tty 
) [static]
static void backtrace_command_1 ( char *  count_exp,
int  show_locals,
int  no_filters,
int  from_tty 
) [static]
static void backtrace_full_command ( char *  arg,
int  from_tty 
) [static]

Definition at line 1898 of file stack.c.

References backtrace_command_1().

void clear_last_displayed_sal ( void  )
static void current_frame_command ( char *  level_exp,
int  from_tty 
) [static]

Definition at line 2275 of file stack.c.

References _, get_selected_frame(), print_stack_frame(), and SRC_AND_LOC.

static void do_gdb_disassembly ( struct gdbarch gdbarch,
int  how_many,
CORE_ADDR  low,
CORE_ADDR  high 
) [static]
static void do_print_variable_and_value ( const char *  print_name,
struct symbol sym,
void *  cb_data 
) [static]
static void down_command ( char *  count_exp,
int  from_tty 
) [static]

Definition at line 2344 of file stack.c.

References down_silently_base(), get_selected_frame(), print_stack_frame(), and SRC_AND_LOC.

static void down_silently_base ( char *  count_exp) [static]
static void down_silently_command ( char *  count_exp,
int  from_tty 
) [static]

Definition at line 2338 of file stack.c.

References down_silently_base().

void find_frame_funname ( struct frame_info frame,
char **  funname,
enum language funlang,
struct symbol **  funcp 
)
struct frame_info* find_relative_frame ( struct frame_info frame,
int level_offset_ptr 
) [read]
static void frame_command ( char *  level_exp,
int  from_tty 
) [static]

Definition at line 2266 of file stack.c.

References get_selected_frame(), print_stack_frame(), select_frame_command(), and SRC_AND_LOC.

Referenced by return_command().

static void frame_info ( char *  addr_exp,
int  from_tty 
) [static]
static int frame_show_address ( struct frame_info frame,
struct symtab_and_line  sal 
) [static]
static void func_command ( char *  arg,
int  from_tty 
) [static]
enum language get_frame_language ( void  )

Definition at line 984 of file stack.c.

References last_displayed_addr, and last_displayed_sal_valid.

Referenced by skip_function_command().

struct program_space* get_last_displayed_pspace ( void  ) [read]

Definition at line 974 of file stack.c.

References last_displayed_pspace, and last_displayed_sal_valid.

void get_last_displayed_sal ( struct symtab_and_line sal)
struct symtab* get_last_displayed_symtab ( void  ) [read]
struct block* get_selected_block ( CORE_ADDR addr_in_block) [read]
void iterate_over_block_arg_vars ( struct block b,
iterate_over_block_arg_local_vars_cb  cb,
void *  cb_data 
)
void iterate_over_block_local_vars ( struct block block,
iterate_over_block_arg_local_vars_cb  cb,
void *  cb_data 
)

Definition at line 1991 of file stack.c.

References BLOCK_FUNCTION, BLOCK_SUPERBLOCK, and iterate_over_block_locals().

Referenced by add_local_symbols(), and print_frame_local_vars().

static void iterate_over_block_locals ( struct block b,
iterate_over_block_arg_local_vars_cb  cb,
void *  cb_data 
) [static]
void locals_info ( char *  args,
int  from_tty 
)

Definition at line 2087 of file stack.c.

References _, gdb_stdout, get_selected_frame(), and print_frame_local_vars().

Referenced by args_plus_locals_info(), and trace_dump_actions().

static struct frame_info* parse_frame_specification ( char *  frame_exp) [static, read]

Definition at line 1385 of file stack.c.

References parse_frame_specification_1().

Referenced by func_command().

static struct frame_info* parse_frame_specification_1 ( const char *  frame_exp,
const char *  message,
int selected_frame_p 
) [static, read]
static void print_frame ( struct frame_info frame,
int  print_level,
enum print_what  print_what,
int  print_args,
struct symtab_and_line  sal 
) [static]

Referenced by print_frame_info().

static void print_frame ( struct frame_info frame,
int  print_level,
enum print_what  print_what,
int  print_args,
struct symtab_and_line  sal 
) [static]
static void print_frame_arg ( const struct frame_arg arg) [static]
static void print_frame_arg_vars ( struct frame_info frame,
struct ui_file stream 
) [static]
static void print_frame_args ( struct symbol func,
struct frame_info frame,
int  num,
struct ui_file stream 
) [static]
void print_frame_info ( struct frame_info frame,
int  print_level,
enum print_what print_what  ,
int  print_args,
int  set_current_sal 
)
static void print_frame_local_vars ( struct frame_info frame,
int  num_tabs,
struct ui_file stream 
) [static]
static void print_frame_nameless_args ( struct frame_info frame,
long  start,
int  num,
int  first,
struct ui_file stream 
) [static]
void print_stack_frame ( struct frame_info frame,
int  print_level,
enum print_what print_what  ,
int  set_current_sal 
)
void read_frame_arg ( struct symbol sym,
struct frame_info frame,
struct frame_arg argp,
struct frame_arg entryargp 
)
void read_frame_local ( struct symbol sym,
struct frame_info frame,
struct frame_arg argp 
)
void return_command ( char *  retval_exp,
int  from_tty 
)
static void select_and_print_frame ( struct frame_info frame) [static]

Definition at line 2187 of file stack.c.

References print_stack_frame(), select_frame(), and SRC_AND_LOC.

Referenced by func_command().

void select_frame_command ( char *  level_exp,
int  from_tty 
)
void set_current_sal_from_frame ( struct frame_info frame,
int  center 
)
static void set_last_displayed_sal ( int  valid,
struct program_space pspace,
CORE_ADDR  addr,
struct symtab symtab,
int  line 
) [static]
static void show_disassemble_next_line ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
) [static]

Definition at line 740 of file stack.c.

References _, and fprintf_filtered().

static void up_command ( char *  count_exp,
int  from_tty 
) [static]

Definition at line 2305 of file stack.c.

References get_selected_frame(), print_stack_frame(), SRC_AND_LOC, and up_silently_base().

static void up_silently_base ( char *  count_exp) [static]
static void up_silently_command ( char *  count_exp,
int  from_tty 
) [static]

Definition at line 2299 of file stack.c.

References up_silently_base().


Variable Documentation

Definition at line 114 of file stack.c.

Referenced by annotate_arg_begin(), annotate_arg_end(), annotate_arg_name_end(), annotate_arg_value(), annotate_array_section_begin(), annotate_array_section_end(), annotate_breakpoint(), annotate_breakpoints_headers(), annotate_breakpoints_invalid(), annotate_breakpoints_table(), annotate_breakpoints_table_end(), annotate_catchpoint(), annotate_display_begin(), annotate_display_end(), annotate_display_expression(), annotate_display_expression_end(), annotate_display_format(), annotate_display_number_end(), annotate_display_value(), annotate_elt(), annotate_elt_rep(), annotate_elt_rep_end(), annotate_error(), annotate_error_begin(), annotate_exited(), annotate_field(), annotate_field_begin(), annotate_field_end(), annotate_field_name_end(), annotate_field_value(), annotate_frame_address(), annotate_frame_address_end(), annotate_frame_args(), annotate_frame_begin(), annotate_frame_end(), annotate_frame_function_name(), annotate_frame_source_begin(), annotate_frame_source_end(), annotate_frame_source_file(), annotate_frame_source_file_end(), annotate_frame_source_line(), annotate_frame_where(), annotate_frames_invalid(), annotate_function_call(), annotate_new_thread(), annotate_quit(), annotate_record(), annotate_signal(), annotate_signal_handler_caller(), annotate_signal_name(), annotate_signal_name_end(), annotate_signal_string(), annotate_signal_string_end(), annotate_signalled(), annotate_source(), annotate_starting(), annotate_stopped(), annotate_thread_changed(), annotate_value_begin(), annotate_value_end(), annotate_value_history_begin(), annotate_value_history_end(), annotate_value_history_value(), annotate_watchpoint(), ATTRIBUTE_PRINTF(), captured_main(), command_line_handler(), command_line_input(), init_main(), line_info(), print_frame_info(), prompt_for_continue(), and top_level_prompt().

Definition at line 58 of file stack.c.

Referenced by gdbtk_add_hooks(), select_frame(), tui_install_hooks(), and tui_remove_hooks().

Definition at line 737 of file stack.c.

Referenced by print_frame_info().

int last_displayed_line = 0 [static]
struct program_space* last_displayed_pspace = 0 [static]

Definition at line 119 of file stack.c.

Referenced by get_last_displayed_pspace(), and get_last_displayed_sal().

struct symtab* last_displayed_symtab = 0 [static]

Definition at line 121 of file stack.c.

Referenced by get_last_displayed_sal(), and get_last_displayed_symtab().

Definition at line 91 of file stack.c.

Referenced by read_frame_arg().

const char print_entry_values_both[] = "both"

Definition at line 77 of file stack.c.

Referenced by read_frame_arg().

const char print_entry_values_compact[] = "compact"

Definition at line 78 of file stack.c.

Referenced by print_frame_arg(), py_print_single_arg(), and read_frame_arg().

const char print_entry_values_default[] = "default"

Definition at line 79 of file stack.c.

Referenced by read_frame_arg().

const char print_entry_values_if_needed[] = "if-needed"

Definition at line 76 of file stack.c.

Referenced by read_frame_arg().

const char print_entry_values_only[] = "only"
const char print_entry_values_preferred[] = "preferred"

Definition at line 75 of file stack.c.

Referenced by read_frame_arg().

const char* print_frame_arguments = "scalars" [static]

Definition at line 65 of file stack.c.

Referenced by backtrace_command_1(), print_frame_arg(), and print_frame_args().

Initial value:
  {"all", "scalars", "none", NULL}

Definition at line 63 of file stack.c.

Definition at line 68 of file stack.c.

Referenced by print_frame_arg().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines