diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-02-10 19:08:19 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-02-10 19:08:19 +0000 |
commit | 6a83354a43c2dc48a253ee15eb62ccd1a8cd1b48 (patch) | |
tree | ebb759b9cd5f1820cb1719a711fc04653840d8c8 | |
parent | 997470efab22c205bacdd7e0b207b53cdae3e936 (diff) | |
download | fsf-binutils-gdb-6a83354a43c2dc48a253ee15eb62ccd1a8cd1b48.zip fsf-binutils-gdb-6a83354a43c2dc48a253ee15eb62ccd1a8cd1b48.tar.gz fsf-binutils-gdb-6a83354a43c2dc48a253ee15eb62ccd1a8cd1b48.tar.bz2 |
2004-02-10 Andrew Cagney <cagney@redhat.com>
* defs.h: Do not include "tui.h".
* gdb_curses.h: New file.
* tui/tui-hooks.h: New file.
* tui/tui.h (tui_update_all_exec_infos): Delete declaration.
(tui_install_hooks, tui_remove_hooks): Delete declarations.
(tui_initialize_io): Delete declaration.
(tui_initialize_readline: Delete redundant declaration.
(struct tui_point): Delete definition.
* tui/tui-data.h (struct tui_point): Define.
* cli/cli-decode.c [TUI]: Include "tui/tui.h".
* utils.c: Include "tui/tui.h".
* tui/tui-data.h: Include "tui/tui.h" and "gdb_curses.h".
* printcmd.c [TUI]: Include "tui/tui.h".
* cli/cli-cmds.c [TUI]: Include "tui/tui.h".
* tui/tui-command.c: Include "gdb_curses.h".
* tui/tui.c, tui/tui-winsource.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-windata.c, tui/tui-win.c, tui/tui-stack.c: Ditto.
* tui/tui-source.c, tui/tui-regs.c, tui/tui-layout.c: Ditto.
* tui/tui-io.c, tui/tui-disasm.c, tui/tui-data.c: : Ditto.
* tui/tui-hooks.c: Include "tui-hooks.h" and "gdb_curses.h".
* Makefile.in: Update all dependencies.
(tui_hooks_h, gdb_curses_h): Define.
(SUBDIR_TUI_CFLAGS): Remove -I${srcdir}/tui.
-rw-r--r-- | gdb/ChangeLog | 26 | ||||
-rw-r--r-- | gdb/Makefile.in | 71 | ||||
-rw-r--r-- | gdb/cli/cli-cmds.c | 4 | ||||
-rw-r--r-- | gdb/cli/cli-decode.c | 4 | ||||
-rw-r--r-- | gdb/defs.h | 4 | ||||
-rw-r--r-- | gdb/printcmd.c | 4 | ||||
-rw-r--r-- | gdb/tui/tui-command.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-data.c | 9 | ||||
-rw-r--r-- | gdb/tui/tui-data.h | 13 | ||||
-rw-r--r-- | gdb/tui/tui-disasm.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-hooks.c | 9 | ||||
-rw-r--r-- | gdb/tui/tui-hooks.h | 28 | ||||
-rw-r--r-- | gdb/tui/tui-io.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-layout.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-regs.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-source.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-stack.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-win.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-windata.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-wingeneral.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-winsource.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui.c | 9 | ||||
-rw-r--r-- | gdb/tui/tui.h | 17 | ||||
-rw-r--r-- | gdb/utils.c | 4 |
24 files changed, 132 insertions, 158 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6feb91b..0c8a1ff 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,29 @@ +2004-02-10 Andrew Cagney <cagney@redhat.com> + + * defs.h: Do not include "tui.h". + * gdb_curses.h: New file. + * tui/tui-hooks.h: New file. + * tui/tui.h (tui_update_all_exec_infos): Delete declaration. + (tui_install_hooks, tui_remove_hooks): Delete declarations. + (tui_initialize_io): Delete declaration. + (tui_initialize_readline: Delete redundant declaration. + (struct tui_point): Delete definition. + * tui/tui-data.h (struct tui_point): Define. + * cli/cli-decode.c [TUI]: Include "tui/tui.h". + * utils.c: Include "tui/tui.h". + * tui/tui-data.h: Include "tui/tui.h" and "gdb_curses.h". + * printcmd.c [TUI]: Include "tui/tui.h". + * cli/cli-cmds.c [TUI]: Include "tui/tui.h". + * tui/tui-command.c: Include "gdb_curses.h". + * tui/tui.c, tui/tui-winsource.c, tui/tui-wingeneral.c: Ditto. + * tui/tui-windata.c, tui/tui-win.c, tui/tui-stack.c: Ditto. + * tui/tui-source.c, tui/tui-regs.c, tui/tui-layout.c: Ditto. + * tui/tui-io.c, tui/tui-disasm.c, tui/tui-data.c: : Ditto. + * tui/tui-hooks.c: Include "tui-hooks.h" and "gdb_curses.h". + * Makefile.in: Update all dependencies. + (tui_hooks_h, gdb_curses_h): Define. + (SUBDIR_TUI_CFLAGS): Remove -I${srcdir}/tui. + 2004-02-10 Elena Zannoni <ezannoni@redhat.com> * objfiles.h (struct objfile): Remove unused fields auxf1 and diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 17bcb03..03536cf 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -217,7 +217,7 @@ SUBDIR_TUI_SRCS = \ SUBDIR_TUI_DEPS = SUBDIR_TUI_LDFLAGS= SUBDIR_TUI_CFLAGS= \ - -DTUI=1 -I${srcdir}/tui + -DTUI=1 # Opcodes currently live in one of two places. Either they are in the @@ -645,8 +645,8 @@ cp_abi_h = cp-abi.h cp_support_h = cp-support.h $(symtab_h) dcache_h = dcache.h defs_h = defs.h $(config_h) $(ansidecl_h) $(gdb_locale_h) $(gdb_signals_h) \ - $(libiberty_h) $(progress_h) $(bfd_h) $(tui_h) $(ui_file_h) $(xm_h) \ - $(nm_h) $(tm_h) $(fopen_same_h) $(gdbarch_h) + $(libiberty_h) $(progress_h) $(bfd_h) $(ui_file_h) $(xm_h) $(nm_h) \ + $(tm_h) $(fopen_same_h) $(gdbarch_h) dictionary_h = dictionary.h disasm_h = disasm.h doublest_h = doublest.h $(floatformat_h) @@ -667,6 +667,7 @@ gdbarch_h = gdbarch.h gdb_assert_h = gdb_assert.h gdbcmd_h = gdbcmd.h $(command_h) $(ui_out_h) gdbcore_h = gdbcore.h $(bfd_h) +gdb_curses_h = gdb_curses.h gdb_dirent_h = gdb_dirent.h gdb_events_h = gdb-events.h gdb_h = gdb.h @@ -802,10 +803,11 @@ mi_parse_h = $(srcdir)/mi/mi-parse.h # tui_command_h = $(srcdir)/tui/tui-command.h -tui_data_h = $(srcdir)/tui/tui-data.h +tui_data_h = $(srcdir)/tui/tui-data.h $(tui_h) $(gdb_curses_h) tui_disasm_h = $(srcdir)/tui/tui-disasm.h $(tui_h) $(tui_data_h) tui_file_h = $(srcdir)/tui/tui-file.h tui_h = $(srcdir)/tui/tui.h +tui_hooks_h = $(srcdir)/tui/tui-hooks.h tui_io_h = $(srcdir)/tui/tui-io.h tui_layout_h = $(srcdir)/tui/tui-layout.h $(tui_h) $(tui_data_h) tui_regs_h = $(srcdir)/tui/tui-regs.h $(tui_data_h) @@ -2082,12 +2084,11 @@ mipsread.o: mipsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ $(libecoff_h) $(elf_common_h) $(elf_mips_h) mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \ $(frame_h) $(inferior_h) $(symtab_h) $(value_h) $(gdbcmd_h) \ - $(language_h) $(gdbcore_h) $(symfile_h) $(objfiles_h) \ - $(gdbtypes_h) $(target_h) $(arch_utils_h) $(regcache_h) \ - $(osabi_h) $(mips_tdep_h) $(block_h) $(reggroups_h) \ - $(opcode_mips_h) $(elf_mips_h) $(elf_bfd_h) $(symcat_h) \ - $(sim_regno_h) $(dis_asm_h) $(frame_unwind_h) $(frame_base_h) \ - $(trad_frame_h) + $(language_h) $(gdbcore_h) $(symfile_h) $(objfiles_h) $(gdbtypes_h) \ + $(target_h) $(arch_utils_h) $(regcache_h) $(osabi_h) $(mips_tdep_h) \ + $(block_h) $(reggroups_h) $(opcode_mips_h) $(elf_mips_h) \ + $(elf_bfd_h) $(symcat_h) $(sim_regno_h) $(dis_asm_h) \ + $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \ $(regcache_h) $(gregset_h) mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \ @@ -2165,7 +2166,7 @@ printcmd.o: printcmd.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \ $(gdbtypes_h) $(value_h) $(language_h) $(expression_h) $(gdbcore_h) \ $(gdbcmd_h) $(target_h) $(breakpoint_h) $(demangle_h) $(valprint_h) \ $(annotate_h) $(symfile_h) $(objfiles_h) $(completer_h) $(ui_out_h) \ - $(gdb_assert_h) $(block_h) $(disasm_h) + $(gdb_assert_h) $(block_h) $(disasm_h) $(tui_h) proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) $(completer_h) $(gdb_wait_h) \ $(proc_utils_h) proc-events.o: proc-events.c $(defs_h) @@ -2460,7 +2461,7 @@ ui-out.o: ui-out.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \ user-regs.o: user-regs.c $(defs_h) $(user_regs_h) $(gdbtypes_h) \ $(gdb_string_h) $(gdb_assert_h) $(frame_h) utils.o: utils.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(event_top_h) \ - $(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) $(demangle_h) \ + $(tui_h) $(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) $(demangle_h) \ $(expression_h) $(language_h) $(charset_h) $(annotate_h) \ $(filenames_h) $(inferior_h) uw-thread.o: uw-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \ @@ -2536,11 +2537,11 @@ cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(defs_h) $(completer_h) $(target_h) \ $(linespec_h) $(expression_h) $(frame_h) $(value_h) $(language_h) \ $(filenames_h) $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) \ $(top_h) $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) \ - $(cli_cmds_h) + $(cli_cmds_h) $(tui_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \ $(gdb_regex_h) $(gdb_string_h) $(ui_out_h) $(cli_cmds_h) \ - $(cli_decode_h) $(gdb_assert_h) + $(cli_decode_h) $(tui_h) $(gdb_assert_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-decode.c cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) \ $(cli_decode_h) $(cli_cmds_h) $(value_h) $(completer_h) \ @@ -2801,22 +2802,22 @@ signals.o: $(srcdir)/signals/signals.c $(server_h) $(defs_h) $(target_h) \ # Need to explicitly specify the compile rule as make will do nothing # or try to compile the object file into the sub-directory. -tui.o: $(srcdir)/tui/tui.c $(defs_h) $(gdbcmd_h) $(tui_h) $(tui_data_h) \ - $(tui_layout_h) $(tui_io_h) $(tui_regs_h) $(tui_stack_h) \ - $(tui_win_h) $(tui_winsource_h) $(tui_windata_h) $(readline_h) \ - $(target_h) $(frame_h) $(breakpoint_h) $(inferior_h) $(symtab_h) \ - $(source_h) +tui.o: $(srcdir)/tui/tui.c $(defs_h) $(gdbcmd_h) $(tui_h) $(tui_hooks_h) \ + $(tui_data_h) $(tui_layout_h) $(tui_io_h) $(tui_regs_h) \ + $(tui_stack_h) $(tui_win_h) $(tui_winsource_h) $(tui_windata_h) \ + $(readline_h) $(target_h) $(frame_h) $(breakpoint_h) $(inferior_h) \ + $(symtab_h) $(source_h) $(gdb_curses_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui.c tui-command.o: $(srcdir)/tui/tui-command.c $(defs_h) $(tui_h) $(tui_data_h) \ - $(tui_win_h) $(tui_io_h) + $(tui_win_h) $(tui_io_h) $(gdb_curses_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-command.c tui-data.o: $(srcdir)/tui/tui-data.c $(defs_h) $(symtab_h) $(tui_h) \ - $(tui_data_h) $(tui_wingeneral_h) $(gdb_string_h) + $(tui_data_h) $(tui_wingeneral_h) $(gdb_string_h) $(gdb_curses_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-data.c tui-disasm.o: $(srcdir)/tui/tui-disasm.c $(defs_h) $(symtab_h) \ $(breakpoint_h) $(frame_h) $(value_h) $(source_h) $(disasm_h) \ $(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_win_h) $(tui_layout_h) \ - $(tui_winsource_h) $(tui_stack_h) $(tui_file_h) + $(tui_winsource_h) $(tui_stack_h) $(tui_file_h) $(gdb_curses_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-disasm.c tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(ui_file_h) $(tui_file_h) \ $(tui_io_h) $(tui_h) $(gdb_string_h) @@ -2825,8 +2826,9 @@ tui-hooks.o: $(srcdir)/tui/tui-hooks.c $(defs_h) $(symtab_h) $(inferior_h) \ $(command_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) \ $(gdbcore_h) $(event_loop_h) $(event_top_h) $(frame_h) \ $(breakpoint_h) $(gdb_events_h) $(ui_out_h) $(top_h) $(tui_h) \ - $(tui_data_h) $(tui_layout_h) $(tui_io_h) $(tui_regs_h) $(tui_win_h) \ - $(tui_stack_h) $(tui_windata_h) $(tui_winsource_h) + $(tui_hooks_h) $(tui_data_h) $(tui_layout_h) $(tui_io_h) \ + $(tui_regs_h) $(tui_win_h) $(tui_stack_h) $(tui_windata_h) \ + $(tui_winsource_h) $(gdb_curses_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-hooks.c tui-interp.o: $(srcdir)/tui/tui-interp.c $(defs_h) $(interps_h) $(top_h) \ $(event_top_h) $(event_loop_h) $(ui_out_h) $(cli_out_h) \ @@ -2835,12 +2837,13 @@ tui-interp.o: $(srcdir)/tui/tui-interp.c $(defs_h) $(interps_h) $(top_h) \ tui-io.o: $(srcdir)/tui/tui-io.c $(defs_h) $(terminal_h) $(target_h) \ $(event_loop_h) $(event_top_h) $(command_h) $(top_h) $(readline_h) \ $(tui_h) $(tui_data_h) $(tui_io_h) $(tui_command_h) $(tui_win_h) \ - $(tui_wingeneral_h) $(tui_file_h) $(ui_out_h) $(cli_out_h) + $(tui_wingeneral_h) $(tui_file_h) $(ui_out_h) $(cli_out_h) \ + $(gdb_curses_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-io.c tui-layout.o: $(srcdir)/tui/tui-layout.c $(defs_h) $(command_h) $(symtab_h) \ $(frame_h) $(source_h) $(tui_h) $(tui_data_h) $(tui_windata_h) \ $(tui_wingeneral_h) $(tui_stack_h) $(tui_regs_h) $(tui_win_h) \ - $(tui_winsource_h) $(tui_disasm_h) + $(tui_winsource_h) $(tui_disasm_h) $(gdb_curses_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-layout.c tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \ $(gdb_string_h) $(gdb_assert_h) @@ -2848,33 +2851,35 @@ tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \ tui-regs.o: $(srcdir)/tui/tui-regs.c $(defs_h) $(tui_h) $(tui_data_h) \ $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(frame_h) $(regcache_h) \ $(inferior_h) $(target_h) $(gdb_string_h) $(tui_layout_h) \ - $(tui_win_h) $(tui_windata_h) $(tui_wingeneral_h) $(tui_file_h) + $(tui_win_h) $(tui_windata_h) $(tui_wingeneral_h) $(tui_file_h) \ + $(gdb_curses_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-regs.c tui-source.o: $(srcdir)/tui/tui-source.c $(defs_h) $(symtab_h) $(frame_h) \ $(breakpoint_h) $(source_h) $(symtab_h) $(tui_h) $(tui_data_h) \ - $(tui_stack_h) $(tui_winsource_h) $(tui_source_h) + $(tui_stack_h) $(tui_winsource_h) $(tui_source_h) $(gdb_curses_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-source.c tui-stack.o: $(srcdir)/tui/tui-stack.c $(defs_h) $(symtab_h) $(breakpoint_h) \ $(frame_h) $(command_h) $(inferior_h) $(target_h) $(top_h) \ $(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_stack_h) \ - $(tui_wingeneral_h) $(tui_source_h) $(tui_winsource_h) $(tui_file_h) + $(tui_wingeneral_h) $(tui_source_h) $(tui_winsource_h) $(tui_file_h) \ + $(gdb_curses_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-stack.c tui-win.o: $(srcdir)/tui/tui-win.c $(defs_h) $(command_h) $(symtab_h) \ $(breakpoint_h) $(frame_h) $(cli_cmds_h) $(top_h) $(source_h) \ $(tui_h) $(tui_data_h) $(tui_wingeneral_h) $(tui_stack_h) \ $(tui_regs_h) $(tui_disasm_h) $(tui_source_h) $(tui_winsource_h) \ - $(tui_windata_h) $(gdb_string_h) + $(tui_windata_h) $(gdb_curses_h) $(gdb_string_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-win.c tui-windata.o: $(srcdir)/tui/tui-windata.c $(defs_h) $(tui_h) $(tui_data_h) \ - $(tui_wingeneral_h) $(tui_regs_h) + $(tui_wingeneral_h) $(tui_regs_h) $(gdb_curses_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-windata.c tui-wingeneral.o: $(srcdir)/tui/tui-wingeneral.c $(defs_h) $(tui_h) \ - $(tui_data_h) $(tui_wingeneral_h) $(tui_win_h) + $(tui_data_h) $(tui_wingeneral_h) $(tui_win_h) $(gdb_curses_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-wingeneral.c tui-winsource.o: $(srcdir)/tui/tui-winsource.c $(defs_h) $(symtab_h) \ $(frame_h) $(breakpoint_h) $(value_h) $(source_h) $(tui_h) \ $(tui_data_h) $(tui_stack_h) $(tui_win_h) $(tui_wingeneral_h) \ - $(tui_winsource_h) $(tui_source_h) $(tui_disasm_h) + $(tui_winsource_h) $(tui_source_h) $(tui_disasm_h) $(gdb_curses_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-winsource.c # diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 70cec17..7cd6047 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -46,6 +46,10 @@ #include "cli/cli-setshow.h" #include "cli/cli-cmds.h" +#ifdef TUI +#include "tui/tui.h" /* For tui_active et.al. */ +#endif + #ifndef GDBINIT_FILENAME #define GDBINIT_FILENAME ".gdbinit" #endif diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index 24965688e..43f2f25 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -29,6 +29,10 @@ #include "cli/cli-cmds.h" #include "cli/cli-decode.h" +#ifdef TUI +#include "tui/tui.h" /* For tui_active et.al. */ +#endif + #include "gdb_assert.h" /* Prototypes for local functions */ @@ -457,10 +457,6 @@ extern struct ui_file *gdb_stdtarg; extern struct ui_file *gdb_stdtargerr; extern struct ui_file *gdb_stdtargin; -#if defined(TUI) -#include "tui.h" -#endif - #include "ui-file.h" /* More generic printf like operations. Filtered versions may return diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 2767ec7..1cea480 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -44,6 +44,10 @@ #include "block.h" #include "disasm.h" +#ifdef TUI +#include "tui/tui.h" /* For tui_active et.al. */ +#endif + extern int asm_demangle; /* Whether to demangle syms in asm printouts */ extern int addressprint; /* Whether to print hex addresses in HLL " */ diff --git a/gdb/tui/tui-command.c b/gdb/tui/tui-command.c index a182b4c..bdb96e2 100644 --- a/gdb/tui/tui-command.c +++ b/gdb/tui/tui-command.c @@ -29,13 +29,7 @@ #include "tui/tui-win.h" #include "tui/tui-io.h" -#ifdef HAVE_NCURSES_H -#include <ncurses.h> -#else -#ifdef HAVE_CURSES_H -#include <curses.h> -#endif -#endif +#include "gdb_curses.h" /***************************************** diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c index 1f41023..2b6faa3 100644 --- a/gdb/tui/tui-data.c +++ b/gdb/tui/tui-data.c @@ -29,14 +29,7 @@ #include "tui/tui-wingeneral.h" #include "gdb_string.h" - -#ifdef HAVE_NCURSES_H -#include <ncurses.h> -#else -#ifdef HAVE_CURSES_H -#include <curses.h> -#endif -#endif +#include "gdb_curses.h" /**************************** ** GLOBAL DECLARATIONS diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index 8628172..dd8c230 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -25,11 +25,14 @@ #ifndef TUI_DATA_H #define TUI_DATA_H -#if defined (HAVE_NCURSES_H) -#include <ncurses.h> -#elif defined (HAVE_CURSES_H) -#include <curses.h> -#endif +#include "tui/tui.h" /* For enum tui_win_type. */ +#include "gdb_curses.h" /* For WINDOW. */ + +/* This is a point definition. */ +struct tui_point +{ + int x, y; +}; /* Generic window information */ struct tui_gen_win_info diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c index a431121..19226b3 100644 --- a/gdb/tui/tui-disasm.c +++ b/gdb/tui/tui-disasm.c @@ -38,13 +38,7 @@ #include "tui/tui-stack.h" #include "tui/tui-file.h" -#ifdef HAVE_NCURSES_H -#include <ncurses.h> -#else -#ifdef HAVE_CURSES_H -#include <curses.h> -#endif -#endif +#include "gdb_curses.h" struct tui_asm_line { diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c index 43519d0..fbdf5bf 100644 --- a/gdb/tui/tui-hooks.c +++ b/gdb/tui/tui-hooks.c @@ -40,6 +40,7 @@ #include <fcntl.h> #include "tui/tui.h" +#include "tui/tui-hooks.h" #include "tui/tui-data.h" #include "tui/tui-layout.h" #include "tui/tui-io.h" @@ -49,13 +50,7 @@ #include "tui/tui-windata.h" #include "tui/tui-winsource.h" -#ifdef HAVE_NCURSES_H -#include <ncurses.h> -#else -#ifdef HAVE_CURSES_H -#include <curses.h> -#endif -#endif +#include "gdb_curses.h" int tui_target_has_run = 0; diff --git a/gdb/tui/tui-hooks.h b/gdb/tui/tui-hooks.h new file mode 100644 index 0000000..fa1137d --- /dev/null +++ b/gdb/tui/tui-hooks.h @@ -0,0 +1,28 @@ +/* External/Public TUI hools header file, for GDB the GNU debugger. + + Copyright 2004 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef TUI_HOOKS_H +#define TUI_HOOKS_H + +extern void tui_install_hooks (void); +extern void tui_remove_hooks (void); + +#endif diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c index 6ca2bee..addb3b0 100644 --- a/gdb/tui/tui-io.c +++ b/gdb/tui/tui-io.c @@ -43,13 +43,7 @@ #include <signal.h> #include <stdio.h> -#ifdef HAVE_NCURSES_H -#include <ncurses.h> -#else -#ifdef HAVE_CURSES_H -#include <curses.h> -#endif -#endif +#include "gdb_curses.h" int key_is_start_sequence (int ch) diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 341d3cd..4e3de8f 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -39,13 +39,7 @@ #include "tui/tui-winsource.h" #include "tui/tui-disasm.h" -#ifdef HAVE_NCURSES_H -#include <ncurses.h> -#else -#ifdef HAVE_CURSES_H -#include <curses.h> -#endif -#endif +#include "gdb_curses.h" /******************************* ** Static Local Decls diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index d3ff1eb..7ce92c2 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -39,13 +39,7 @@ #include "tui/tui-wingeneral.h" #include "tui/tui-file.h" -#ifdef HAVE_NCURSES_H -#include <ncurses.h> -#else -#ifdef HAVE_CURSES_H -#include <curses.h> -#endif -#endif +#include "gdb_curses.h" /***************************************** ** LOCAL DEFINITIONS ** diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c index f97de2f..5a148a6 100644 --- a/gdb/tui/tui-source.c +++ b/gdb/tui/tui-source.c @@ -36,13 +36,7 @@ #include "tui/tui-winsource.h" #include "tui/tui-source.h" -#ifdef HAVE_NCURSES_H -#include <ncurses.h> -#else -#ifdef HAVE_CURSES_H -#include <curses.h> -#endif -#endif +#include "gdb_curses.h" /* Function to display source in the source window. */ enum tui_status diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c index 7285dab..0ee5389 100644 --- a/gdb/tui/tui-stack.c +++ b/gdb/tui/tui-stack.c @@ -39,13 +39,7 @@ #include "tui/tui-winsource.h" #include "tui/tui-file.h" -#ifdef HAVE_NCURSES_H -#include <ncurses.h> -#else -#ifdef HAVE_CURSES_H -#include <curses.h> -#endif -#endif +#include "gdb_curses.h" /* Get a printable name for the function at the address. The symbol name is demangled if demangling is turned on. diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index 3950a7c..afd4b10 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -46,13 +46,7 @@ #include "tui/tui-winsource.h" #include "tui/tui-windata.h" -#ifdef HAVE_NCURSES_H -#include <ncurses.h> -#else -#ifdef HAVE_CURSES_H -#include <curses.h> -#endif -#endif +#include "gdb_curses.h" #include "gdb_string.h" #include <ctype.h> diff --git a/gdb/tui/tui-windata.c b/gdb/tui/tui-windata.c index 6f22d0c..a69fb03 100644 --- a/gdb/tui/tui-windata.c +++ b/gdb/tui/tui-windata.c @@ -28,13 +28,7 @@ #include "tui/tui-wingeneral.h" #include "tui/tui-regs.h" -#ifdef HAVE_NCURSES_H -#include <ncurses.h> -#else -#ifdef HAVE_CURSES_H -#include <curses.h> -#endif -#endif +#include "gdb_curses.h" /***************************************** diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index 1bd9460..3dc62d5 100644 --- a/gdb/tui/tui-wingeneral.c +++ b/gdb/tui/tui-wingeneral.c @@ -28,13 +28,7 @@ #include "tui/tui-wingeneral.h" #include "tui/tui-win.h" -#ifdef HAVE_NCURSES_H -#include <ncurses.h> -#else -#ifdef HAVE_CURSES_H -#include <curses.h> -#endif -#endif +#include "gdb_curses.h" /*********************** ** PUBLIC FUNCTIONS diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 6b77c40..6a2b9cf 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -39,13 +39,7 @@ #include "tui/tui-source.h" #include "tui/tui-disasm.h" -#ifdef HAVE_NCURSES_H -#include <ncurses.h> -#else -#ifdef HAVE_CURSES_H -#include <curses.h> -#endif -#endif +#include "gdb_curses.h" /* Function to display the "main" routine. */ void diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index c05c8f9..2da728f 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -38,6 +38,7 @@ #include "defs.h" #include "gdbcmd.h" #include "tui/tui.h" +#include "tui/tui-hooks.h" #include "tui/tui-data.h" #include "tui/tui-layout.h" #include "tui/tui-io.h" @@ -54,13 +55,7 @@ #include "symtab.h" #include "source.h" -#ifdef HAVE_NCURSES_H -#include <ncurses.h> -#else -#ifdef HAVE_CURSES_H -#include <curses.h> -#endif -#endif +#include "gdb_curses.h" /* Tells whether the TUI is active or not. */ int tui_active = 0; diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h index 9ba1a35..d7b741c 100644 --- a/gdb/tui/tui.h +++ b/gdb/tui/tui.h @@ -54,12 +54,6 @@ enum tui_win_type UNDEFINED_WIN /* LAST */ }; -/* This is a point definition. */ -struct tui_point -{ - int x, y; -}; - /* GENERAL TUI FUNCTIONS */ /* tui.c */ extern CORE_ADDR tui_get_low_disassembly_address (CORE_ADDR, CORE_ADDR); @@ -94,15 +88,8 @@ extern enum tui_key_mode tui_current_key_mode; /* Change the TUI key mode by installing the appropriate readline keymap. */ extern void tui_set_key_mode (enum tui_key_mode mode); -extern void tui_initialize_io (void); - -extern void tui_initialize_readline (void); - extern int tui_active; -extern void tui_install_hooks (void); -extern void tui_remove_hooks (void); - extern void tui_show_source (const char *file, int line); extern struct ui_out *tui_out_new (struct ui_file *stream); @@ -110,8 +97,4 @@ extern struct ui_out *tui_out_new (struct ui_file *stream); /* tui-layout.c */ extern enum tui_status tui_set_layout_for_display_command (const char *name); -/* tui-winsource.c */ -extern void tui_update_all_exec_infos (void); - #endif - diff --git a/gdb/utils.c b/gdb/utils.c index 556486b..e99164c 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -27,6 +27,10 @@ #include "gdb_string.h" #include "event-top.h" +#ifdef TUI +#include "tui/tui.h" /* For tui_get_command_dimension. */ +#endif + #ifdef __GO32__ #include <pc.h> #endif |