mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 04:24:43 +00:00
Compare commits
6 Commits
efbd9add96
...
users/sima
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98841bd332 | ||
|
|
002310d77d | ||
|
|
4a7d716876 | ||
|
|
e2fbb71496 | ||
|
|
973bbc2236 | ||
|
|
73e2478a53 |
@@ -19,6 +19,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "extract-store-integer.h"
|
||||
#include "gdbarch.h"
|
||||
#include "glibc-tdep.h"
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <ctype.h>
|
||||
#include "event-top.h"
|
||||
#include "exceptions.h"
|
||||
#include "extract-store-integer.h"
|
||||
#include "gdbsupport/gdb_regex.h"
|
||||
#include "frame.h"
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifndef ADDRMAP_H
|
||||
#define ADDRMAP_H
|
||||
|
||||
#include "gdbsupport/gdb_obstack.h"
|
||||
#include "splay-tree.h"
|
||||
#include "gdbsupport/function-view.h"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "arch-utils.h"
|
||||
#include <ctype.h>
|
||||
#include "breakpoint.h"
|
||||
#include "cli/cli-cmds.h"
|
||||
#include "exceptions.h"
|
||||
#include "inferior.h"
|
||||
#include "annotate.h"
|
||||
#include "valprint.h"
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "arch-utils.h"
|
||||
#include <ctype.h>
|
||||
#include "event-top.h"
|
||||
#include "exceptions.h"
|
||||
#include "hashtab.h"
|
||||
#include "symtab.h"
|
||||
#include "frame.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "arch-utils.h"
|
||||
#include "exceptions.h"
|
||||
#include "readline/tilde.h"
|
||||
#include "completer.h"
|
||||
#include "target.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "cli-interp.h"
|
||||
#include "exceptions.h"
|
||||
#include "interps.h"
|
||||
#include "event-top.h"
|
||||
#include "ui-out.h"
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
#if !defined (COMPLAINTS_H)
|
||||
#define COMPLAINTS_H
|
||||
|
||||
#include "gdbsupport/scoped_restore.h"
|
||||
#include <unordered_set>
|
||||
|
||||
/* Helper for complaint. */
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "arch-utils.h"
|
||||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
#include "exceptions.h"
|
||||
#include "frame.h"
|
||||
#include "inferior.h"
|
||||
#include "infrun.h"
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
#include "gdbsupport/gdb_unlinker.h"
|
||||
#include "gdbsupport/pathstuff.h"
|
||||
#include "gdbsupport/scoped_fd.h"
|
||||
#include "gdbsupport/scoped_restore.h"
|
||||
#include "nat/fork-inferior.h"
|
||||
|
||||
/* Quick overview.
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "dis-asm.h"
|
||||
#include "disasm-flags.h"
|
||||
#include "ui-out.h"
|
||||
|
||||
struct gdbarch;
|
||||
struct ui_out;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "dwarf2/read.h"
|
||||
#include "dwarf2/abbrev-cache.h"
|
||||
|
||||
/* Hash function for an abbrev table. */
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#define GDB_DWARF2_ABBREV_CACHE_H
|
||||
|
||||
#include "dwarf2/abbrev.h"
|
||||
#include "dwarf2/types.h"
|
||||
#include "gdbsupport/gdb-hashtab.h"
|
||||
|
||||
/* An abbrev cache holds abbrev tables for easier reuse. */
|
||||
class abbrev_cache
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "dwarf2/read.h"
|
||||
#include "dwarf2/abbrev.h"
|
||||
#include "dwarf2/leb.h"
|
||||
#include "dwarf2/section.h"
|
||||
#include "bfd.h"
|
||||
|
||||
/* Hash function for an abbrev. */
|
||||
|
||||
@@ -27,7 +27,10 @@
|
||||
#ifndef GDB_DWARF2_ABBREV_H
|
||||
#define GDB_DWARF2_ABBREV_H
|
||||
|
||||
#include "hashtab.h"
|
||||
#include "dwarf2.h"
|
||||
#include "dwarf2/types.h"
|
||||
#include "gdbsupport/gdb-hashtab.h"
|
||||
#include "gdbsupport/gdb_obstack.h"
|
||||
|
||||
struct attr_abbrev
|
||||
{
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
|
||||
#include "dwarf2.h"
|
||||
#include "dwarf2/types.h"
|
||||
#include <optional>
|
||||
|
||||
/* Blocks are a bunch of untyped bytes. */
|
||||
struct dwarf_block
|
||||
|
||||
@@ -24,13 +24,17 @@
|
||||
#include "cp-support.h"
|
||||
#include "c-lang.h"
|
||||
#include "ada-lang.h"
|
||||
#include "dwarf2/tag.h"
|
||||
#include "event-top.h"
|
||||
#include "exceptions.h"
|
||||
#include "gdbsupport/task-group.h"
|
||||
#include "split-name.h"
|
||||
#include "observable.h"
|
||||
#include "run-on-main-thread.h"
|
||||
#include <algorithm>
|
||||
#include "gdbsupport/gdb-safe-ctype.h"
|
||||
#include "gdbsupport/selftest.h"
|
||||
#include "gdbsupport/thread-pool.h"
|
||||
#include <chrono>
|
||||
#include <unordered_set>
|
||||
#include "cli/cli-cmds.h"
|
||||
|
||||
@@ -24,22 +24,16 @@
|
||||
#include "dwarf2/types.h"
|
||||
#include "symtab.h"
|
||||
#include "hashtab.h"
|
||||
#include "dwarf2/index-common.h"
|
||||
#include <string_view>
|
||||
#include "quick-symbol.h"
|
||||
#include "gdbsupport/gdb_obstack.h"
|
||||
#include "addrmap.h"
|
||||
#include "gdbsupport/iterator-range.h"
|
||||
#include "gdbsupport/thread-pool.h"
|
||||
#include "dwarf2/mapped-index.h"
|
||||
#include "dwarf2/read.h"
|
||||
#include "dwarf2/tag.h"
|
||||
#include "dwarf2/abbrev-cache.h"
|
||||
#include "dwarf2/parent-map.h"
|
||||
#include "gdbsupport/range-chain.h"
|
||||
#include "gdbsupport/task-group.h"
|
||||
#include "complaints.h"
|
||||
#include "run-on-main-thread.h"
|
||||
|
||||
#if CXX_STD_THREAD
|
||||
#include <mutex>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "dwarf2/section.h"
|
||||
|
||||
struct dwarf2_per_bfd;
|
||||
struct dwarf2_per_objfile;
|
||||
|
||||
/* This represents a '.dwz' file. */
|
||||
|
||||
|
||||
@@ -17,13 +17,12 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "frame.h"
|
||||
#include "dwarf2/frame-tailcall.h"
|
||||
#include "dwarf2/loc.h"
|
||||
#include "frame-unwind.h"
|
||||
#include "block.h"
|
||||
#include "hashtab.h"
|
||||
#include "gdbtypes.h"
|
||||
#include "regcache.h"
|
||||
#include "value.h"
|
||||
#include "dwarf2/frame.h"
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "frame.h"
|
||||
#include "frame-base.h"
|
||||
#include "frame-unwind.h"
|
||||
#include "gdbcore.h"
|
||||
#include "gdbtypes.h"
|
||||
#include "symtab.h"
|
||||
#include "objfiles.h"
|
||||
@@ -37,7 +36,6 @@
|
||||
#include "dwarf2/frame.h"
|
||||
#include "dwarf2/read.h"
|
||||
#include "dwarf2/public.h"
|
||||
#include "ax.h"
|
||||
#include "dwarf2/loc.h"
|
||||
#include "dwarf2/frame-tailcall.h"
|
||||
#include "gdbsupport/gdb_binary_search.h"
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#include "dwarf2/index-write.h"
|
||||
#include "dwarf2/read.h"
|
||||
#include "dwarf2/dwz.h"
|
||||
#include "objfiles.h"
|
||||
#include "gdbsupport/selftest.h"
|
||||
#include <string>
|
||||
#include <stdlib.h>
|
||||
#include "run-on-main-thread.h"
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
#ifndef DWARF_INDEX_CACHE_H
|
||||
#define DWARF_INDEX_CACHE_H
|
||||
|
||||
#include "dwarf2/index-common.h"
|
||||
#include "gdbsupport/array-view.h"
|
||||
#include "symfile.h"
|
||||
|
||||
class dwarf2_per_bfd;
|
||||
class index_cache;
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
|
||||
#include "addrmap.h"
|
||||
#include "cli/cli-decode.h"
|
||||
#include "exceptions.h"
|
||||
#include "gdbsupport/byte-vector.h"
|
||||
#include "gdbsupport/filestuff.h"
|
||||
#include "gdbsupport/gdb_unlinker.h"
|
||||
#include "gdbsupport/pathstuff.h"
|
||||
#include "gdbsupport/scoped_fd.h"
|
||||
#include "complaints.h"
|
||||
#include "dwarf2/index-common.h"
|
||||
#include "dwarf2/cooked-index.h"
|
||||
#include "dwarf2.h"
|
||||
@@ -42,10 +42,7 @@
|
||||
#include "dwarf2/read-debug-names.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <forward_list>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#ifndef DWARF2_LINE_HEADER_H
|
||||
#define DWARF2_LINE_HEADER_H
|
||||
|
||||
#include "dwarf2/types.h"
|
||||
|
||||
/* dir_index is 1-based in DWARF 4 and before, and is 0-based in DWARF 5 and
|
||||
later. */
|
||||
typedef int dir_index;
|
||||
@@ -213,7 +215,7 @@ file_entry::include_dir (const line_header *lh) const
|
||||
and must not be freed. */
|
||||
|
||||
extern line_header_up dwarf_decode_line_header
|
||||
(sect_offset sect_off, bool is_dwz, dwarf2_per_objfile *per_objfile,
|
||||
(sect_offset sect_off, bool is_dwz, struct dwarf2_per_objfile *per_objfile,
|
||||
struct dwarf2_section_info *section, const struct comp_unit_head *cu_header,
|
||||
const char *comp_dir);
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "event-top.h"
|
||||
#include "exceptions.h"
|
||||
#include "ui-out.h"
|
||||
#include "value.h"
|
||||
#include "frame.h"
|
||||
@@ -40,7 +41,6 @@
|
||||
#include "dwarf2/frame.h"
|
||||
#include "dwarf2/leb.h"
|
||||
#include "compile/compile.h"
|
||||
#include "gdbsupport/selftest.h"
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <unordered_set>
|
||||
|
||||
@@ -21,16 +21,20 @@
|
||||
#define GDB_DWARF2_MACRO_H
|
||||
|
||||
struct buildsym_compunit;
|
||||
struct dwarf2_cu;
|
||||
struct dwarf2_per_objfile;
|
||||
struct dwarf2_section_info;
|
||||
struct line_header;
|
||||
|
||||
extern void dwarf_decode_macros (dwarf2_per_objfile *per_objfile,
|
||||
buildsym_compunit *builder,
|
||||
const dwarf2_section_info *section,
|
||||
const struct line_header *lh,
|
||||
const line_header *lh,
|
||||
unsigned int offset_size,
|
||||
unsigned int offset,
|
||||
dwarf2_section_info *str_section,
|
||||
dwarf2_section_info *str_offsets_section,
|
||||
std::optional<ULONGEST> str_offsets_base,
|
||||
int section_is_gnu, struct dwarf2_cu *cu);
|
||||
int section_is_gnu, dwarf2_cu *cu);
|
||||
|
||||
#endif /* GDB_DWARF2_MACRO_H */
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
#ifndef GDB_DWARF2_MAPPED_INDEX_H
|
||||
#define GDB_DWARF2_MAPPED_INDEX_H
|
||||
|
||||
#include "dwarf2/index-common.h"
|
||||
#include "language.h"
|
||||
#include "quick-symbol.h"
|
||||
|
||||
/* An index into a (C++) symbol name component in a symbol name as
|
||||
recorded in the mapped_index's symbol table. For each C++ symbol
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
#ifndef GDB_DWARF2_PARENT_MAP_H
|
||||
#define GDB_DWARF2_PARENT_MAP_H
|
||||
|
||||
#include <algorithm>
|
||||
#include "addrmap.h"
|
||||
#include "dwarf2/types.h"
|
||||
#include "gdbsupport/gdb_obstack.h"
|
||||
|
||||
class cooked_index_entry;
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "bfd.h"
|
||||
#include "elf-bfd.h"
|
||||
#include "event-top.h"
|
||||
#include "gdbsupport/task-group.h"
|
||||
#include "symtab.h"
|
||||
#include "gdbtypes.h"
|
||||
#include "objfiles.h"
|
||||
@@ -70,7 +71,6 @@
|
||||
#include "go-lang.h"
|
||||
#include "valprint.h"
|
||||
#include "gdbcore.h"
|
||||
#include "gdb/gdb-index.h"
|
||||
#include "gdb_bfd.h"
|
||||
#include "f-lang.h"
|
||||
#include "source.h"
|
||||
@@ -92,7 +92,6 @@
|
||||
#include <unordered_set>
|
||||
#include "dwarf2/abbrev-cache.h"
|
||||
#include "cooked-index.h"
|
||||
#include "split-name.h"
|
||||
#include "gdbsupport/thread-pool.h"
|
||||
#include "run-on-main-thread.h"
|
||||
#include "dwarf2/parent-map.h"
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "dwarf2/mapped-index.h"
|
||||
#include "dwarf2/section.h"
|
||||
#include "dwarf2/cu.h"
|
||||
#include "filename-seen-cache.h"
|
||||
#include "gdbsupport/gdb_obstack.h"
|
||||
#include "gdbsupport/hash_enum.h"
|
||||
#include "gdbsupport/function-view.h"
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "elf-none-tdep.h"
|
||||
#include "exceptions.h"
|
||||
#include "regset.h"
|
||||
#include "elf-bfd.h"
|
||||
#include "inferior.h"
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "gdbsupport/job-control.h"
|
||||
#include "run-on-main-thread.h"
|
||||
#include "top.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "auxv.h"
|
||||
#include "exceptions.h"
|
||||
#include "extract-store-integer.h"
|
||||
#include "gdbcore.h"
|
||||
#include "inferior.h"
|
||||
|
||||
@@ -40,21 +40,21 @@
|
||||
#define NCURSES_NOMACROS
|
||||
|
||||
#if defined (HAVE_NCURSESW_NCURSES_H)
|
||||
#include <ncursesw/ncurses.h>
|
||||
#include <ncursesw/ncurses.h> /* IWYU pragma: export */
|
||||
#elif defined (HAVE_NCURSES_NCURSES_H)
|
||||
#include <ncurses/ncurses.h>
|
||||
#include <ncurses/ncurses.h> /* IWYU pragma: export */
|
||||
#elif defined (HAVE_NCURSES_H)
|
||||
#include <ncurses.h>
|
||||
#include <ncurses.h> /* IWYU pragma: export */
|
||||
#elif defined (HAVE_CURSESX_H)
|
||||
#include <cursesX.h>
|
||||
#include <cursesX.h> /* IWYU pragma: export */
|
||||
#elif defined (HAVE_CURSES_H)
|
||||
#include <curses.h>
|
||||
#include <curses.h> /* IWYU pragma: export */
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_NCURSES_TERM_H)
|
||||
#include <ncurses/term.h>
|
||||
#include <ncurses/term.h> /* IWYU pragma: export */
|
||||
#elif defined (HAVE_TERM_H)
|
||||
#include <term.h>
|
||||
#include <term.h> /* IWYU pragma: export */
|
||||
#else
|
||||
/* On MinGW, a real termcap library is usually not present. Stub versions
|
||||
of the termcap functions will be built from stub-termcap.c. Readline
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "inferior.h"
|
||||
#include "infrun.h"
|
||||
#include "gdbsupport/event-loop.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "arch-utils.h"
|
||||
#include "exceptions.h"
|
||||
#include "symtab.h"
|
||||
#include "gdbtypes.h"
|
||||
#include "frame.h"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "displaced-stepping.h"
|
||||
#include "infrun.h"
|
||||
#include <ctype.h>
|
||||
#include "exceptions.h"
|
||||
#include "symtab.h"
|
||||
#include "frame.h"
|
||||
#include "inferior.h"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "gdbtypes.h"
|
||||
#include "linux-tdep.h"
|
||||
#include "auxv.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include "exceptions.h"
|
||||
#include "gdb_proc_service.h"
|
||||
#include "nat/gdb_thread_db.h"
|
||||
#include "gdbsupport/gdb_vecs.h"
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "command.h"
|
||||
#include "cli/cli-cmds.h"
|
||||
#include "linespec.h"
|
||||
#include "ui-out.h"
|
||||
|
||||
|
||||
/* The `macro' prefix command. */
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "annotate.h"
|
||||
#include "exceptions.h"
|
||||
#include "top.h"
|
||||
#include "ui.h"
|
||||
#include "target.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "arch-utils.h"
|
||||
#include "exceptions.h"
|
||||
#include "mi-cmds.h"
|
||||
#include "ui-out.h"
|
||||
#include "mi-out.h"
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "gdbsupport/function-view.h"
|
||||
#include <optional>
|
||||
#include "gdbsupport/scoped_restore.h"
|
||||
#include "mi/mi-main.h"
|
||||
|
||||
enum print_values {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "mi-interp.h"
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "interps.h"
|
||||
#include "event-top.h"
|
||||
#include "gdbsupport/event-loop.h"
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifndef MI_MI_OUT_H
|
||||
#define MI_MI_OUT_H
|
||||
|
||||
#include "ui-out.h"
|
||||
#include <vector>
|
||||
|
||||
struct ui_out;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "event-top.h"
|
||||
#include "exceptions.h"
|
||||
#include "symtab.h"
|
||||
#include "gdbtypes.h"
|
||||
#include "expression.h"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "extract-store-integer.h"
|
||||
#include "cli/cli-cmds.h"
|
||||
#include "regcache.h"
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#ifndef RECORD_FULL_H
|
||||
#define RECORD_FULL_H
|
||||
|
||||
#include "gdbsupport/scoped_restore.h"
|
||||
|
||||
extern bool record_full_memory_query;
|
||||
|
||||
extern int record_full_arch_list_add_reg (struct regcache *regcache, int num);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
#include "exceptions.h"
|
||||
#include "inferior.h"
|
||||
#include "infrun.h"
|
||||
#include "bfd.h"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "elf/common.h"
|
||||
#include "elf/mips.h"
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "extract-store-integer.h"
|
||||
#include "symtab.h"
|
||||
#include "bfd.h"
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "exceptions.h"
|
||||
#include "extract-store-integer.h"
|
||||
#include "symtab.h"
|
||||
#include "bfd.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "event-top.h"
|
||||
#include "exceptions.h"
|
||||
#include "extract-store-integer.h"
|
||||
#include "top.h"
|
||||
#include "value.h"
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
entry point. */
|
||||
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "symtab.h"
|
||||
#include "gdbcore.h"
|
||||
#include "objfiles.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "event-top.h"
|
||||
#include "exceptions.h"
|
||||
#include "symtab.h"
|
||||
#include "gdbtypes.h"
|
||||
#include "bfd.h"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "cli/cli-cmds.h"
|
||||
#include "cli/cli-script.h"
|
||||
#include "cli/cli-setshow.h"
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-data.h"
|
||||
#include "tui/tui-win.h"
|
||||
#include "tui/tui-io.h"
|
||||
#include "tui/tui-command.h"
|
||||
#include "tui/tui-wingeneral.h"
|
||||
|
||||
@@ -61,7 +57,7 @@ tui_cmd_window::resize (int height_, int width_, int origin_x, int origin_y)
|
||||
void
|
||||
tui_refresh_cmd_win (void)
|
||||
{
|
||||
WINDOW *w = TUI_CMD_WIN->handle.get ();
|
||||
WINDOW *w = tui_cmd_win ()->handle.get ();
|
||||
|
||||
tui_wrefresh (w);
|
||||
}
|
||||
|
||||
@@ -55,6 +55,14 @@ struct tui_cmd_window
|
||||
int start_line = 0;
|
||||
};
|
||||
|
||||
/* Return the instance of the command windows. */
|
||||
|
||||
inline tui_cmd_window *
|
||||
tui_cmd_win ()
|
||||
{
|
||||
return dynamic_cast<tui_cmd_window *> (tui_win_list[CMD_WIN]);
|
||||
}
|
||||
|
||||
/* Refresh the command window. */
|
||||
extern void tui_refresh_cmd_win (void);
|
||||
|
||||
|
||||
@@ -19,12 +19,10 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "symtab.h"
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-data.h"
|
||||
#include "tui/tui-win.h"
|
||||
#include "tui/tui-wingeneral.h"
|
||||
#include "tui/tui-winsource.h"
|
||||
#include "tui/tui-status.h"
|
||||
#include "gdb_curses.h"
|
||||
#include <algorithm>
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
|
||||
#include "tui/tui.h"
|
||||
#include "gdb_curses.h"
|
||||
#include "observable.h"
|
||||
#include "gdbsupport/gdb-checked-static-cast.h"
|
||||
|
||||
/* A deleter that calls delwin. */
|
||||
struct curses_deleter
|
||||
@@ -290,17 +288,6 @@ struct tui_always_visible_window : public virtual tui_win_info
|
||||
/* Global Data. */
|
||||
extern struct tui_win_info *tui_win_list[MAX_MAJOR_WINDOWS];
|
||||
|
||||
#define TUI_SRC_WIN \
|
||||
(gdb::checked_static_cast<tui_source_window *> (tui_win_list[SRC_WIN]))
|
||||
#define TUI_DISASM_WIN \
|
||||
(gdb::checked_static_cast<tui_disasm_window *> (tui_win_list[DISASSEM_WIN]))
|
||||
#define TUI_DATA_WIN \
|
||||
(gdb::checked_static_cast<tui_data_window *> (tui_win_list[DATA_WIN]))
|
||||
#define TUI_CMD_WIN \
|
||||
(dynamic_cast<tui_cmd_window *> (tui_win_list[CMD_WIN]))
|
||||
#define TUI_STATUS_WIN \
|
||||
(dynamic_cast<tui_status_window *> (tui_win_list[STATUS_WIN]))
|
||||
|
||||
/* All the windows that are currently instantiated, in layout
|
||||
order. */
|
||||
extern std::vector<tui_win_info *> tui_windows;
|
||||
|
||||
@@ -29,13 +29,9 @@
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-command.h"
|
||||
#include "tui/tui-data.h"
|
||||
#include "tui/tui-win.h"
|
||||
#include "tui/tui-layout.h"
|
||||
#include "tui/tui-winsource.h"
|
||||
#include "tui/tui-status.h"
|
||||
#include "tui/tui-file.h"
|
||||
#include "tui/tui-disasm.h"
|
||||
#include "tui/tui-source.h"
|
||||
#include "progspace.h"
|
||||
#include "objfiles.h"
|
||||
#include "cli/cli-style.h"
|
||||
@@ -43,8 +39,6 @@
|
||||
#include "gdbsupport/selftest.h"
|
||||
#include "inferior.h"
|
||||
|
||||
#include "gdb_curses.h"
|
||||
|
||||
struct tui_asm_line
|
||||
{
|
||||
CORE_ADDR addr;
|
||||
@@ -433,12 +427,12 @@ tui_get_low_disassembly_address (struct gdbarch *gdbarch,
|
||||
|
||||
/* Determine where to start the disassembly so that the pc is about
|
||||
in the middle of the viewport. */
|
||||
if (TUI_DISASM_WIN != NULL)
|
||||
pos = TUI_DISASM_WIN->height;
|
||||
else if (TUI_CMD_WIN == NULL)
|
||||
if (tui_disasm_win () != nullptr)
|
||||
pos = tui_disasm_win ()->height;
|
||||
else if (tui_cmd_win () == nullptr)
|
||||
pos = tui_term_height () / 2 - 2;
|
||||
else
|
||||
pos = tui_term_height () - TUI_CMD_WIN->height - 2;
|
||||
pos = tui_term_height () - tui_cmd_win ()->height - 2;
|
||||
pos = (pos - 2) / 2;
|
||||
|
||||
pc = tui_find_disassembly_address (gdbarch, pc, -pos);
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#ifndef TUI_TUI_DISASM_H
|
||||
#define TUI_TUI_DISASM_H
|
||||
|
||||
#include "gdbsupport/gdb-checked-static-cast.h"
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-data.h"
|
||||
#include "tui-winsource.h"
|
||||
@@ -64,6 +65,15 @@ private:
|
||||
bool addr_is_displayed (CORE_ADDR addr) const;
|
||||
};
|
||||
|
||||
/* Return the instance of the disassembly windows. */
|
||||
|
||||
inline tui_disasm_window *
|
||||
tui_disasm_win ()
|
||||
{
|
||||
return gdb::checked_static_cast<tui_disasm_window *>
|
||||
(tui_win_list[DISASSEM_WIN]);
|
||||
}
|
||||
|
||||
extern void tui_get_begin_asm_address (struct gdbarch **, CORE_ADDR *);
|
||||
|
||||
#endif /* TUI_TUI_DISASM_H */
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "tui/tui-file.h"
|
||||
#include "tui/tui-io.h"
|
||||
#include "tui/tui-command.h"
|
||||
#include "tui.h"
|
||||
|
||||
void
|
||||
tui_file::puts (const char *linebuffer)
|
||||
|
||||
@@ -19,18 +19,11 @@
|
||||
|
||||
#include "symtab.h"
|
||||
#include "inferior.h"
|
||||
#include "command.h"
|
||||
#include "bfd.h"
|
||||
#include "symfile.h"
|
||||
#include "objfiles.h"
|
||||
#include "target.h"
|
||||
#include "gdbcore.h"
|
||||
#include "gdbsupport/event-loop.h"
|
||||
#include "event-top.h"
|
||||
#include "frame.h"
|
||||
#include "breakpoint.h"
|
||||
#include "ui-out.h"
|
||||
#include "top.h"
|
||||
#include "observable.h"
|
||||
#include "source.h"
|
||||
#include <unistd.h>
|
||||
@@ -38,16 +31,11 @@
|
||||
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-hooks.h"
|
||||
#include "tui/tui-data.h"
|
||||
#include "tui/tui-layout.h"
|
||||
#include "tui/tui-io.h"
|
||||
#include "tui/tui-regs.h"
|
||||
#include "tui/tui-win.h"
|
||||
#include "tui/tui-status.h"
|
||||
#include "tui/tui-winsource.h"
|
||||
|
||||
#include "gdb_curses.h"
|
||||
|
||||
static void
|
||||
tui_new_objfile_hook (struct objfile* objfile)
|
||||
{
|
||||
@@ -71,7 +59,7 @@ tui_register_changed (const frame_info_ptr &frame, int regno)
|
||||
up in the other. So we always use the selected frame here, and ignore
|
||||
FRAME. */
|
||||
fi = get_selected_frame (NULL);
|
||||
TUI_DATA_WIN->check_register_values (fi);
|
||||
tui_data_win ()->check_register_values (fi);
|
||||
}
|
||||
|
||||
/* Breakpoint creation hook.
|
||||
@@ -132,7 +120,7 @@ tui_refresh_frame_and_register_information ()
|
||||
|
||||
/* Refresh the register window if it's visible. */
|
||||
if (tui_is_window_visible (DATA_WIN))
|
||||
TUI_DATA_WIN->check_register_values (fi);
|
||||
tui_data_win ()->check_register_values (fi);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -21,16 +21,11 @@
|
||||
#include "interps.h"
|
||||
#include "ui.h"
|
||||
#include "event-top.h"
|
||||
#include "gdbsupport/event-loop.h"
|
||||
#include "ui-out.h"
|
||||
#include "cli-out.h"
|
||||
#include "tui/tui-data.h"
|
||||
#include "tui/tui-win.h"
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-io.h"
|
||||
#include "infrun.h"
|
||||
#include "observable.h"
|
||||
#include "gdbthread.h"
|
||||
#include "inferior.h"
|
||||
#include "main.h"
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "target.h"
|
||||
#include "gdbsupport/event-loop.h"
|
||||
#include "event-top.h"
|
||||
#include "command.h"
|
||||
#include "top.h"
|
||||
#include "ui.h"
|
||||
#include "tui/tui.h"
|
||||
@@ -164,7 +164,7 @@ do_tui_putc (WINDOW *w, char c)
|
||||
static void
|
||||
update_cmdwin_start_line ()
|
||||
{
|
||||
TUI_CMD_WIN->start_line = getcury (TUI_CMD_WIN->handle.get ());
|
||||
tui_cmd_win ()->start_line = getcury (tui_cmd_win ()->handle.get ());
|
||||
}
|
||||
|
||||
/* Print a character in the curses command window. The output is
|
||||
@@ -174,7 +174,7 @@ update_cmdwin_start_line ()
|
||||
static void
|
||||
tui_putc (char c)
|
||||
{
|
||||
do_tui_putc (TUI_CMD_WIN->handle.get (), c);
|
||||
do_tui_putc (tui_cmd_win ()->handle.get (), c);
|
||||
update_cmdwin_start_line ();
|
||||
}
|
||||
|
||||
@@ -457,7 +457,7 @@ void
|
||||
tui_puts (const char *string, WINDOW *w)
|
||||
{
|
||||
if (w == nullptr)
|
||||
w = TUI_CMD_WIN->handle.get ();
|
||||
w = tui_cmd_win ()->handle.get ();
|
||||
|
||||
while (true)
|
||||
{
|
||||
@@ -508,7 +508,7 @@ tui_puts (const char *string, WINDOW *w)
|
||||
string = next;
|
||||
}
|
||||
|
||||
if (TUI_CMD_WIN != nullptr && w == TUI_CMD_WIN->handle.get ())
|
||||
if (tui_cmd_win () != nullptr && w == tui_cmd_win ()->handle.get ())
|
||||
update_cmdwin_start_line ();
|
||||
}
|
||||
|
||||
@@ -552,7 +552,7 @@ tui_puts_internal (WINDOW *w, const char *string, int *height)
|
||||
}
|
||||
}
|
||||
|
||||
if (TUI_CMD_WIN != nullptr && w == TUI_CMD_WIN->handle.get ())
|
||||
if (tui_cmd_win () != nullptr && w == tui_cmd_win ()->handle.get ())
|
||||
update_cmdwin_start_line ();
|
||||
if (saw_nl)
|
||||
wrefresh (w);
|
||||
@@ -582,8 +582,8 @@ tui_redisplay_readline (void)
|
||||
|
||||
int c_pos = -1;
|
||||
int c_line = -1;
|
||||
WINDOW *w = TUI_CMD_WIN->handle.get ();
|
||||
int start_line = TUI_CMD_WIN->start_line;
|
||||
WINDOW *w = tui_cmd_win ()->handle.get ();
|
||||
int start_line = tui_cmd_win ()->start_line;
|
||||
wmove (w, start_line, 0);
|
||||
int height = 1;
|
||||
if (prompt != nullptr)
|
||||
@@ -623,17 +623,17 @@ tui_redisplay_readline (void)
|
||||
waddch (w, c);
|
||||
}
|
||||
if (c == '\n')
|
||||
TUI_CMD_WIN->start_line = getcury (w);
|
||||
tui_cmd_win ()->start_line = getcury (w);
|
||||
int col = getcurx (w);
|
||||
if (col < prev_col)
|
||||
height++;
|
||||
prev_col = col;
|
||||
}
|
||||
wclrtobot (w);
|
||||
TUI_CMD_WIN->start_line = getcury (w);
|
||||
tui_cmd_win ()->start_line = getcury (w);
|
||||
if (c_line >= 0)
|
||||
wmove (w, c_line, c_pos);
|
||||
TUI_CMD_WIN->start_line -= height - 1;
|
||||
tui_cmd_win ()->start_line -= height - 1;
|
||||
|
||||
wrefresh (w);
|
||||
fflush(stdout);
|
||||
@@ -708,7 +708,7 @@ tui_mld_puts (const struct match_list_displayer *displayer, const char *s)
|
||||
static void
|
||||
tui_mld_flush (const struct match_list_displayer *displayer)
|
||||
{
|
||||
wrefresh (TUI_CMD_WIN->handle.get ());
|
||||
wrefresh (tui_cmd_win ()->handle.get ());
|
||||
}
|
||||
|
||||
/* TUI version of displayer.erase_entire_line. */
|
||||
@@ -716,7 +716,7 @@ tui_mld_flush (const struct match_list_displayer *displayer)
|
||||
static void
|
||||
tui_mld_erase_entire_line (const struct match_list_displayer *displayer)
|
||||
{
|
||||
WINDOW *w = TUI_CMD_WIN->handle.get ();
|
||||
WINDOW *w = tui_cmd_win ()->handle.get ();
|
||||
int cur_y = getcury (w);
|
||||
|
||||
wmove (w, cur_y, 0);
|
||||
@@ -754,7 +754,7 @@ gdb_wgetch (WINDOW *win)
|
||||
static int
|
||||
tui_mld_getc (FILE *fp)
|
||||
{
|
||||
WINDOW *w = TUI_CMD_WIN->handle.get ();
|
||||
WINDOW *w = tui_cmd_win ()->handle.get ();
|
||||
int c = gdb_wgetch (w);
|
||||
|
||||
return c;
|
||||
@@ -1036,7 +1036,7 @@ tui_inject_newline_into_command_window ()
|
||||
{
|
||||
gdb_assert (tui_active);
|
||||
|
||||
WINDOW *w = TUI_CMD_WIN->handle.get ();
|
||||
WINDOW *w = tui_cmd_win ()->handle.get ();
|
||||
|
||||
/* When hitting return with an empty input, gdb executes the last
|
||||
command. If we emit a newline, this fills up the command window
|
||||
@@ -1061,8 +1061,8 @@ tui_inject_newline_into_command_window ()
|
||||
int px, py;
|
||||
getyx (w, py, px);
|
||||
px += rl_end - rl_point;
|
||||
py += px / TUI_CMD_WIN->width;
|
||||
px %= TUI_CMD_WIN->width;
|
||||
py += px / tui_cmd_win ()->width;
|
||||
px %= tui_cmd_win ()->width;
|
||||
wmove (w, py, px);
|
||||
tui_putc ('\n');
|
||||
}
|
||||
@@ -1096,7 +1096,7 @@ tui_getc_1 (FILE *fp)
|
||||
int ch;
|
||||
WINDOW *w;
|
||||
|
||||
w = TUI_CMD_WIN->handle.get ();
|
||||
w = tui_cmd_win ()->handle.get ();
|
||||
|
||||
#ifdef TUI_USE_PIPE_FOR_READLINE
|
||||
/* Flush readline output. */
|
||||
|
||||
@@ -19,15 +19,11 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "arch-utils.h"
|
||||
#include "command.h"
|
||||
#include "symtab.h"
|
||||
#include "frame.h"
|
||||
#include "source.h"
|
||||
#include "cli/cli-cmds.h"
|
||||
#include "cli/cli-decode.h"
|
||||
#include "cli/cli-utils.h"
|
||||
#include <ctype.h>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "tui/tui.h"
|
||||
@@ -37,7 +33,6 @@
|
||||
#include "tui/tui-status.h"
|
||||
#include "tui/tui-regs.h"
|
||||
#include "tui/tui-win.h"
|
||||
#include "tui/tui-winsource.h"
|
||||
#include "tui/tui-disasm.h"
|
||||
#include "tui/tui-layout.h"
|
||||
#include "tui/tui-source.h"
|
||||
@@ -79,8 +74,8 @@ tui_apply_current_layout (bool preserve_cmd_win_size_p)
|
||||
tui_win_list[win_type] = nullptr;
|
||||
|
||||
/* This should always be made visible by a layout. */
|
||||
gdb_assert (TUI_CMD_WIN != nullptr);
|
||||
gdb_assert (TUI_CMD_WIN->is_visible ());
|
||||
gdb_assert (tui_cmd_win () != nullptr);
|
||||
gdb_assert (tui_cmd_win ()->is_visible ());
|
||||
|
||||
/* Get the new list of currently visible windows. */
|
||||
std::vector<tui_win_info *> new_tui_windows;
|
||||
@@ -132,7 +127,7 @@ tui_set_layout (tui_layout_split *layout)
|
||||
|
||||
std::string new_fingerprint = applied_layout->layout_fingerprint ();
|
||||
bool preserve_command_window_size
|
||||
= (TUI_CMD_WIN != nullptr && old_fingerprint == new_fingerprint);
|
||||
= (tui_cmd_win () != nullptr && old_fingerprint == new_fingerprint);
|
||||
|
||||
tui_apply_current_layout (preserve_command_window_size);
|
||||
}
|
||||
@@ -233,10 +228,10 @@ void
|
||||
tui_regs_layout ()
|
||||
{
|
||||
/* If there's already a register window, we're done. */
|
||||
if (TUI_DATA_WIN != nullptr)
|
||||
if (tui_data_win () != nullptr)
|
||||
return;
|
||||
|
||||
tui_set_layout (TUI_DISASM_WIN != nullptr
|
||||
tui_set_layout (tui_disasm_win () != nullptr
|
||||
? asm_regs_layout
|
||||
: src_regs_layout);
|
||||
}
|
||||
@@ -261,9 +256,9 @@ tui_remove_some_windows ()
|
||||
{
|
||||
/* Try leaving the source or disassembly window. If neither
|
||||
exists, just do nothing. */
|
||||
focus = TUI_SRC_WIN;
|
||||
focus = tui_src_win ();
|
||||
if (focus == nullptr)
|
||||
focus = TUI_DISASM_WIN;
|
||||
focus = tui_disasm_win ();
|
||||
if (focus == nullptr)
|
||||
return;
|
||||
}
|
||||
@@ -817,7 +812,7 @@ tui_layout_split::apply (int x_, int y_, int width_, int height_,
|
||||
int prev = -1;
|
||||
for (int i = 0; i < m_splits.size (); ++i)
|
||||
{
|
||||
bool cmd_win_already_exists = TUI_CMD_WIN != nullptr;
|
||||
bool cmd_win_already_exists = tui_cmd_win () != nullptr;
|
||||
|
||||
/* Always call get_sizes, to ensure that the window is
|
||||
instantiated. This is a bit gross but less gross than adding
|
||||
@@ -841,8 +836,8 @@ tui_layout_split::apply (int x_, int y_, int width_, int height_,
|
||||
that the resizing step, below, does the right thing with
|
||||
this window. */
|
||||
info[i].min_size = (m_vertical
|
||||
? TUI_CMD_WIN->height
|
||||
: TUI_CMD_WIN->width);
|
||||
? tui_cmd_win ()->height
|
||||
: tui_cmd_win ()->width);
|
||||
info[i].max_size = info[i].min_size;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@ public:
|
||||
virtual std::unique_ptr<tui_layout_base> clone () const = 0;
|
||||
|
||||
/* Change the size and location of this layout. When
|
||||
PRESERVE_CMD_WIN_SIZE_P is true the current size of the TUI_CMD_WIN
|
||||
is preserved, otherwise, the TUI_CMD_WIN will resize just like any
|
||||
PRESERVE_CMD_WIN_SIZE_P is true the current size of the command window
|
||||
is preserved, otherwise, the command window will resize just like any
|
||||
other window. */
|
||||
virtual void apply (int x, int y, int width, int height,
|
||||
bool preserve_cmd_win_size_p) = 0;
|
||||
@@ -350,8 +350,8 @@ extern void tui_regs_layout ();
|
||||
extern void tui_remove_some_windows ();
|
||||
|
||||
/* Apply the current layout. When PRESERVE_CMD_WIN_SIZE_P is true the
|
||||
current size of the TUI_CMD_WIN is preserved, otherwise, the TUI_CMD_WIN
|
||||
will resize just like any other window. */
|
||||
current size of the command window is preserved, otherwise, the command
|
||||
window will resize just like any other window. */
|
||||
extern void tui_apply_current_layout (bool);
|
||||
|
||||
/* Adjust the window height of WIN to NEW_HEIGHT. */
|
||||
|
||||
@@ -15,9 +15,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-status.h"
|
||||
#include "tui/tui-data.h"
|
||||
#include "tui/tui-location.h"
|
||||
#include "symtab.h"
|
||||
#include "source.h"
|
||||
|
||||
@@ -18,11 +18,6 @@
|
||||
#ifndef TUI_TUI_LOCATION_H
|
||||
#define TUI_TUI_LOCATION_H
|
||||
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui.h"
|
||||
#include "gdb_curses.h"
|
||||
#include "observable.h"
|
||||
|
||||
/* Class used to track the current location that the TUI is displaying. An
|
||||
instance of this class will be created; as events occur within GDB the
|
||||
location information within this instance will be updated. As windows
|
||||
|
||||
@@ -21,10 +21,7 @@
|
||||
|
||||
#include "arch-utils.h"
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-data.h"
|
||||
#include "symtab.h"
|
||||
#include "gdbtypes.h"
|
||||
#include "cli/cli-cmds.h"
|
||||
#include "frame.h"
|
||||
#include "regcache.h"
|
||||
#include "inferior.h"
|
||||
@@ -32,11 +29,8 @@
|
||||
#include "tui/tui-layout.h"
|
||||
#include "tui/tui-win.h"
|
||||
#include "tui/tui-wingeneral.h"
|
||||
#include "tui/tui-file.h"
|
||||
#include "tui/tui-regs.h"
|
||||
#include "tui/tui-io.h"
|
||||
#include "reggroups.h"
|
||||
#include "valprint.h"
|
||||
#include "completer.h"
|
||||
|
||||
#include "gdb_curses.h"
|
||||
@@ -515,11 +509,11 @@ tui_reg_command (const char *args, int from_tty)
|
||||
/* Make sure the register window is visible. If not, select an
|
||||
appropriate layout. We need to do this before trying to run the
|
||||
'next' or 'prev' commands. */
|
||||
if (TUI_DATA_WIN == NULL || !TUI_DATA_WIN->is_visible ())
|
||||
if (tui_data_win () == nullptr || !tui_data_win ()->is_visible ())
|
||||
tui_regs_layout ();
|
||||
|
||||
const reggroup *match = nullptr;
|
||||
const reggroup *current_group = TUI_DATA_WIN->get_current_group ();
|
||||
const reggroup *current_group = tui_data_win ()->get_current_group ();
|
||||
if (strncmp (args, "next", len) == 0)
|
||||
match = tui_reg_next (current_group, gdbarch);
|
||||
else if (strncmp (args, "prev", len) == 0)
|
||||
@@ -543,7 +537,7 @@ tui_reg_command (const char *args, int from_tty)
|
||||
if (match == NULL)
|
||||
error (_("unknown register group '%s'"), args);
|
||||
|
||||
TUI_DATA_WIN->set_register_group (match);
|
||||
tui_data_win ()->set_register_group (match);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#ifndef TUI_TUI_REGS_H
|
||||
#define TUI_TUI_REGS_H
|
||||
|
||||
#include "gdbsupport/gdb-checked-static-cast.h"
|
||||
#include "tui/tui-data.h"
|
||||
#include "reggroups.h"
|
||||
|
||||
@@ -145,4 +146,12 @@ private:
|
||||
gdbarch *m_gdbarch = nullptr;
|
||||
};
|
||||
|
||||
/* Return the instance of the registers window. */
|
||||
|
||||
inline tui_data_window *
|
||||
tui_data_win ()
|
||||
{
|
||||
return gdb::checked_static_cast<tui_data_window *> (tui_win_list[DATA_WIN]);
|
||||
}
|
||||
|
||||
#endif /* TUI_TUI_REGS_H */
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <math.h>
|
||||
#include <ctype.h>
|
||||
#include "symtab.h"
|
||||
#include "frame.h"
|
||||
#include "breakpoint.h"
|
||||
@@ -28,16 +27,11 @@
|
||||
#include "objfiles.h"
|
||||
#include "filenames.h"
|
||||
#include "source-cache.h"
|
||||
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-data.h"
|
||||
#include "tui/tui-io.h"
|
||||
#include "tui/tui-status.h"
|
||||
#include "tui/tui-win.h"
|
||||
#include "tui/tui-winsource.h"
|
||||
#include "tui/tui-source.h"
|
||||
#include "tui/tui-location.h"
|
||||
#include "gdb_curses.h"
|
||||
|
||||
/* Function to display source in the source window. */
|
||||
bool
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#ifndef TUI_TUI_SOURCE_H
|
||||
#define TUI_TUI_SOURCE_H
|
||||
|
||||
#include "gdbsupport/gdb-checked-static-cast.h"
|
||||
#include "tui/tui-data.h"
|
||||
#include "tui-winsource.h"
|
||||
|
||||
@@ -82,4 +83,12 @@ private:
|
||||
gdb::unique_xmalloc_ptr<char> m_fullname;
|
||||
};
|
||||
|
||||
/* Return the instance of the source window. */
|
||||
|
||||
inline tui_source_window *
|
||||
tui_src_win ()
|
||||
{
|
||||
return gdb::checked_static_cast<tui_source_window *> (tui_win_list[SRC_WIN]);
|
||||
}
|
||||
|
||||
#endif /* TUI_TUI_SOURCE_H */
|
||||
|
||||
@@ -20,21 +20,17 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "symtab.h"
|
||||
#include "breakpoint.h"
|
||||
#include "frame.h"
|
||||
#include "command.h"
|
||||
#include "inferior.h"
|
||||
#include "target.h"
|
||||
#include "top.h"
|
||||
#include "gdb-demangle.h"
|
||||
#include "source.h"
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-data.h"
|
||||
#include "tui/tui-status.h"
|
||||
#include "tui/tui-wingeneral.h"
|
||||
#include "tui/tui-source.h"
|
||||
#include "tui/tui-winsource.h"
|
||||
#include "tui/tui-file.h"
|
||||
#include "tui/tui-location.h"
|
||||
|
||||
#include "gdb_curses.h"
|
||||
@@ -315,7 +311,7 @@ void
|
||||
tui_show_status_content ()
|
||||
{
|
||||
if (tui_is_window_visible (STATUS_WIN))
|
||||
TUI_STATUS_WIN->rerender ();
|
||||
tui_status_win ()->rerender ();
|
||||
}
|
||||
|
||||
/* Command to update the display with the current execution point. */
|
||||
|
||||
@@ -50,6 +50,14 @@ private:
|
||||
std::string make_status_line () const;
|
||||
};
|
||||
|
||||
/* Return the instance of the status window. */
|
||||
|
||||
inline tui_status_window *
|
||||
tui_status_win ()
|
||||
{
|
||||
return dynamic_cast<tui_status_window *> (tui_win_list[STATUS_WIN]);
|
||||
}
|
||||
|
||||
extern void tui_show_status_content (void);
|
||||
extern void tui_show_frame_info (const frame_info_ptr &);
|
||||
|
||||
|
||||
@@ -26,14 +26,10 @@
|
||||
|
||||
#include "command.h"
|
||||
#include "symtab.h"
|
||||
#include "breakpoint.h"
|
||||
#include "frame.h"
|
||||
#include "cli/cli-cmds.h"
|
||||
#include "cli/cli-style.h"
|
||||
#include "top.h"
|
||||
#include "source.h"
|
||||
#include "gdbsupport/event-loop.h"
|
||||
#include "async-event.h"
|
||||
#include "ui-out.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include "tui/tui.h"
|
||||
@@ -42,8 +38,6 @@
|
||||
#include "tui/tui-data.h"
|
||||
#include "tui/tui-layout.h"
|
||||
#include "tui/tui-wingeneral.h"
|
||||
#include "tui/tui-status.h"
|
||||
#include "tui/tui-regs.h"
|
||||
#include "tui/tui-disasm.h"
|
||||
#include "tui/tui-source.h"
|
||||
#include "tui/tui-winsource.h"
|
||||
@@ -54,8 +48,6 @@
|
||||
#include "readline/readline.h"
|
||||
#include <string_view>
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
static void tui_set_tab_width_command (const char *, int);
|
||||
static void tui_refresh_all_command (const char *, int);
|
||||
static void tui_all_windows_info (const char *, int);
|
||||
@@ -202,10 +194,10 @@ static void
|
||||
set_style_tui_current_position (const char *ignore, int from_tty,
|
||||
cmd_list_element *c)
|
||||
{
|
||||
if (TUI_SRC_WIN != nullptr)
|
||||
TUI_SRC_WIN->refill ();
|
||||
if (TUI_DISASM_WIN != nullptr)
|
||||
TUI_DISASM_WIN->refill ();
|
||||
if (tui_src_win () != nullptr)
|
||||
tui_src_win ()->refill ();
|
||||
if (tui_disasm_win () != nullptr)
|
||||
tui_disasm_win ()->refill ();
|
||||
}
|
||||
|
||||
/* Tui internal configuration variables. These variables are updated
|
||||
@@ -423,8 +415,8 @@ tui_update_gdb_sizes (void)
|
||||
|
||||
if (tui_active)
|
||||
{
|
||||
width = TUI_CMD_WIN->width;
|
||||
height = TUI_CMD_WIN->height;
|
||||
width = tui_cmd_win ()->width;
|
||||
height = tui_cmd_win ()->height;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -512,7 +504,7 @@ tui_resize_all (void)
|
||||
resize_term (screenheight, screenwidth);
|
||||
#endif
|
||||
/* Turn keypad off while we resize. */
|
||||
keypad (TUI_CMD_WIN->handle.get (), FALSE);
|
||||
keypad (tui_cmd_win ()->handle.get (), FALSE);
|
||||
tui_update_gdb_sizes ();
|
||||
tui_set_term_height_to (screenheight);
|
||||
tui_set_term_width_to (screenwidth);
|
||||
@@ -525,7 +517,7 @@ tui_resize_all (void)
|
||||
window to resize proportionately with containing terminal, rather
|
||||
than maintaining a fixed size. */
|
||||
tui_apply_current_layout (false); /* Turn keypad back on. */
|
||||
keypad (TUI_CMD_WIN->handle.get (), TRUE);
|
||||
keypad (tui_cmd_win ()->handle.get (), TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -861,8 +853,8 @@ static void
|
||||
tui_set_compact_source (const char *ignore, int from_tty,
|
||||
struct cmd_list_element *c)
|
||||
{
|
||||
if (TUI_SRC_WIN != nullptr)
|
||||
TUI_SRC_WIN->refill ();
|
||||
if (tui_src_win () != nullptr)
|
||||
tui_src_win ()->refill ();
|
||||
}
|
||||
|
||||
/* Callback for "show tui compact-source". */
|
||||
@@ -1080,7 +1072,7 @@ parse_scrolling_args (const char *arg,
|
||||
error (_("Unrecognized window `%s'"), wname);
|
||||
if (!(*win_to_scroll)->is_visible ())
|
||||
error (_("Window is not visible"));
|
||||
else if (*win_to_scroll == TUI_CMD_WIN)
|
||||
else if (*win_to_scroll == tui_cmd_win ())
|
||||
*win_to_scroll = *(tui_source_windows ().begin ());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,12 +19,10 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-data.h"
|
||||
#include "tui/tui-io.h"
|
||||
#include "tui/tui-wingeneral.h"
|
||||
#include "tui/tui-win.h"
|
||||
#include "tui/tui-status.h"
|
||||
#include "cli/cli-style.h"
|
||||
|
||||
#include "gdb_curses.h"
|
||||
|
||||
@@ -19,14 +19,13 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <ctype.h>
|
||||
#include "observable.h"
|
||||
#include "symtab.h"
|
||||
#include "frame.h"
|
||||
#include "breakpoint.h"
|
||||
#include "value.h"
|
||||
#include "source.h"
|
||||
#include "objfiles.h"
|
||||
#include "filenames.h"
|
||||
#include "gdbsupport/gdb-safe-ctype.h"
|
||||
|
||||
#include "tui/tui.h"
|
||||
@@ -34,7 +33,6 @@
|
||||
#include "tui/tui-io.h"
|
||||
#include "tui/tui-status.h"
|
||||
#include "tui/tui-win.h"
|
||||
#include "tui/tui-wingeneral.h"
|
||||
#include "tui/tui-winsource.h"
|
||||
#include "tui/tui-source.h"
|
||||
#include "tui/tui-disasm.h"
|
||||
@@ -465,7 +463,7 @@ tui_source_window_base::rerender ()
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
|
||||
struct symtab *s = find_pc_line_symtab (get_frame_pc (frame));
|
||||
if (this != TUI_SRC_WIN)
|
||||
if (this != tui_src_win ())
|
||||
find_line_pc (s, cursal.line, &cursal.pc);
|
||||
|
||||
/* This centering code is copied from tui_source_window::maybe_update.
|
||||
@@ -498,7 +496,7 @@ tui_source_window_base::refill ()
|
||||
{
|
||||
symtab_and_line sal {};
|
||||
|
||||
if (this == TUI_SRC_WIN)
|
||||
if (this == tui_src_win ())
|
||||
{
|
||||
sal = get_current_source_symtab_and_line ();
|
||||
if (sal.symtab == NULL)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#ifndef TUI_TUI_WINSOURCE_H
|
||||
#define TUI_TUI_WINSOURCE_H
|
||||
|
||||
#include "gdbsupport/observable.h"
|
||||
#include "tui/tui-data.h"
|
||||
#include "symtab.h"
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
|
||||
#include "event-top.h"
|
||||
#include "cli/cli-cmds.h"
|
||||
#include "exceptions.h"
|
||||
#include "tui/tui.h"
|
||||
#include "tui/tui-hooks.h"
|
||||
#include "tui/tui-command.h"
|
||||
#include "tui/tui-data.h"
|
||||
#include "tui/tui-layout.h"
|
||||
#include "tui/tui-io.h"
|
||||
#include "tui/tui-regs.h"
|
||||
#include "tui/tui-status.h"
|
||||
#include "tui/tui-win.h"
|
||||
#include "tui/tui-wingeneral.h"
|
||||
@@ -35,18 +35,13 @@
|
||||
#include "tui/tui-source.h"
|
||||
#include "target.h"
|
||||
#include "frame.h"
|
||||
#include "breakpoint.h"
|
||||
#include "inferior.h"
|
||||
#include "symtab.h"
|
||||
#include "source.h"
|
||||
#include "terminal.h"
|
||||
#include "top.h"
|
||||
#include "ui.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include "gdb_curses.h"
|
||||
#include "interps.h"
|
||||
@@ -469,9 +464,9 @@ tui_enable (void)
|
||||
|
||||
tui_show_frame_info (deprecated_safe_get_selected_frame ());
|
||||
tui_set_initial_layout ();
|
||||
tui_set_win_focus_to (TUI_SRC_WIN);
|
||||
keypad (TUI_CMD_WIN->handle.get (), TRUE);
|
||||
wrefresh (TUI_CMD_WIN->handle.get ());
|
||||
tui_set_win_focus_to (tui_src_win ());
|
||||
keypad (tui_cmd_win ()->handle.get (), TRUE);
|
||||
wrefresh (tui_cmd_win ()->handle.get ());
|
||||
tui_finish_init = false;
|
||||
}
|
||||
else
|
||||
@@ -594,11 +589,11 @@ bool
|
||||
tui_get_command_dimension (unsigned int *width,
|
||||
unsigned int *height)
|
||||
{
|
||||
if (!tui_active || (TUI_CMD_WIN == NULL))
|
||||
if (!tui_active || (tui_cmd_win () == NULL))
|
||||
return false;
|
||||
|
||||
*width = TUI_CMD_WIN->width;
|
||||
*height = TUI_CMD_WIN->height;
|
||||
*width = tui_cmd_win ()->width;
|
||||
*height = tui_cmd_win ()->height;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
1
gdb/ui.h
1
gdb/ui.h
@@ -21,6 +21,7 @@
|
||||
#include "gdbsupport/event-loop.h"
|
||||
#include "gdbsupport/intrusive_list.h"
|
||||
#include "gdbsupport/next-iterator.h"
|
||||
#include "gdbsupport/scoped_restore.h"
|
||||
|
||||
struct interp;
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "gdbsupport/scoped_restore.h"
|
||||
#include "gdbsupport/selftest.h"
|
||||
#include "ui-file.h"
|
||||
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
#ifndef UTILS_H
|
||||
#define UTILS_H
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "gdbsupport/array-view.h"
|
||||
#include "gdbsupport/function-view.h"
|
||||
#include "gdbsupport/scoped_restore.h"
|
||||
#include <chrono>
|
||||
|
||||
struct completion_match_for_lcd;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
/* Originally by Steve Chamberlain, sac@cygnus.com */
|
||||
|
||||
#include "exceptions.h"
|
||||
#include "frame.h"
|
||||
#include "inferior.h"
|
||||
#include "infrun.h"
|
||||
|
||||
Reference in New Issue
Block a user