]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/stack.h
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / stack.h
1 /* Stack manipulation commands, for GDB the GNU Debugger.
2
3 Copyright (C) 2003-2023 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20 #ifndef STACK_H
21 #define STACK_H
22
23 gdb::unique_xmalloc_ptr<char> find_frame_funname (frame_info_ptr frame,
24 enum language *funlang,
25 struct symbol **funcp);
26
27 typedef gdb::function_view<void (const char *print_name, struct symbol *sym)>
28 iterate_over_block_arg_local_vars_cb;
29
30 void iterate_over_block_arg_vars (const struct block *block,
31 iterate_over_block_arg_local_vars_cb cb);
32
33 void iterate_over_block_local_vars (const struct block *block,
34 iterate_over_block_arg_local_vars_cb cb);
35
36 /* Initialize *WHAT to be a copy of the user desired print what frame info.
37 If !WHAT.has_value (), the printing function chooses a default set of
38 information to print, otherwise the printing function should print
39 the relevant information. */
40
41 void get_user_print_what_frame_info (gdb::optional<enum print_what> *what);
42
43 /* Return true if we should display the address in addition to the location,
44 because we are in the middle of a statement. */
45
46 bool frame_show_address (frame_info_ptr frame, struct symtab_and_line sal);
47
48 /* Forget the last sal we displayed. */
49
50 void clear_last_displayed_sal (void);
51
52 /* Is our record of the last sal we displayed valid? If not, the
53 get_last_displayed_* functions will return NULL or 0, as appropriate. */
54
55 bool last_displayed_sal_is_valid (void);
56
57 /* Get the pspace of the last sal we displayed, if it's valid, otherwise
58 return nullptr. */
59
60 struct program_space* get_last_displayed_pspace (void);
61
62 /* Get the address of the last sal we displayed, if it's valid, otherwise
63 return an address of 0. */
64
65 CORE_ADDR get_last_displayed_addr (void);
66
67 /* Get the symtab of the last sal we displayed, if it's valid, otherwise
68 return nullptr. */
69
70 struct symtab* get_last_displayed_symtab (void);
71
72 /* Get the line of the last sal we displayed, if it's valid, otherwise
73 return 0. */
74
75 int get_last_displayed_line (void);
76
77 /* Get the last sal we displayed, if it's valid, otherwise return a
78 symtab_and_line constructed in its default state. */
79
80 symtab_and_line get_last_displayed_sal ();
81
82 /* Completer for the "frame apply all" command. */
83 void frame_apply_all_cmd_completer (struct cmd_list_element *ignore,
84 completion_tracker &tracker,
85 const char *text, const char */*word*/);
86
87 #endif /* #ifndef STACK_H */