GDB (xrefs)

Classes | Functions | Variables
/tmp/gdb-8.1/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 "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 "objfiles.h"`
`#include "safe-ctype.h"`
`#include "symfile.h"`
`#include "extension.h"`
`#include "observer.h"`
`#include "common/def-vector.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_to_uiout (struct ui_out *uiout, struct frame_info *frame, int print_level, enum print_what print_what, int set_current_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)
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_space * | get_last_displayed_pspace (void)
CORE_ADDR | get_last_displayed_addr (void)
struct symtab * | get_last_displayed_symtab (void)
int | get_last_displayed_line (void)
symtab_and_line | get_last_displayed_sal ()
gdb::unique_xmalloc_ptr< char > | find_frame_funname (struct frame_info *frame, 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_info * | parse_frame_specification (const char *frame_exp, int *selected_frame_p)
static void | info_frame_command (const char *addr_exp, int from_tty)
static void | backtrace_command_1 (const char *count_exp, int show_locals, int no_filters, int from_tty)
static void | backtrace_command (const char *arg, int from_tty)
static void | iterate_over_block_locals (const struct block *b, iterate_over_block_arg_local_vars_cb cb, void *cb_data)
void | iterate_over_block_local_vars (const 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 | info_locals_command (const char *args, int from_tty)
void | iterate_over_block_arg_vars (const 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 | info_args_command (const char *ignore, int from_tty)
static void | select_and_print_frame (struct frame_info *frame)
const struct block * | get_selected_block (CORE_ADDR *addr_in_block)
struct frame_info * | find_relative_frame (struct frame_info *frame, int *level_offset_ptr)
void | select_frame_command (const char *level_exp, int from_tty)
static void | frame_command (const char *level_exp, int from_tty)
static void | up_silently_base (const char *count_exp)
static void | up_silently_command (const char *count_exp, int from_tty)
static void | up_command (const char *count_exp, int from_tty)
static void | down_silently_base (const char *count_exp)
static void | down_silently_command (const char *count_exp, int from_tty)
static void | down_command (const char *count_exp, int from_tty)
void | return_command (const char *retval_exp, int from_tty)
static void | func_command (const char *arg, int from_tty)
void | _initialize_stack (void)

## Variables
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_space * | last_displayed_pspace = 0
static CORE_ADDR | last_displayed_addr = 0
static struct symtab * | last_displayed_symtab = 0
static int | last_displayed_line = 0
static enum auto_boolean | disassemble_next_line

## Function Documentation

## ◆ _initialize_stack()

void _initialize_stack | ( | void |  | ) |

Definition at line 2547 of file stack.c.

References _, add_com(), add_com_alias(), add_com_suppress_notification(), add_info(), add_info_alias(), add_setshow_auto_boolean_cmd(), add_setshow_boolean_cmd(), add_setshow_enum_cmd(), AUTO_BOOLEAN_FALSE, backtrace_command(), class_alias, class_stack, class_support, dbx_commands, disassemble_next_line, down_command(), down_silently_command(), frame_command(), func_command(), info_args_command(), info_frame_command(), info_locals_command(), no_class, print_entry_values, print_entry_values_choices, print_frame_arguments, print_frame_arguments_choices, print_raw_frame_arguments, return_command(), select_frame_command(), setlist, setprintlist, setprintrawlist, show_disassemble_next_line(), showlist, showprintlist, showprintrawlist, up_command(), up_silently_command(), and cli_suppress_notification::user_selected_context.

## ◆ backtrace_command()

static void backtrace_command | ( | const char * | arg,
|  | int | from_tty
| ) |  |
| static

Definition at line 1847 of file stack.c.

References gdb::argv, backtrace_command_1(), gdb_argv::get(), string, and subset_compare().

Referenced by _initialize_stack().

## ◆ backtrace_command_1()

static void backtrace_command_1 | ( | const char * | count_exp,
|  | int | show_locals,
|  | int | no_filters,
|  | int | from_tty
| ) |  |
| static

Definition at line 1695 of file stack.c.

References _, apply_ext_lang_frame_filter(), CLI_ALL_VALUES, CLI_SCALAR_VALUES, current_uiout, error(), expand_symtab_containing_pc(), EXT_LANG_BT_ERROR, EXT_LANG_BT_NO_FILTERS, find_pc_mapped_section(), flags, frame_find_by_id(), frame_stop_reason_string(), gdb_stdout, get_current_frame(), get_frame_address_in_block(), get_frame_id(), get_frame_unwind_stop_reason(), get_prev_frame(), info_verbose, LOCATION, NO_VALUES, parse_and_eval_long(), PRINT_ARGS, print_frame_arguments, PRINT_FRAME_INFO, print_frame_info(), print_frame_local_vars(), PRINT_LEVEL, PRINT_LOCALS, printf_filtered(), QUIT, target_has_stack, and warning().

Referenced by backtrace_command().

## ◆ clear_last_displayed_sal()

void clear_last_displayed_sal | ( | void |  | ) |

Definition at line 957 of file stack.c.

References last_displayed_addr, last_displayed_line, last_displayed_pspace, last_displayed_sal_valid, and last_displayed_symtab.

Referenced by clear_symtab_users(), and set_last_displayed_sal().

## ◆ do_gdb_disassembly()

static void do_gdb_disassembly | ( | struct gdbarch * | gdbarch,
|  | int | how_many,
|  | CORE_ADDR | low,
|  | CORE_ADDR | high
| ) |  |
| static

Definition at line 755 of file stack.c.

References CATCH, current_uiout, DISASSEMBLY_RAW_INSN, END_CATCH, exception_print(), gdb_disassembly(), gdb_stderr, RETURN_MASK_ERROR, and TRY.

Referenced by print_frame_info().

## ◆ do_print_variable_and_value()

static void do_print_variable_and_value | ( | const char * | print_name,
|  | struct symbol * | sym,
|  | void * | cb_data
| ) |  |
| static

Definition at line 2024 of file stack.c.

References _, frame_find_by_id(), frame_info::p, print_variable_and_value(), and warning().

Referenced by print_frame_arg_vars(), and print_frame_local_vars().

## ◆ down_command()

static void down_command | ( | const char * | count_exp,
|  | int | from_tty
| ) |  |
| static

Definition at line 2359 of file stack.c.

References down_silently_base(), observer_notify_user_selected_context_changed(), and USER_SELECTED_FRAME.

Referenced by _initialize_stack().

## ◆ down_silently_base()

static void down_silently_base | ( | const char * | count_exp | ) |
| static

Definition at line 2330 of file stack.c.

References _, error(), find_relative_frame(), get_selected_frame(), parse_and_eval_long(), and select_frame().

Referenced by down_command(), and down_silently_command().

## ◆ down_silently_command()

static void down_silently_command | ( | const char * | count_exp,
|  | int | from_tty
| ) |  |
| static

Definition at line 2353 of file stack.c.

References down_silently_base().

Referenced by _initialize_stack().

## ◆ find_frame_funname()

gdb::unique_xmalloc_ptr<char> find_frame_funname | ( | struct frame_info * | frame,
|  | enum language * | funlang,
|  | struct symbol ** | funcp
| ) |  |

Definition at line 1039 of file stack.c.

References block_inlined_p(), BLOCK_START, BMSYMBOL_VALUE_ADDRESS, cp_remove_params(), func, get_frame_address_in_block(), get_frame_address_in_block_if_available(), get_frame_function(), language_cplus, language_unknown, lookup_minimal_symbol_by_pc(), memset(), bound_minimal_symbol::minsym, MSYMBOL_LANGUAGE, MSYMBOL_PRINT_NAME, SYMBOL_BLOCK_VALUE, SYMBOL_LANGUAGE, and SYMBOL_PRINT_NAME.

Referenced by ada_unhandled_exception_name_addr_from_raise(), frapy_function(), frapy_name(), gdbscm_frame_name(), is_known_support_routine(), and print_frame().

## ◆ find_relative_frame()

struct frame_info* find_relative_frame | ( | struct frame_info * | frame,
|  | int * | level_offset_ptr
| ) |  |

Definition at line 2234 of file stack.c.

References get_next_frame(), get_prev_frame(), frame_info::next, and frame_info::prev.

Referenced by down_silently_base(), func_command(), mi_cmd_execute(), parse_frame_specification(), restore_selected_frame(), and up_silently_base().

## ◆ frame_command()

static void frame_command | ( | const char * | level_exp,
|  | int | from_tty
| ) |  |
| static

Definition at line 2284 of file stack.c.

References current_uiout, get_selected_frame_if_set(), observer_notify_user_selected_context_changed(), parse_frame_specification(), print_selected_thread_frame(), select_frame(), and USER_SELECTED_FRAME.

Referenced by _initialize_stack().

## ◆ frame_show_address()

static int frame_show_address | ( | struct frame_info * | frame,
|  | struct symtab_and_line | sal
| ) |  |
| static

Definition at line 126 of file stack.c.

References symtab_and_line::end, gdb_assert, get_frame_pc(), get_frame_type(), get_next_frame(), inferior_ptid, INLINE_FRAME, inline_skipped_frames(), symtab_and_line::line, and symtab_and_line::pc.

Referenced by print_frame(), and print_frame_info().

## ◆ func_command()

static void func_command | ( | const char * | arg,
|  | int | from_tty
| ) |  |
| static

Definition at line 2501 of file stack.c.

References _, current_program_space, DECODE_LINE_FUNFIRSTLINE, decode_line_with_current_source(), find_pc_partial_function(), find_relative_frame(), get_current_frame(), get_frame_pc(), get_selected_frame(), frame_info::level, printf_filtered(), frame_info::pspace, and select_and_print_frame().

Referenced by _initialize_stack().

## ◆ get_last_displayed_addr()

CORE_ADDR get_last_displayed_addr | ( | void |  | ) |

Definition at line 989 of file stack.c.

References last_displayed_addr, and last_displayed_sal_valid.

Referenced by skip_function_command().

## ◆ get_last_displayed_line()

int get_last_displayed_line | ( | void |  | ) |

Definition at line 1009 of file stack.c.

References last_displayed_line, and last_displayed_sal_valid.

Referenced by decode_line_with_last_displayed(), parse_breakpoint_sals(), and until_break_command().

## ◆ get_last_displayed_pspace()

struct program_space* get_last_displayed_pspace | ( | void |  | ) |

Definition at line 979 of file stack.c.

References last_displayed_pspace, and last_displayed_sal_valid.

## ◆ get_last_displayed_sal()

symtab_and_line get_last_displayed_sal | ( |  | ) |

Definition at line 1019 of file stack.c.

References last_displayed_addr, last_displayed_line, last_displayed_pspace, last_displayed_sal_valid, last_displayed_symtab, symtab_and_line::line, symtab_and_line::pc, symtab_and_line::pspace, and symtab_and_line::symtab.

Referenced by clear_command(), and parse_breakpoint_sals().

## ◆ get_last_displayed_symtab()

struct symtab* get_last_displayed_symtab | ( | void |  | ) |

Definition at line 999 of file stack.c.

References last_displayed_sal_valid, and last_displayed_symtab.

Referenced by decode_line_with_last_displayed(), parse_breakpoint_sals(), skip_file_command(), and until_break_command().

## ◆ get_selected_block()

const struct block* get_selected_block | ( | CORE_ADDR * | addr_in_block | ) |

Definition at line 2216 of file stack.c.

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

Referenced by ada_collect_symbol_completion_matches(), ada_find_any_type_symbol(), cp_lookup_transparent_type(), default_collect_symbol_completion_matches_break_on(), do_one_display(), evaluate_funcall(), get_current_search_block(), get_expr_block_and_pc(), get_var_value(), info_address_command(), info_display_command(), make_symbol_overload_list_namespace(), make_symbol_overload_list_qualified(), make_symbol_overload_list_using(), parse_exp_in_context_1(), rust_evaluate_funcall(), value_maybe_namespace_elt(), and write_object_renaming().

## ◆ info_args_command()

void info_args_command | ( | const char * | ignore,
|  | int | from_tty
| ) |  |

Definition at line 2192 of file stack.c.

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

Referenced by _initialize_stack(), and trace_dump_actions().

## ◆ info_frame_command()

static void info_frame_command | ( | const char * | addr_exp,
|  | int | from_tty
| ) |  |
| static

Definition at line 1383 of file stack.c.

References _, all_reggroup, CATCH, cp_remove_params(), END_CATCH, extract_unsigned_integer(), find_frame_sal(), fprintf_filtered(), fprintf_symbol_filtered(), fputs_filtered(), frame_id_p(), frame_register_unwind(), frame_relative_level(), frame_stop_reason_string(), frame_unwind_caller_id(), frame_unwind_caller_pc(), frame_unwind_register_value(), func, gdb_assert, gdb_stdout, gdbarch_byte_order(), gdbarch_frame_num_args(), gdbarch_frame_num_args_p(), gdbarch_num_pseudo_regs(), gdbarch_num_regs(), gdbarch_pc_regnum(), gdbarch_register_name(), gdbarch_register_reggroup_p(), gdbarch_sp_regnum(), get_frame_arch(), get_frame_args_address(), get_frame_base(), get_frame_function(), get_frame_locals_address(), get_frame_pc(), get_frame_pc_if_available(), get_frame_type(), get_frame_unwind_stop_reason(), get_next_frame(), get_prev_frame(), INLINE_FRAME, symtab::language, language_cplus, language_str(), language_unknown, symtab_and_line::line, lookup_minimal_symbol_by_pc(), value::lval, lval_memory, lval_register, MSYMBOL_LANGUAGE, MSYMBOL_PRINT_NAME, NOT_AVAILABLE_ERROR, not_lval, OPTIMIZED_OUT_ERROR, paddress(), parse_frame_specification(), print_frame_args(), printf_filtered(), puts_filtered(), register_size(), release_value(), RETURN_MASK_ERROR, sp_regnum, SYMBOL_LANGUAGE, SYMBOL_PRINT_NAME, symtab_and_line::symtab, symtab_to_filename_for_display(), TAILCALL_FRAME, TRY, val_print_not_saved(), val_print_unavailable(), value_address(), value_contents_all(), value_entirely_available(), value_free(), VALUE_LVAL, value_optimized_out(), VALUE_REGNUM, and wrap_here().

Referenced by _initialize_stack().

## ◆ info_locals_command()

void info_locals_command | ( | const char * | args,
|  | int | from_tty
| ) |  |

Definition at line 2110 of file stack.c.

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

Referenced by _initialize_stack(), and trace_dump_actions().

## ◆ iterate_over_block_arg_vars()

void iterate_over_block_arg_vars | ( | const struct block * | b,
|  | iterate_over_block_arg_local_vars_cb | cb,
|  | void * | cb_data
| ) |  |

Definition at line 2121 of file stack.c.

References ALL_BLOCK_SYMBOLS, lookup_symbol_search_name(), block_symbol::symbol, SYMBOL_IS_ARGUMENT, SYMBOL_PRINT_NAME, SYMBOL_SEARCH_NAME, and VAR_DOMAIN.

Referenced by collection_list::add_local_symbols(), and print_frame_arg_vars().

## ◆ iterate_over_block_local_vars()

void iterate_over_block_local_vars | ( | const struct block * | block,
|  | iterate_over_block_arg_local_vars_cb | cb,
|  | void * | cb_data
| ) |  |

Definition at line 1994 of file stack.c.

References BLOCK_FUNCTION, BLOCK_SUPERBLOCK, and iterate_over_block_locals().

Referenced by collection_list::add_local_symbols(), and print_frame_local_vars().

## ◆ iterate_over_block_locals()

static void iterate_over_block_locals | ( | const struct block * | b,
|  | iterate_over_block_arg_local_vars_cb | cb,
|  | void * | cb_data
| ) |  |
| static

Definition at line 1910 of file stack.c.

References ALL_BLOCK_SYMBOLS, COMMON_BLOCK_DOMAIN, LOC_COMPUTED, LOC_LOCAL, LOC_OPTIMIZED_OUT, LOC_REGISTER, LOC_STATIC, SYMBOL_CLASS, SYMBOL_DOMAIN, SYMBOL_IS_ARGUMENT, and SYMBOL_PRINT_NAME.

Referenced by iterate_over_block_local_vars().

## ◆ last_displayed_sal_is_valid()

int last_displayed_sal_is_valid | ( | void |  | ) |

Definition at line 971 of file stack.c.

References last_displayed_sal_valid.

Referenced by decode_line_with_last_displayed(), parse_breakpoint_sals(), skip_function_command(), and until_break_command().

## ◆ parse_frame_specification()

static struct frame_info* parse_frame_specification | ( | const char * | frame_exp,
|  | int * | selected_frame_p
| ) |  |
| static

Definition at line 1264 of file stack.c.

References _, create_new_frame(), error(), find_relative_frame(), frame_id_build_wild(), frame_id_eq(), get_current_frame(), get_frame_id(), get_prev_frame(), get_selected_frame(), frame_info::level, parse_and_eval(), skip_spaces(), string, value_as_address(), and value_as_long().

Referenced by frame_command(), info_frame_command(), and select_frame_command().

## ◆ print_frame() [1/2]

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 cli_on_normal_stop(), mi_on_normal_stop(), mi_on_normal_stop_1(), print_frame_info(), and tui_on_normal_stop().

## ◆ print_frame() [2/2]

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

Definition at line 1133 of file stack.c.

References value_print_options::addressprint, annotate_frame_address(), annotate_frame_address_end(), annotate_frame_args(), annotate_frame_begin(), 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(), CATCH, current_uiout, END_CATCH, ui_out::field_core_addr(), ui_out::field_fmt_int(), ui_out::field_int(), ui_out::field_stream(), ui_out::field_string(), find_frame_funname(), fprintf_symbol_filtered(), frame_relative_level(), frame_show_address(), func, gdb_assert, gdb_stdout, gdbarch_frame_num_args(), gdbarch_frame_num_args_p(), get_frame_arch(), get_frame_pc(), get_frame_pc_if_available(), get_frame_program_space(), get_user_print_options(), ui_out::is_mi_like_p(), language_unknown, symtab_and_line::line, LOC_AND_ADDRESS, print_args(), print_frame_args(), QUIT, RETURN_MASK_ERROR, solib_name_from_address(), symtab_and_line::symtab, symtab_to_filename_for_display(), symtab_to_fullname(), ui_out::text(), TRY, ui_left, and ui_out::wrap_hint().

## ◆ print_frame_arg()

static void print_frame_arg | ( | const struct frame_arg * | arg | ) |
| static

Definition at line 225 of file stack.c.

References _, annotate_arg_name_end(), annotate_arg_value(), CATCH, common_val_print(), current_language, current_uiout, value_print_options::deref_ref, END_CATCH, frame_arg::entry_kind, frame_arg::error, ui_out::field_stream(), fprintf_symbol_filtered(), gdb_assert, get_no_prettyformat_print_options(), ui_out::is_mi_like_p(), language_def(), language_mode_auto, print_entry_values_compact, print_entry_values_no, print_entry_values_only, print_frame_arguments, print_raw_frame_arguments, ui_file::printf(), ui_file::puts(), value_print_options::raw, RETURN_MASK_ERROR, value_print_options::summary, frame_arg::sym, SYMBOL_LANGUAGE, SYMBOL_PRINT_NAME, ui_out::text(), TRY, frame_arg::val, and value_type().

Referenced by print_frame_args().

## ◆ print_frame_arg_vars()

static void print_frame_arg_vars | ( | struct frame_info * | frame,
|  | struct ui_file * | stream
| ) |  |
| static

Definition at line 2157 of file stack.c.

References _, do_print_variable_and_value(), fprintf_filtered(), print_variable_and_value_data::frame_id, func, gdb_stdout, get_frame_function(), get_frame_id(), get_frame_pc_if_available(), iterate_over_block_arg_vars(), print_variable_and_value_data::num_tabs, print_variable_and_value_data::stream, SYMBOL_BLOCK_VALUE, and print_variable_and_value_data::values_printed.

Referenced by info_args_command().

## ◆ print_frame_args()

static void print_frame_args | ( | struct symbol * | func,
|  | struct frame_info * | frame,
|  | int | num,
|  | struct ui_file * | stream
| ) |  |
| static

Definition at line 535 of file stack.c.

References ALL_BLOCK_SYMBOLS, current_uiout, frame_arg::entry_kind, frame_arg::error, func, gdb_assert, gdbarch_frame_args_skip(), get_frame_arch(), LOC_ARG, LOC_COMPUTED, LOC_OPTIMIZED_OUT, LOC_REF_ARG, LOC_REGISTER, LOC_REGPARM_ADDR, lookup_symbol_search_name(), memset(), print_args(), print_entry_values_no, print_entry_values_only, print_frame_arg(), print_frame_arguments, print_frame_nameless_args(), QUIT, read_frame_arg(), frame_arg::sym, block_symbol::symbol, SYMBOL_BLOCK_VALUE, SYMBOL_CLASS, SYMBOL_IS_ARGUMENT, SYMBOL_LINKAGE_NAME, SYMBOL_SEARCH_NAME, SYMBOL_TYPE, SYMBOL_VALUE, ui_out::text(), TYPE_LENGTH, VAR_DOMAIN, ui_out::wrap_hint(), and xfree().

Referenced by info_frame_command(), and print_frame().

## ◆ print_frame_info()

void print_frame_info | ( | struct frame_info * | frame,
|  | int | print_level,
|  | enum print_what print_what | ,
|  | int | print_args,
|  | int | set_current_sal
| ) |  |

Definition at line 786 of file stack.c.

References value_print_options::addressprint, annotate_frame_address(), annotate_frame_address_end(), annotate_frame_begin(), annotate_frame_end(), annotate_function_call(), annotate_signal_handler_caller(), annotation_level, ARCH_FRAME, AUTO_BOOLEAN_AUTO, AUTO_BOOLEAN_TRUE, current_uiout, deprecated_print_frame_info_listing_hook, disassemble_next_line, do_gdb_disassembly(), DUMMY_FRAME, symtab_and_line::end, ui_out::field_core_addr(), ui_out::field_fmt_int(), ui_out::field_string(), find_frame_sal(), frame_relative_level(), frame_show_address(), gdb_flush(), gdb_stdout, get_frame_arch(), get_frame_pc(), get_frame_pc_if_available(), get_frame_type(), get_user_print_options(), identify_source_line(), ui_out::is_mi_like_p(), symtab_and_line::line, LOC_AND_ADDRESS, LOCATION, symtab_and_line::pc, print_args(), print_frame(), print_source_lines(), symtab_and_line::pspace, set_last_displayed_sal(), SIGTRAMP_FRAME, SRC_AND_LOC, SRC_LINE, symtab_and_line::symtab, ui_out::text(), and ui_left.

Referenced by backtrace_command_1(), mi_cmd_stack_info_frame(), mi_cmd_stack_list_frames(), print_stack_frame(), and py_print_frame().

## ◆ print_frame_local_vars()

static void print_frame_local_vars | ( | struct frame_info * | frame,
|  | int | num_tabs,
|  | struct ui_file * | stream
| ) |  |
| static

Definition at line 2053 of file stack.c.

References _, CATCH, do_print_variable_and_value(), END_CATCH, exception_none, fprintf_filtered(), frame_find_by_id(), print_variable_and_value_data::frame_id, get_frame_block(), get_frame_id(), get_frame_pc_if_available(), iterate_over_block_local_vars(), print_variable_and_value_data::num_tabs, gdb_exception::reason, RETURN_MASK_ALL, select_frame(), print_variable_and_value_data::stream, throw_exception(), TRY, and print_variable_and_value_data::values_printed.

Referenced by backtrace_command_1(), and info_locals_command().

## ◆ print_frame_nameless_args()

static void print_frame_nameless_args | ( | struct frame_info * | frame,
|  | long | start,
|  | int | num,
|  | int | first,
|  | struct ui_file * | stream
| ) |  |
| static

Definition at line 193 of file stack.c.

References gdbarch::byte_order, fprintf_filtered(), gdbarch_byte_order(), get_frame_arch(), get_frame_args_address(), QUIT, and read_memory_integer().

Referenced by print_frame_args().

## ◆ print_stack_frame()

void print_stack_frame | ( | struct frame_info * | frame,
|  | int | print_level,
|  | enum print_what print_what | ,
|  | int | set_current_sal
| ) |  |

Definition at line 165 of file stack.c.

References CATCH, current_uiout, END_CATCH, LOC_AND_ADDRESS, print_frame_info(), RETURN_MASK_ERROR, set_current_sal_from_frame(), and TRY.

Referenced by bsd_kvm_open(), bsd_kvm_pcb_cmd(), bsd_kvm_proc_cmd(), core_open(), finish_command(), kill_command(), linux_fork_context(), mi_cmd_exec_return(), mi_cmd_trace_find(), print_stack_frame_to_uiout(), print_stop_location(), print_thread_info_1(), record_btrace_set_replay(), record_full_goto_entry(), record_full_restore(), restore_selected_frame(), return_command(), select_and_print_frame(), task_command_1(), and tfind_1().

## ◆ print_stack_frame_to_uiout()

void print_stack_frame_to_uiout | ( | struct ui_out * | uiout,
|  | struct frame_info * | frame,
|  | int | print_level,
|  | enum print_what print_what | ,
|  | int | set_current_sal
| ) |  |

Definition at line 149 of file stack.c.

References current_uiout, make_scoped_restore(), and print_stack_frame().

Referenced by mi_user_selected_context_changed(), and print_selected_thread_frame().

## ◆ read_frame_arg()

void read_frame_arg | ( | struct symbol * | sym,
|  | struct frame_info * | frame,
|  | struct frame_arg * | argp,
|  | struct frame_arg * | entryargp
| ) |  |

Definition at line 337 of file stack.c.

References allocate_optimized_out_value(), CATCH, coerce_ref(), current_uiout, END_CATCH, frame_arg::entry_kind, frame_arg::error, gdb_assert, NO_ENTRY_VALUE_ERROR, print_entry_values, print_entry_values_both, print_entry_values_compact, print_entry_values_default, print_entry_values_if_needed, print_entry_values_no, print_entry_values_only, print_entry_values_preferred, read_var_value(), symbol_computed_ops::read_variable_at_entry, RETURN_MASK_ERROR, frame_arg::sym, SYMBOL_COMPUTED_OPS, SYMBOL_TYPE, TRY, TYPE_LENGTH, frame_arg::val, value_contents_eq(), value_fetch_lazy(), value_lazy(), value_optimized_out(), and value_type().

Referenced by enumerate_args(), list_args_or_locals(), and print_frame_args().

## ◆ read_frame_local()

void read_frame_local | ( | struct symbol * | sym,
|  | struct frame_info * | frame,
|  | struct frame_arg * | argp
| ) |  |

Definition at line 314 of file stack.c.

References CATCH, END_CATCH, frame_arg::error, read_var_value(), RETURN_MASK_ERROR, frame_arg::sym, TRY, and frame_arg::val.

Referenced by list_args_or_locals().

## ◆ return_command()

void return_command | ( | const char * | retval_exp,
|  | int | from_tty
| ) |  |

Definition at line 2366 of file stack.c.

References _, regcache::arch(), check_typedef(), DUMMY_FRAME, error(), evaluate_expression(), frame_pop(), gdb_assert, gdbarch_return_value(), get_current_frame(), get_current_regcache(), get_frame_arch(), get_frame_function(), get_frame_type(), get_selected_frame(), INLINE_FRAME, parse_expression(), print_stack_frame(), query(), read_var_value(), gdbarch::return_value, RETURN_VALUE_ABI_RETURNS_ADDRESS, RETURN_VALUE_REGISTER_CONVENTION, RETURN_VALUE_STRUCT_CONVENTION, select_frame(), SRC_AND_LOC, struct_return_convention(), SYMBOL_PRINT_NAME, SYMBOL_TYPE, symbol::type, TYPE_CODE, TYPE_CODE_VOID, TYPE_NO_RETURN, TYPE_TARGET_TYPE, value_cast(), value_contents(), value_fetch_lazy(), value_lazy(), value_type(), and warning().

Referenced by _initialize_stack(), and mi_cmd_exec_return().

## ◆ select_and_print_frame()

static void select_and_print_frame | ( | struct frame_info * | frame | ) |
| static

Definition at line 2201 of file stack.c.

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

Referenced by func_command().

## ◆ select_frame_command()

void select_frame_command | ( | const char * | level_exp,
|  | int | from_tty
| ) |  |

Definition at line 2270 of file stack.c.

References get_selected_frame_if_set(), observer_notify_user_selected_context_changed(), parse_frame_specification(), select_frame(), and USER_SELECTED_FRAME.

Referenced by _initialize_stack(), and mi_cmd_stack_select_frame().

## ◆ set_current_sal_from_frame()

void set_current_sal_from_frame | ( | struct frame_info * | frame | ) |

Definition at line 725 of file stack.c.

References find_frame_sal(), set_current_source_symtab_and_line(), and symtab_and_line::symtab.

Referenced by normal_stop(), print_one_stopped_thread(), and print_stack_frame().

## ◆ set_last_displayed_sal()

static void set_last_displayed_sal | ( | int | valid,
|  | struct program_space * | pspace,
|  | CORE_ADDR | addr,
|  | struct symtab * | symtab,
|  | int | line
| ) |  |
| static

Definition at line 937 of file stack.c.

References _, clear_last_displayed_sal(), internal_error(), last_displayed_addr, last_displayed_line, last_displayed_pspace, last_displayed_sal_valid, and last_displayed_symtab.

Referenced by print_frame_info().

## ◆ show_disassemble_next_line()

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 741 of file stack.c.

References _, and fprintf_filtered().

Referenced by _initialize_stack().

## ◆ up_command()

static void up_command | ( | const char * | count_exp,
|  | int | from_tty
| ) |  |
| static

Definition at line 2320 of file stack.c.

References observer_notify_user_selected_context_changed(), up_silently_base(), and USER_SELECTED_FRAME.

Referenced by _initialize_stack().

## ◆ up_silently_base()

static void up_silently_base | ( | const char * | count_exp | ) |
| static

Definition at line 2299 of file stack.c.

References _, error(), find_relative_frame(), get_selected_frame(), parse_and_eval_long(), and select_frame().

Referenced by up_command(), and up_silently_command().

## ◆ up_silently_command()

static void up_silently_command | ( | const char * | count_exp,
|  | int | from_tty
| ) |  |
| static

Definition at line 2314 of file stack.c.

References up_silently_base().

Referenced by _initialize_stack().

## Variable Documentation

## ◆ annotation_level

int annotation_level = 0

Definition at line 111 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_1(), command_line_input(), handle_line_of_input(), info_line_command(), init_main(), print_frame_info(), prompt_for_continue(), and top_level_prompt().

## ◆ disassemble_next_line

enum auto_boolean disassemble_next_line
| static

Definition at line 738 of file stack.c.

Referenced by _initialize_stack(), and print_frame_info().

## ◆ last_displayed_addr

CORE_ADDR last_displayed_addr = 0
| static

Definition at line 117 of file stack.c.

Referenced by clear_last_displayed_sal(), get_last_displayed_addr(), get_last_displayed_sal(), and set_last_displayed_sal().

## ◆ last_displayed_line

int last_displayed_line = 0
| static

Definition at line 119 of file stack.c.

Referenced by clear_last_displayed_sal(), get_last_displayed_line(), get_last_displayed_sal(), and set_last_displayed_sal().

## ◆ last_displayed_pspace

struct program_space* last_displayed_pspace = 0
| static

Definition at line 116 of file stack.c.

Referenced by clear_last_displayed_sal(), get_last_displayed_pspace(), get_last_displayed_sal(), and set_last_displayed_sal().

## ◆ last_displayed_sal_valid

int last_displayed_sal_valid = 0
| static

Definition at line 115 of file stack.c.

Referenced by clear_last_displayed_sal(), get_last_displayed_addr(), get_last_displayed_line(), get_last_displayed_pspace(), get_last_displayed_sal(), get_last_displayed_symtab(), last_displayed_sal_is_valid(), and set_last_displayed_sal().

## ◆ last_displayed_symtab

struct symtab* last_displayed_symtab = 0
| static

Definition at line 118 of file stack.c.

Referenced by clear_last_displayed_sal(), get_last_displayed_sal(), get_last_displayed_symtab(), and set_last_displayed_sal().

## ◆ print_entry_values

const char* print_entry_values = print_entry_values_default

Definition at line 88 of file stack.c.

Referenced by _initialize_stack(), and read_frame_arg().

## ◆ print_entry_values_both

const char print_entry_values_both[] = "both"

Definition at line 74 of file stack.c.

Referenced by read_frame_arg().

## ◆ print_entry_values_choices

const char* const print_entry_values_choices[]
| static

Initial value:
=
{
print_entry_values_no,
print_entry_values_only,
print_entry_values_preferred,
print_entry_values_if_needed,
print_entry_values_both,
print_entry_values_compact,
print_entry_values_default,
NULL
}
print_entry_values_only
const char print_entry_values_only[]
Definition: stack.c:71
print_entry_values_if_needed
const char print_entry_values_if_needed[]
Definition: stack.c:73
print_entry_values_preferred
const char print_entry_values_preferred[]
Definition: stack.c:72
print_entry_values_default
const char print_entry_values_default[]
Definition: stack.c:76
print_entry_values_no
const char print_entry_values_no[]
Definition: stack.c:70
print_entry_values_compact
const char print_entry_values_compact[]
Definition: stack.c:75
print_entry_values_both
const char print_entry_values_both[]
Definition: stack.c:74

Definition at line 77 of file stack.c.

Referenced by _initialize_stack().

## ◆ print_entry_values_compact

const char print_entry_values_compact[] = "compact"

Definition at line 75 of file stack.c.

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

## ◆ print_entry_values_default

const char print_entry_values_default[] = "default"

Definition at line 76 of file stack.c.

Referenced by read_frame_arg().

## ◆ print_entry_values_if_needed

const char print_entry_values_if_needed[] = "if-needed"

Definition at line 73 of file stack.c.

Referenced by read_frame_arg().

## ◆ print_entry_values_no

const char print_entry_values_no[] = "no"

Definition at line 70 of file stack.c.

Referenced by enumerate_args(), list_arg_or_local(), list_args_or_locals(), print_frame_arg(), print_frame_args(), and read_frame_arg().

## ◆ print_entry_values_only

const char print_entry_values_only[] = "only"

Definition at line 71 of file stack.c.

Referenced by enumerate_args(), list_arg_or_local(), list_args_or_locals(), print_frame_arg(), print_frame_args(), py_print_single_arg(), and read_frame_arg().

## ◆ print_entry_values_preferred

const char print_entry_values_preferred[] = "preferred"

Definition at line 72 of file stack.c.

Referenced by read_frame_arg().

## ◆ print_frame_arguments

const char* print_frame_arguments = "scalars"
| static

Definition at line 62 of file stack.c.

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

## ◆ print_frame_arguments_choices

const char* const print_frame_arguments_choices[]
| static

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

Definition at line 60 of file stack.c.

Referenced by _initialize_stack().

## ◆ print_raw_frame_arguments

int print_raw_frame_arguments
| static

Definition at line 65 of file stack.c.

Referenced by _initialize_stack(), and print_frame_arg().