stack.h 3.0 KB

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