tui-disasm.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* Disassembly display.
  2. Copyright (C) 1998-2022 Free Software Foundation, Inc.
  3. Contributed by Hewlett-Packard Company.
  4. This file is part of GDB.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  15. #ifndef TUI_TUI_DISASM_H
  16. #define TUI_TUI_DISASM_H
  17. #include "tui/tui.h"
  18. #include "tui/tui-data.h"
  19. #include "tui-winsource.h"
  20. /* A TUI disassembly window. */
  21. struct tui_disasm_window : public tui_source_window_base
  22. {
  23. tui_disasm_window () = default;
  24. DISABLE_COPY_AND_ASSIGN (tui_disasm_window);
  25. const char *name () const override
  26. {
  27. return DISASSEM_NAME;
  28. }
  29. bool location_matches_p (struct bp_location *loc, int line_no) override;
  30. void maybe_update (struct frame_info *fi, symtab_and_line sal) override;
  31. void erase_source_content () override
  32. {
  33. do_erase_source_content (_("[ No Assembly Available ]"));
  34. }
  35. void display_start_addr (struct gdbarch **gdbarch_p,
  36. CORE_ADDR *addr_p) override;
  37. protected:
  38. void do_scroll_vertical (int num_to_scroll) override;
  39. bool set_contents (struct gdbarch *gdbarch,
  40. const struct symtab_and_line &sal) override;
  41. private:
  42. /* Answer whether a particular line number or address is displayed
  43. in the current source window. */
  44. bool addr_is_displayed (CORE_ADDR addr) const;
  45. };
  46. extern void tui_get_begin_asm_address (struct gdbarch **, CORE_ADDR *);
  47. #endif /* TUI_TUI_DISASM_H */