* tuiWin.c, tuiWin.h, tui.c, tui.h, tuiCommand.c: Add FSF copyright.
tuiCommand.h, tuiIO.c, tuiIO.h, tuiData.h, tuiData.c: Likewise.
tuiDataWin.c, tuiDataWin.h, tuiDisassem.c, tuiDisassem.h: Likewise.
tuiGeneralWin.c, tuiGeneralWin.h, tuiLayout.c, tuiLayout.h: Likewise.
tuiRegs.c, tuiRegs.h, tuiSource.c, tuiSource.h: Likewise.
tuiSouceWin.c, tuiSourceWin.h, tuiStack.c, tuiStack.h: Likewise.
2001-07-14 21:01:25 +02:00
|
|
|
/* TUI layout window management.
|
2002-03-01 07:19:28 +01:00
|
|
|
|
2010-01-01 08:32:07 +01:00
|
|
|
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007, 2008, 2009,
|
|
|
|
2010 Free Software Foundation, Inc.
|
2002-03-01 07:19:28 +01:00
|
|
|
|
* tuiWin.c, tuiWin.h, tui.c, tui.h, tuiCommand.c: Add FSF copyright.
tuiCommand.h, tuiIO.c, tuiIO.h, tuiData.h, tuiData.c: Likewise.
tuiDataWin.c, tuiDataWin.h, tuiDisassem.c, tuiDisassem.h: Likewise.
tuiGeneralWin.c, tuiGeneralWin.h, tuiLayout.c, tuiLayout.h: Likewise.
tuiRegs.c, tuiRegs.h, tuiSource.c, tuiSource.h: Likewise.
tuiSouceWin.c, tuiSourceWin.h, tuiStack.c, tuiStack.h: Likewise.
2001-07-14 21:01:25 +02:00
|
|
|
Contributed by Hewlett-Packard Company.
|
1999-04-16 03:35:26 +02:00
|
|
|
|
* tuiWin.c, tuiWin.h, tui.c, tui.h, tuiCommand.c: Add FSF copyright.
tuiCommand.h, tuiIO.c, tuiIO.h, tuiData.h, tuiData.c: Likewise.
tuiDataWin.c, tuiDataWin.h, tuiDisassem.c, tuiDisassem.h: Likewise.
tuiGeneralWin.c, tuiGeneralWin.h, tuiLayout.c, tuiLayout.h: Likewise.
tuiRegs.c, tuiRegs.h, tuiSource.c, tuiSource.h: Likewise.
tuiSouceWin.c, tuiSourceWin.h, tuiStack.c, tuiStack.h: Likewise.
2001-07-14 21:01:25 +02:00
|
|
|
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
|
2007-08-23 20:08:50 +02:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
* tuiWin.c, tuiWin.h, tui.c, tui.h, tuiCommand.c: Add FSF copyright.
tuiCommand.h, tuiIO.c, tuiIO.h, tuiData.h, tuiData.c: Likewise.
tuiDataWin.c, tuiDataWin.h, tuiDisassem.c, tuiDisassem.h: Likewise.
tuiGeneralWin.c, tuiGeneralWin.h, tuiLayout.c, tuiLayout.h: Likewise.
tuiRegs.c, tuiRegs.h, tuiSource.c, tuiSource.h: Likewise.
tuiSouceWin.c, tuiSourceWin.h, tuiStack.c, tuiStack.h: Likewise.
2001-07-14 21:01:25 +02:00
|
|
|
(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
|
2007-08-23 20:08:50 +02:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
#include "defs.h"
|
2010-03-20 06:17:10 +01:00
|
|
|
#include "arch-utils.h"
|
1999-04-16 03:35:26 +02:00
|
|
|
#include "command.h"
|
|
|
|
#include "symtab.h"
|
|
|
|
#include "frame.h"
|
2002-09-30 02:52:27 +02:00
|
|
|
#include "source.h"
|
2001-07-18 00:22:40 +02:00
|
|
|
#include <ctype.h>
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-01-19 05:31:53 +01:00
|
|
|
#include "tui/tui.h"
|
|
|
|
#include "tui/tui-data.h"
|
|
|
|
#include "tui/tui-windata.h"
|
|
|
|
#include "tui/tui-wingeneral.h"
|
|
|
|
#include "tui/tui-stack.h"
|
|
|
|
#include "tui/tui-regs.h"
|
|
|
|
#include "tui/tui-win.h"
|
|
|
|
#include "tui/tui-winsource.h"
|
|
|
|
#include "tui/tui-disasm.h"
|
2008-02-21 Pedro Alves <pedro@codesorcery.com>
Silence a few -Wmissing-prototypes warnings.
PR build/9877:
* amd64-nat.c: Include "amd64-nat.h".
* fork-child.c (_initialize_fork_child): Ditto.
* gcore.c (_initialize_gcore): Ditto.
* inf-ptrace.c: Include "inf-ptrace.h".
(inf_ptrace_store_registers): Make it static.
* linux-nat.c (linux_nat_terminal_ours): Make it static.
(_initialize_linux_nat): Declare before definition.
* linux-tdep.c: Include "linux-tdep.h".
* linux-thread-db.c (_initialize_thread_db): Declare before
definition.
* proc-service.c (_initialize_proc_service): Ditto.
* remote.c (remote_send_printf): Make it static.
* solib.c: Include "solib.h".
* symfile-mem.c (_initialize_symfile_mem): Declare before
definition.
* ada-lang.c (ada_la_decode, ada_match_name)
(ada_suppress_symbol_printing, ada_is_array_type)
(ada_value_ptr_subscript, ada_array_length)
(ada_to_static_fixed_value): Make them static.
(_initialize_ada_language): Declare before definition.
* ada-tasks.c (ada_get_task_number, ada_get_environment_task)
(ada_task_list_changed, ada_new_objfile_observer): Make them
static.
(_initialize_tasks): Declare before definition.
* addrmap.c (_initialize_addrmap): Declare before definition.
* auxv.c (default_auxv_parse): Make it static.
* bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
them static.
* breakpoint.c (remove_sal): Add line break.
(expand_line_sal_maybe): Make it static.
* cp-name-parser.y: Include "cp-support.h".
* cp-valprint.c (cp_find_class_member): Make it static.
* eval.c (value_f90_subarray): Ditto.
* exceptions.c (print_any_exception): Ditto.
* findcmd.c (_initialize_mem_search): Declare before definition.
* frame.c (frame_observer_target_changed): Make it static.
* gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
* inf-child.c: Include "inf-child.h".
* inferior.h (valid_inferior_id): Rename to ...
(valid_gdb_inferior_id): ... this.
* infrun.c (infrun_thread_stop_requested, siginfo_make_value):
Make them static.
* jv-lang.c (java_language_arch_info): Make it static.
* m2-typeprint.c (m2_get_discrete_bounds): Ditto.
* osdata.c (info_osdata_command): Make it static.
* regcache.c (regcache_observer_target_changed): Make it static.
* reverse.c (_initialize_reverse): Declare before definition.
* stabsread.c (cleanup_undefined_types_noname)
(cleanup_undefined_types_1): Make them static.
* symfile.c (place_section): Make it static.
* symtab.c (find_pc_sect_psymtab_closer): Make it static.
* target-descriptions.c (_initialize_target_descriptions): Declare
before definition.
* target.c (default_get_ada_task_ptid, find_default_can_async_p)
(find_default_is_async_p, find_default_supports_non_stop): Make
them static.
(target_supports_non_stop): Add prototype.
(dummy_pid_to_str): Make it static.
* utils.c (_initialize_utils): Declare before definition.
* ada-exp.y (_initialize_ada_exp): Declare before definition.
* solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
* target.h (struct target_ops): Add a prototype to the
to_can_execute_reverse callback.
* macroscope.c (_initialize_macroscope): Declare before definition.
* cp-namespace.c (_initialize_cp_namespace): Declare before definition.
* python/python.c (_initialize_python): Declare before definition.
* tui/tui-command.c: Include "tui/tui-command.h".
* tui/tui-data.c (init_content_element, init_win_info): Make them
static.
* tui/tui-disasm.c: Include "tui/tui-disasm.h".
* tui/tui-interp.c (_initialize_tui_interp): Declare before
definition.
* tui/tui-layout.c: Include "tui/tui-layout.h".
(_initialize_tui_layout): Declare before definition.
* tui/tui-regs.c: Include "tui/tui-regs.h".
(tui_display_reg_element_at_line): Make it static.
(_initialize_tui_regs): Declare before definition.
* tui/tui-stack.c (_initialize_tui_stack): Declare before
definition.
* tui/tui-win.c: Include "tui/tui-win.h".
(_initialize_tui_win): Declare before definition.
(tui_sigwinch_handler): Make it static. Wrap in ifdef SIGWINCH.
* tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
(tui_get_cmd_list): Add a prototype.
* tui/tui-windata.c: Include tui-windata.h.
* tui/tui-wingeneral.c (box_win): Make it static.
* cli/cli-logging.c (show_logging_command): Make it static.
(_initialize_cli_logging): Declare before definition.
* mi/mi-common.c (_initialize_gdb_mi_common): Declare before
definition.
2009-02-21 17:14:50 +01:00
|
|
|
#include "tui/tui-layout.h"
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-16 22:05:09 +01:00
|
|
|
#include "gdb_string.h"
|
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 20:08:19 +01:00
|
|
|
#include "gdb_curses.h"
|
2003-06-22 17:21:39 +02:00
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
/*******************************
|
|
|
|
** Static Local Decls
|
|
|
|
********************************/
|
2004-02-08 01:05:16 +01:00
|
|
|
static void show_layout (enum tui_layout_type);
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
static void init_gen_win_info (struct tui_gen_win_info *,
|
|
|
|
enum tui_win_type,
|
|
|
|
int, int, int, int);
|
|
|
|
static void *init_and_make_win (void *, enum tui_win_type,
|
|
|
|
int, int, int, int, int);
|
2004-02-08 01:05:16 +01:00
|
|
|
static void show_source_or_disasm_and_command (enum tui_layout_type);
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
static void make_source_or_disasm_window (struct tui_win_info **,
|
|
|
|
enum tui_win_type,
|
|
|
|
int, int);
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-hooks.c, tui-layout.c,
tui-regs.c, tui-source.c, tui-stack.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-wingeneral.h, tui-winsource.c, tui.c,
tui-winsource.h: Whitespace changes, fix pointer declarations
to be consistant.
2007-08-14 22:23:29 +02:00
|
|
|
static void make_command_window (struct tui_win_info **, int, int);
|
|
|
|
static void make_source_window (struct tui_win_info **, int, int);
|
|
|
|
static void make_disasm_window (struct tui_win_info **, int, int);
|
|
|
|
static void make_data_window (struct tui_win_info **, int, int);
|
2004-02-08 01:05:16 +01:00
|
|
|
static void show_source_command (void);
|
|
|
|
static void show_disasm_command (void);
|
|
|
|
static void show_source_disasm_command (void);
|
|
|
|
static void show_data (enum tui_layout_type);
|
|
|
|
static enum tui_layout_type next_layout (void);
|
|
|
|
static enum tui_layout_type prev_layout (void);
|
|
|
|
static void tui_layout_command (char *, int);
|
|
|
|
static void tui_toggle_layout_command (char *, int);
|
|
|
|
static void tui_toggle_split_layout_command (char *, int);
|
2009-07-02 19:17:42 +02:00
|
|
|
static void extract_display_start_addr (struct gdbarch **, CORE_ADDR *);
|
2004-02-08 01:05:16 +01:00
|
|
|
static void tui_handle_xdb_layout (struct tui_layout_def *);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
/***************************************
|
|
|
|
** DEFINITIONS
|
|
|
|
***************************************/
|
|
|
|
|
|
|
|
#define LAYOUT_USAGE "Usage: layout prev | next | <layout_name> \n"
|
|
|
|
|
2002-08-24 17:25:25 +02:00
|
|
|
/* Show the screen layout defined. */
|
|
|
|
static void
|
2004-02-08 01:05:16 +01:00
|
|
|
show_layout (enum tui_layout_type layout)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
enum tui_layout_type cur_layout = tui_current_layout ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
if (layout != cur_layout)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2007-08-14 23:39:22 +02:00
|
|
|
/* Since the new layout may cause changes in window size, we
|
|
|
|
should free the content and reallocate on next display of
|
|
|
|
source/asm. */
|
2004-02-07 05:40:36 +01:00
|
|
|
tui_free_all_source_wins_content ();
|
|
|
|
tui_clear_source_windows ();
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
go at beginning of new line.
2007-08-15 02:19:44 +02:00
|
|
|
if (layout == SRC_DATA_COMMAND
|
|
|
|
|| layout == DISASSEM_DATA_COMMAND)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
show_data (layout);
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_refresh_all (tui_win_list);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-data.h, tui-disasm.c, tui-file.c,
tui-hooks.c, tui-interp.c, tui-io.c, tui-layout.c, tui-out.c,
tui-regs.c, tui-regs.h, tui-source.c, tui-stack.c, tui-win.c,
tui-windata.c, tui-wingeneral.c, tui-winsource.c, tui-winsource.h,
tui.c, tui.h: Comment reformatting to coding standard (capitals,
spaces after periods, etc).
2007-08-14 23:20:09 +02:00
|
|
|
/* First make the current layout be invisible. */
|
2004-02-07 00:55:34 +01:00
|
|
|
tui_make_all_invisible ();
|
2004-02-07 05:40:36 +01:00
|
|
|
tui_make_invisible (tui_locator_win_info_ptr ());
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
switch (layout)
|
|
|
|
{
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-data.h, tui-disasm.c, tui-file.c,
tui-hooks.c, tui-interp.c, tui-io.c, tui-layout.c, tui-out.c,
tui-regs.c, tui-regs.h, tui-source.c, tui-stack.c, tui-win.c,
tui-windata.c, tui-wingeneral.c, tui-winsource.c, tui-winsource.h,
tui.c, tui.h: Comment reformatting to coding standard (capitals,
spaces after periods, etc).
2007-08-14 23:20:09 +02:00
|
|
|
/* Now show the new layout. */
|
1999-04-16 03:35:26 +02:00
|
|
|
case SRC_COMMAND:
|
2004-02-08 01:05:16 +01:00
|
|
|
show_source_command ();
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_add_to_source_windows (TUI_SRC_WIN);
|
1999-04-16 03:35:26 +02:00
|
|
|
break;
|
|
|
|
case DISASSEM_COMMAND:
|
2004-02-08 01:05:16 +01:00
|
|
|
show_disasm_command ();
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_add_to_source_windows (TUI_DISASM_WIN);
|
1999-04-16 03:35:26 +02:00
|
|
|
break;
|
|
|
|
case SRC_DISASSEM_COMMAND:
|
2004-02-08 01:05:16 +01:00
|
|
|
show_source_disasm_command ();
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_add_to_source_windows (TUI_SRC_WIN);
|
|
|
|
tui_add_to_source_windows (TUI_DISASM_WIN);
|
1999-04-16 03:35:26 +02:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2002-08-24 14:28:33 +02:00
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
2004-01-24 00:25:17 +01:00
|
|
|
/* Function to set the layout to SRC_COMMAND, DISASSEM_COMMAND,
|
|
|
|
SRC_DISASSEM_COMMAND, SRC_DATA_COMMAND, or DISASSEM_DATA_COMMAND.
|
|
|
|
If the layout is SRC_DATA_COMMAND, DISASSEM_DATA_COMMAND, or
|
|
|
|
UNDEFINED_LAYOUT, then the data window is populated according to
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
regs_display_type. */
|
2004-01-24 00:25:17 +01:00
|
|
|
enum tui_status
|
2004-02-08 01:05:16 +01:00
|
|
|
tui_set_layout (enum tui_layout_type layout_type,
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
enum tui_register_display_type regs_display_type)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h (Opaque, OpaquePtr OpaqueList): Delete definition.
(TuiPoint, TuiPointPtr): Ditto.
(TuiStatus, TuiStatusPtr): Ditto.
(TuiWinType, TuiWinTypePtr): Ditto.
(struct tui_point): Rename _TuiPoint.
(tui_get_low_disassembly_address): Rename
tuiGetLowDisassemblyAddress.
(tui_update_all_exec_infos): Rename tuiUpdateAllExecInfos.
(tuiFree): Delete declaration.
(OpaqueFuncPtr, TuiOpaqueFuncPtr): Delete definitions.
(TuiVoidFuncPtr, TuiIntFuncPtr): Delete definitions.
* tui/tui.c (tuiFree): Delete function.
* cli/cli-cmds.c (disassemble_command): Update references.
* tui/tui-data.c, tui/tui-data.h, tui/tui-disasm.c: Ditto.
* tui/tui-layout.c, tui/tui-regs.c, tui/tui-source.c: Ditto.
* tui/tui-stack.c, tui/tui-win.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c: Ditto.
2004-02-07 18:46:14 +01:00
|
|
|
enum tui_status status = TUI_SUCCESS;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
go at beginning of new line.
2007-08-15 02:19:44 +02:00
|
|
|
if (layout_type != UNDEFINED_LAYOUT
|
|
|
|
|| regs_display_type != TUI_UNDEFINED_REGS)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
go at beginning of new line.
2007-08-15 02:19:44 +02:00
|
|
|
enum tui_layout_type cur_layout = tui_current_layout (),
|
|
|
|
new_layout = UNDEFINED_LAYOUT;
|
2004-02-08 01:05:16 +01:00
|
|
|
int regs_populate = FALSE;
|
2009-07-02 19:17:42 +02:00
|
|
|
struct gdbarch *gdbarch;
|
|
|
|
CORE_ADDR addr;
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-hooks.c, tui-layout.c,
tui-regs.c, tui-source.c, tui-stack.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-wingeneral.h, tui-winsource.c, tui.c,
tui-winsource.h: Whitespace changes, fix pointer declarations
to be consistant.
2007-08-14 22:23:29 +02:00
|
|
|
struct tui_win_info *win_with_focus = tui_win_with_focus ();
|
|
|
|
struct tui_layout_def *layout_def = tui_layout_def ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2009-07-02 19:17:42 +02:00
|
|
|
extract_display_start_addr (&gdbarch, &addr);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
go at beginning of new line.
2007-08-15 02:19:44 +02:00
|
|
|
if (layout_type == UNDEFINED_LAYOUT
|
|
|
|
&& regs_display_type != TUI_UNDEFINED_REGS)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
if (cur_layout == SRC_DISASSEM_COMMAND)
|
|
|
|
new_layout = DISASSEM_DATA_COMMAND;
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
go at beginning of new line.
2007-08-15 02:19:44 +02:00
|
|
|
else if (cur_layout == SRC_COMMAND
|
|
|
|
|| cur_layout == SRC_DATA_COMMAND)
|
2004-02-08 01:05:16 +01:00
|
|
|
new_layout = SRC_DATA_COMMAND;
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
go at beginning of new line.
2007-08-15 02:19:44 +02:00
|
|
|
else if (cur_layout == DISASSEM_COMMAND
|
|
|
|
|| cur_layout == DISASSEM_DATA_COMMAND)
|
2004-02-08 01:05:16 +01:00
|
|
|
new_layout = DISASSEM_DATA_COMMAND;
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
new_layout = layout_type;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
go at beginning of new line.
2007-08-15 02:19:44 +02:00
|
|
|
regs_populate = (new_layout == SRC_DATA_COMMAND
|
|
|
|
|| new_layout == DISASSEM_DATA_COMMAND
|
|
|
|
|| regs_display_type != TUI_UNDEFINED_REGS);
|
|
|
|
if (new_layout != cur_layout
|
|
|
|
|| regs_display_type != TUI_UNDEFINED_REGS)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
if (new_layout != cur_layout)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
show_layout (new_layout);
|
2007-08-14 23:39:22 +02:00
|
|
|
|
|
|
|
/* Now determine where focus should be. */
|
2004-02-08 01:05:16 +01:00
|
|
|
if (win_with_focus != TUI_CMD_WIN)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
switch (new_layout)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
|
|
|
case SRC_COMMAND:
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_set_win_focus_to (TUI_SRC_WIN);
|
2004-02-08 01:05:16 +01:00
|
|
|
layout_def->display_mode = SRC_WIN;
|
|
|
|
layout_def->split = FALSE;
|
1999-04-16 03:35:26 +02:00
|
|
|
break;
|
|
|
|
case DISASSEM_COMMAND:
|
2007-08-14 23:39:22 +02:00
|
|
|
/* The previous layout was not showing code.
|
|
|
|
This can happen if there is no source
|
|
|
|
available:
|
|
|
|
|
|
|
|
1. if the source file is in another dir OR
|
|
|
|
2. if target was compiled without -g
|
|
|
|
We still want to show the assembly though! */
|
|
|
|
|
2009-07-02 19:17:42 +02:00
|
|
|
tui_get_begin_asm_address (&gdbarch, &addr);
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_set_win_focus_to (TUI_DISASM_WIN);
|
2004-02-08 01:05:16 +01:00
|
|
|
layout_def->display_mode = DISASSEM_WIN;
|
|
|
|
layout_def->split = FALSE;
|
1999-04-16 03:35:26 +02:00
|
|
|
break;
|
|
|
|
case SRC_DISASSEM_COMMAND:
|
2007-08-14 23:39:22 +02:00
|
|
|
/* The previous layout was not showing code.
|
|
|
|
This can happen if there is no source
|
|
|
|
available:
|
|
|
|
|
|
|
|
1. if the source file is in another dir OR
|
|
|
|
2. if target was compiled without -g
|
|
|
|
We still want to show the assembly though! */
|
|
|
|
|
2009-07-02 19:17:42 +02:00
|
|
|
tui_get_begin_asm_address (&gdbarch, &addr);
|
2004-02-08 01:05:16 +01:00
|
|
|
if (win_with_focus == TUI_SRC_WIN)
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_set_win_focus_to (TUI_SRC_WIN);
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_set_win_focus_to (TUI_DISASM_WIN);
|
2004-02-08 01:05:16 +01:00
|
|
|
layout_def->split = TRUE;
|
1999-04-16 03:35:26 +02:00
|
|
|
break;
|
|
|
|
case SRC_DATA_COMMAND:
|
2004-02-08 01:05:16 +01:00
|
|
|
if (win_with_focus != TUI_DATA_WIN)
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_set_win_focus_to (TUI_SRC_WIN);
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_set_win_focus_to (TUI_DATA_WIN);
|
2004-02-08 01:05:16 +01:00
|
|
|
layout_def->display_mode = SRC_WIN;
|
|
|
|
layout_def->split = FALSE;
|
1999-04-16 03:35:26 +02:00
|
|
|
break;
|
|
|
|
case DISASSEM_DATA_COMMAND:
|
2007-08-14 23:39:22 +02:00
|
|
|
/* The previous layout was not showing code.
|
|
|
|
This can happen if there is no source
|
|
|
|
available:
|
|
|
|
|
|
|
|
1. if the source file is in another dir OR
|
|
|
|
2. if target was compiled without -g
|
|
|
|
We still want to show the assembly though! */
|
|
|
|
|
2009-07-02 19:17:42 +02:00
|
|
|
tui_get_begin_asm_address (&gdbarch, &addr);
|
2004-02-08 01:05:16 +01:00
|
|
|
if (win_with_focus != TUI_DATA_WIN)
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_set_win_focus_to (TUI_DISASM_WIN);
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_set_win_focus_to (TUI_DATA_WIN);
|
2004-02-08 01:05:16 +01:00
|
|
|
layout_def->display_mode = DISASSEM_WIN;
|
|
|
|
layout_def->split = FALSE;
|
1999-04-16 03:35:26 +02:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*
|
2007-08-08 20:39:50 +02:00
|
|
|
* Now update the window content.
|
1999-07-07 22:19:36 +02:00
|
|
|
*/
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
go at beginning of new line.
2007-08-15 02:19:44 +02:00
|
|
|
if (!regs_populate
|
|
|
|
&& (new_layout == SRC_DATA_COMMAND
|
|
|
|
|| new_layout == DISASSEM_DATA_COMMAND))
|
2004-02-07 01:23:56 +01:00
|
|
|
tui_display_all_data ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2009-07-02 19:17:42 +02:00
|
|
|
tui_update_source_windows_with_addr (gdbarch, addr);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2004-02-08 01:05:16 +01:00
|
|
|
if (regs_populate)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-03-13 15:14:01 +01:00
|
|
|
tui_show_registers (TUI_DATA_WIN->detail.data_display_info.current_group);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
status = TUI_FAILURE;
|
|
|
|
|
|
|
|
return status;
|
2002-08-24 14:28:33 +02:00
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-01-24 00:25:17 +01:00
|
|
|
/* Add the specified window to the layout in a logical way. This
|
|
|
|
means setting up the most logical layout given the window to be
|
|
|
|
added. */
|
1999-04-16 03:35:26 +02:00
|
|
|
void
|
2004-01-24 00:25:17 +01:00
|
|
|
tui_add_win_to_layout (enum tui_win_type type)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
enum tui_layout_type cur_layout = tui_current_layout ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case SRC_WIN:
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
go at beginning of new line.
2007-08-15 02:19:44 +02:00
|
|
|
if (cur_layout != SRC_COMMAND
|
|
|
|
&& cur_layout != SRC_DISASSEM_COMMAND
|
|
|
|
&& cur_layout != SRC_DATA_COMMAND)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-07 05:40:36 +01:00
|
|
|
tui_clear_source_windows_detail ();
|
2004-02-08 01:05:16 +01:00
|
|
|
if (cur_layout == DISASSEM_DATA_COMMAND)
|
|
|
|
show_layout (SRC_DATA_COMMAND);
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
show_layout (SRC_COMMAND);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case DISASSEM_WIN:
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
go at beginning of new line.
2007-08-15 02:19:44 +02:00
|
|
|
if (cur_layout != DISASSEM_COMMAND
|
|
|
|
&& cur_layout != SRC_DISASSEM_COMMAND
|
|
|
|
&& cur_layout != DISASSEM_DATA_COMMAND)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-07 05:40:36 +01:00
|
|
|
tui_clear_source_windows_detail ();
|
2004-02-08 01:05:16 +01:00
|
|
|
if (cur_layout == SRC_DATA_COMMAND)
|
|
|
|
show_layout (DISASSEM_DATA_COMMAND);
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
show_layout (DISASSEM_COMMAND);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case DATA_WIN:
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
go at beginning of new line.
2007-08-15 02:19:44 +02:00
|
|
|
if (cur_layout != SRC_DATA_COMMAND
|
|
|
|
&& cur_layout != DISASSEM_DATA_COMMAND)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
if (cur_layout == DISASSEM_COMMAND)
|
|
|
|
show_layout (DISASSEM_DATA_COMMAND);
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
show_layout (SRC_DATA_COMMAND);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2004-02-08 01:05:16 +01:00
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
/* Answer the height of a window. If it hasn't been created yet,
|
|
|
|
answer what the height of a window would be based upon its type and
|
|
|
|
the layout. */
|
1999-04-16 03:35:26 +02:00
|
|
|
int
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
tui_default_win_height (enum tui_win_type type,
|
|
|
|
enum tui_layout_type layout)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
|
|
|
int h;
|
|
|
|
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
if (tui_win_list[type] != (struct tui_win_info *) NULL)
|
|
|
|
h = tui_win_list[type]->generic.height;
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
switch (layout)
|
|
|
|
{
|
|
|
|
case SRC_COMMAND:
|
|
|
|
case DISASSEM_COMMAND:
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
if (TUI_CMD_WIN == NULL)
|
2004-02-07 05:40:36 +01:00
|
|
|
h = tui_term_height () / 2;
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
h = tui_term_height () - TUI_CMD_WIN->generic.height;
|
1999-04-16 03:35:26 +02:00
|
|
|
break;
|
|
|
|
case SRC_DISASSEM_COMMAND:
|
|
|
|
case SRC_DATA_COMMAND:
|
|
|
|
case DISASSEM_DATA_COMMAND:
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
if (TUI_CMD_WIN == NULL)
|
2004-02-07 05:40:36 +01:00
|
|
|
h = tui_term_height () / 3;
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
h = (tui_term_height () - TUI_CMD_WIN->generic.height) / 2;
|
1999-04-16 03:35:26 +02:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
h = 0;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return h;
|
2004-02-08 01:05:16 +01:00
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
2004-01-24 00:25:17 +01:00
|
|
|
/* Answer the height of a window. If it hasn't been created yet,
|
|
|
|
answer what the height of a window would be based upon its type and
|
|
|
|
the layout. */
|
1999-04-16 03:35:26 +02:00
|
|
|
int
|
2004-01-24 00:25:17 +01:00
|
|
|
tui_default_win_viewport_height (enum tui_win_type type,
|
|
|
|
enum tui_layout_type layout)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
|
|
|
int h;
|
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
h = tui_default_win_height (type, layout);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
if (tui_win_list[type] == TUI_CMD_WIN)
|
1999-04-16 03:35:26 +02:00
|
|
|
h -= 1;
|
|
|
|
else
|
|
|
|
h -= 2;
|
|
|
|
|
|
|
|
return h;
|
2004-02-08 01:05:16 +01:00
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
/* Function to initialize gdb commands, for tui window layout
|
|
|
|
manipulation. */
|
2008-02-21 Pedro Alves <pedro@codesorcery.com>
Silence a few -Wmissing-prototypes warnings.
PR build/9877:
* amd64-nat.c: Include "amd64-nat.h".
* fork-child.c (_initialize_fork_child): Ditto.
* gcore.c (_initialize_gcore): Ditto.
* inf-ptrace.c: Include "inf-ptrace.h".
(inf_ptrace_store_registers): Make it static.
* linux-nat.c (linux_nat_terminal_ours): Make it static.
(_initialize_linux_nat): Declare before definition.
* linux-tdep.c: Include "linux-tdep.h".
* linux-thread-db.c (_initialize_thread_db): Declare before
definition.
* proc-service.c (_initialize_proc_service): Ditto.
* remote.c (remote_send_printf): Make it static.
* solib.c: Include "solib.h".
* symfile-mem.c (_initialize_symfile_mem): Declare before
definition.
* ada-lang.c (ada_la_decode, ada_match_name)
(ada_suppress_symbol_printing, ada_is_array_type)
(ada_value_ptr_subscript, ada_array_length)
(ada_to_static_fixed_value): Make them static.
(_initialize_ada_language): Declare before definition.
* ada-tasks.c (ada_get_task_number, ada_get_environment_task)
(ada_task_list_changed, ada_new_objfile_observer): Make them
static.
(_initialize_tasks): Declare before definition.
* addrmap.c (_initialize_addrmap): Declare before definition.
* auxv.c (default_auxv_parse): Make it static.
* bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
them static.
* breakpoint.c (remove_sal): Add line break.
(expand_line_sal_maybe): Make it static.
* cp-name-parser.y: Include "cp-support.h".
* cp-valprint.c (cp_find_class_member): Make it static.
* eval.c (value_f90_subarray): Ditto.
* exceptions.c (print_any_exception): Ditto.
* findcmd.c (_initialize_mem_search): Declare before definition.
* frame.c (frame_observer_target_changed): Make it static.
* gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
* inf-child.c: Include "inf-child.h".
* inferior.h (valid_inferior_id): Rename to ...
(valid_gdb_inferior_id): ... this.
* infrun.c (infrun_thread_stop_requested, siginfo_make_value):
Make them static.
* jv-lang.c (java_language_arch_info): Make it static.
* m2-typeprint.c (m2_get_discrete_bounds): Ditto.
* osdata.c (info_osdata_command): Make it static.
* regcache.c (regcache_observer_target_changed): Make it static.
* reverse.c (_initialize_reverse): Declare before definition.
* stabsread.c (cleanup_undefined_types_noname)
(cleanup_undefined_types_1): Make them static.
* symfile.c (place_section): Make it static.
* symtab.c (find_pc_sect_psymtab_closer): Make it static.
* target-descriptions.c (_initialize_target_descriptions): Declare
before definition.
* target.c (default_get_ada_task_ptid, find_default_can_async_p)
(find_default_is_async_p, find_default_supports_non_stop): Make
them static.
(target_supports_non_stop): Add prototype.
(dummy_pid_to_str): Make it static.
* utils.c (_initialize_utils): Declare before definition.
* ada-exp.y (_initialize_ada_exp): Declare before definition.
* solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
* target.h (struct target_ops): Add a prototype to the
to_can_execute_reverse callback.
* macroscope.c (_initialize_macroscope): Declare before definition.
* cp-namespace.c (_initialize_cp_namespace): Declare before definition.
* python/python.c (_initialize_python): Declare before definition.
* tui/tui-command.c: Include "tui/tui-command.h".
* tui/tui-data.c (init_content_element, init_win_info): Make them
static.
* tui/tui-disasm.c: Include "tui/tui-disasm.h".
* tui/tui-interp.c (_initialize_tui_interp): Declare before
definition.
* tui/tui-layout.c: Include "tui/tui-layout.h".
(_initialize_tui_layout): Declare before definition.
* tui/tui-regs.c: Include "tui/tui-regs.h".
(tui_display_reg_element_at_line): Make it static.
(_initialize_tui_regs): Declare before definition.
* tui/tui-stack.c (_initialize_tui_stack): Declare before
definition.
* tui/tui-win.c: Include "tui/tui-win.h".
(_initialize_tui_win): Declare before definition.
(tui_sigwinch_handler): Make it static. Wrap in ifdef SIGWINCH.
* tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
(tui_get_cmd_list): Add a prototype.
* tui/tui-windata.c: Include tui-windata.h.
* tui/tui-wingeneral.c (box_win): Make it static.
* cli/cli-logging.c (show_logging_command): Make it static.
(_initialize_cli_logging): Declare before definition.
* mi/mi-common.c (_initialize_gdb_mi_common): Declare before
definition.
2009-02-21 17:14:50 +01:00
|
|
|
|
|
|
|
/* Provide a prototype to silence -Wmissing-prototypes. */
|
|
|
|
extern initialize_file_ftype _initialize_tui_layout;
|
|
|
|
|
1999-04-16 03:35:26 +02:00
|
|
|
void
|
2004-02-08 01:05:16 +01:00
|
|
|
_initialize_tui_layout (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
add_com ("layout", class_tui, tui_layout_command, _("\
|
|
|
|
Change the layout of windows.\n\
|
1999-04-16 03:35:26 +02:00
|
|
|
Usage: layout prev | next | <layout_name> \n\
|
|
|
|
Layout names are:\n\
|
|
|
|
src : Displays source and command windows.\n\
|
|
|
|
asm : Displays disassembly and command windows.\n\
|
|
|
|
split : Displays source, disassembly and command windows.\n\
|
|
|
|
regs : Displays register window. If existing layout\n\
|
|
|
|
is source/command or assembly/command, the \n\
|
|
|
|
register window is displayed. If the\n\
|
|
|
|
source/assembly/command (split) is displayed, \n\
|
|
|
|
the register window is displayed with \n\
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
the window that has current logical focus.\n"));
|
2001-07-20 00:47:46 +02:00
|
|
|
if (xdb_commands)
|
|
|
|
{
|
2005-02-15 Andrew Cagney <cagney@gnu.org>
Mark up add_com, add_info and add_prefix_cmd.
* breakpoint.c, cp-support.c, dcache.c, dwarf2read.c: Update.
* exec.c, f-valprint.c, frame.c, gcore.c, gnu-nat.c: Update.
* go32-nat.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* kod.c, language.c, linux-nat.c, m32r-rom.c, macrocmd.c: Update.
* maint.c, memattr.c, mips-tdep.c, nto-procfs.c, objc-lang.c: Update.
* ocd.c, pa64solib.c, printcmd.c, procfs.c, regcache.c: Update.
* remote-e7000.c, remote-m32r-sdi.c, remote-mips.c: Update.
* remote-sds.c, remote-sim.c, remote-st.c, remote-utils.c: Update.
* remote.c, rs6000-tdep.c, ser-go32.c, serial.c: Update.
* sh-tdep.c, solib.c, somsolib.c, source.c, stack.c: Update.
* symfile.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, typeprint.c, utils.c, valprint.c: Update.
* win32-nat.c, xcoffsolib.c, cli/cli-cmds.c, cli/cli-dump.c: Update.
* cli/cli-logging.c, tui/tui-layout.c, tui/tui-regs.c: Update.
* tui/tui-stack.c, tui/tui-win.c: Update.
2005-02-15 16:49:28 +01:00
|
|
|
add_com ("td", class_tui, tui_toggle_layout_command, _("\
|
|
|
|
Toggle between Source/Command and Disassembly/Command layouts.\n"));
|
|
|
|
add_com ("ts", class_tui, tui_toggle_split_layout_command, _("\
|
|
|
|
Toggle between Source/Command or Disassembly/Command and \n\
|
|
|
|
Source/Disassembly/Command layouts.\n"));
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2001-07-20 00:47:46 +02:00
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*************************
|
|
|
|
** STATIC LOCAL FUNCTIONS
|
|
|
|
**************************/
|
|
|
|
|
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
/* Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA,
|
|
|
|
REGS, $REGS, $GREGS, $FREGS, $SREGS. */
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h (Opaque, OpaquePtr OpaqueList): Delete definition.
(TuiPoint, TuiPointPtr): Ditto.
(TuiStatus, TuiStatusPtr): Ditto.
(TuiWinType, TuiWinTypePtr): Ditto.
(struct tui_point): Rename _TuiPoint.
(tui_get_low_disassembly_address): Rename
tuiGetLowDisassemblyAddress.
(tui_update_all_exec_infos): Rename tuiUpdateAllExecInfos.
(tuiFree): Delete declaration.
(OpaqueFuncPtr, TuiOpaqueFuncPtr): Delete definitions.
(TuiVoidFuncPtr, TuiIntFuncPtr): Delete definitions.
* tui/tui.c (tuiFree): Delete function.
* cli/cli-cmds.c (disassemble_command): Update references.
* tui/tui-data.c, tui/tui-data.h, tui/tui-disasm.c: Ditto.
* tui/tui-layout.c, tui/tui-regs.c, tui/tui-source.c: Ditto.
* tui/tui-stack.c, tui/tui-win.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c: Ditto.
2004-02-07 18:46:14 +01:00
|
|
|
enum tui_status
|
2004-02-08 01:05:16 +01:00
|
|
|
tui_set_layout_for_display_command (const char *layout_name)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h (Opaque, OpaquePtr OpaqueList): Delete definition.
(TuiPoint, TuiPointPtr): Ditto.
(TuiStatus, TuiStatusPtr): Ditto.
(TuiWinType, TuiWinTypePtr): Ditto.
(struct tui_point): Rename _TuiPoint.
(tui_get_low_disassembly_address): Rename
tuiGetLowDisassemblyAddress.
(tui_update_all_exec_infos): Rename tuiUpdateAllExecInfos.
(tuiFree): Delete declaration.
(OpaqueFuncPtr, TuiOpaqueFuncPtr): Delete definitions.
(TuiVoidFuncPtr, TuiIntFuncPtr): Delete definitions.
* tui/tui.c (tuiFree): Delete function.
* cli/cli-cmds.c (disassemble_command): Update references.
* tui/tui-data.c, tui/tui-data.h, tui/tui-disasm.c: Ditto.
* tui/tui-layout.c, tui/tui-regs.c, tui/tui-source.c: Ditto.
* tui/tui-stack.c, tui/tui-win.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c: Ditto.
2004-02-07 18:46:14 +01:00
|
|
|
enum tui_status status = TUI_SUCCESS;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
if (layout_name != (char *) NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 02:32:26 +01:00
|
|
|
int i;
|
|
|
|
char *buf_ptr;
|
2004-02-08 01:05:16 +01:00
|
|
|
enum tui_layout_type new_layout = UNDEFINED_LAYOUT;
|
|
|
|
enum tui_register_display_type dpy_type = TUI_UNDEFINED_REGS;
|
|
|
|
enum tui_layout_type cur_layout = tui_current_layout ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
buf_ptr = (char *) xstrdup (layout_name);
|
|
|
|
for (i = 0; (i < strlen (layout_name)); i++)
|
|
|
|
buf_ptr[i] = toupper (buf_ptr[i]);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-data.h, tui-disasm.c, tui-file.c,
tui-hooks.c, tui-interp.c, tui-io.c, tui-layout.c, tui-out.c,
tui-regs.c, tui-regs.h, tui-source.c, tui-stack.c, tui-win.c,
tui-windata.c, tui-wingeneral.c, tui-winsource.c, tui-winsource.h,
tui.c, tui.h: Comment reformatting to coding standard (capitals,
spaces after periods, etc).
2007-08-14 23:20:09 +02:00
|
|
|
/* First check for ambiguous input. */
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
go at beginning of new line.
2007-08-15 02:19:44 +02:00
|
|
|
if (strlen (buf_ptr) <= 1
|
|
|
|
&& (*buf_ptr == 'S' || *buf_ptr == '$'))
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
warning (_("Ambiguous command input."));
|
1999-04-16 03:35:26 +02:00
|
|
|
status = TUI_FAILURE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
if (subset_compare (buf_ptr, "SRC"))
|
|
|
|
new_layout = SRC_COMMAND;
|
|
|
|
else if (subset_compare (buf_ptr, "ASM"))
|
|
|
|
new_layout = DISASSEM_COMMAND;
|
|
|
|
else if (subset_compare (buf_ptr, "SPLIT"))
|
|
|
|
new_layout = SRC_DISASSEM_COMMAND;
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
go at beginning of new line.
2007-08-15 02:19:44 +02:00
|
|
|
else if (subset_compare (buf_ptr, "REGS")
|
|
|
|
|| subset_compare (buf_ptr, TUI_GENERAL_SPECIAL_REGS_NAME)
|
|
|
|
|| subset_compare (buf_ptr, TUI_GENERAL_REGS_NAME)
|
|
|
|
|| subset_compare (buf_ptr, TUI_FLOAT_REGS_NAME)
|
|
|
|
|| subset_compare (buf_ptr, TUI_SPECIAL_REGS_NAME))
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
go at beginning of new line.
2007-08-15 02:19:44 +02:00
|
|
|
if (cur_layout == SRC_COMMAND
|
|
|
|
|| cur_layout == SRC_DATA_COMMAND)
|
2004-02-08 01:05:16 +01:00
|
|
|
new_layout = SRC_DATA_COMMAND;
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
new_layout = DISASSEM_DATA_COMMAND;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-data.h, tui-disasm.c, tui-file.c,
tui-hooks.c, tui-interp.c, tui-io.c, tui-layout.c, tui-out.c,
tui-regs.c, tui-regs.h, tui-source.c, tui-stack.c, tui-win.c,
tui-windata.c, tui-wingeneral.c, tui-winsource.c, tui-winsource.h,
tui.c, tui.h: Comment reformatting to coding standard (capitals,
spaces after periods, etc).
2007-08-14 23:20:09 +02:00
|
|
|
/* Could ifdef out the following code. when compile with
|
|
|
|
-z, there are null pointer references that cause a
|
|
|
|
core dump if 'layout regs' is the first layout
|
|
|
|
command issued by the user. HP has asked us to hook
|
|
|
|
up this code. - edie epstein */
|
2004-02-08 01:05:16 +01:00
|
|
|
if (subset_compare (buf_ptr, TUI_FLOAT_REGS_NAME))
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-disasm.c, tui-file.c, tui-io.c,
tui-layout.c, tui-regs.c, tui-source.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-winsource.c: Coding standard, && and ||
go at beginning of new line.
2007-08-15 02:19:44 +02:00
|
|
|
if (TUI_DATA_WIN->detail.data_display_info.regs_display_type != TUI_SFLOAT_REGS
|
|
|
|
&& TUI_DATA_WIN->detail.data_display_info.regs_display_type != TUI_DFLOAT_REGS)
|
2004-02-08 01:05:16 +01:00
|
|
|
dpy_type = TUI_SFLOAT_REGS;
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
dpy_type =
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
TUI_DATA_WIN->detail.data_display_info.regs_display_type;
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2004-02-08 01:05:16 +01:00
|
|
|
else if (subset_compare (buf_ptr,
|
1999-04-16 03:35:26 +02:00
|
|
|
TUI_GENERAL_SPECIAL_REGS_NAME))
|
2004-02-08 01:05:16 +01:00
|
|
|
dpy_type = TUI_GENERAL_AND_SPECIAL_REGS;
|
|
|
|
else if (subset_compare (buf_ptr, TUI_GENERAL_REGS_NAME))
|
|
|
|
dpy_type = TUI_GENERAL_REGS;
|
|
|
|
else if (subset_compare (buf_ptr, TUI_SPECIAL_REGS_NAME))
|
|
|
|
dpy_type = TUI_SPECIAL_REGS;
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
else if (TUI_DATA_WIN)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
if (TUI_DATA_WIN->detail.data_display_info.regs_display_type !=
|
1999-04-16 03:35:26 +02:00
|
|
|
TUI_UNDEFINED_REGS)
|
2004-02-08 01:05:16 +01:00
|
|
|
dpy_type =
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
TUI_DATA_WIN->detail.data_display_info.regs_display_type;
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
dpy_type = TUI_GENERAL_REGS;
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-data.h, tui-disasm.c, tui-file.c,
tui-hooks.c, tui-interp.c, tui-io.c, tui-layout.c, tui-out.c,
tui-regs.c, tui-regs.h, tui-source.c, tui-stack.c, tui-win.c,
tui-windata.c, tui-wingeneral.c, tui-winsource.c, tui-winsource.h,
tui.c, tui.h: Comment reformatting to coding standard (capitals,
spaces after periods, etc).
2007-08-14 23:20:09 +02:00
|
|
|
/* End of potential ifdef.
|
|
|
|
*/
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-data.h, tui-disasm.c, tui-file.c,
tui-hooks.c, tui-interp.c, tui-io.c, tui-layout.c, tui-out.c,
tui-regs.c, tui-regs.h, tui-source.c, tui-stack.c, tui-win.c,
tui-windata.c, tui-wingeneral.c, tui-winsource.c, tui-winsource.h,
tui.c, tui.h: Comment reformatting to coding standard (capitals,
spaces after periods, etc).
2007-08-14 23:20:09 +02:00
|
|
|
/* If ifdefed out code above, then assume that the user
|
|
|
|
wishes to display the general purpose registers .
|
|
|
|
*/
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-data.h, tui-disasm.c, tui-file.c,
tui-hooks.c, tui-interp.c, tui-io.c, tui-layout.c, tui-out.c,
tui-regs.c, tui-regs.h, tui-source.c, tui-stack.c, tui-win.c,
tui-windata.c, tui-wingeneral.c, tui-winsource.c, tui-winsource.h,
tui.c, tui.h: Comment reformatting to coding standard (capitals,
spaces after periods, etc).
2007-08-14 23:20:09 +02:00
|
|
|
/* dpy_type = TUI_GENERAL_REGS; */
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2004-02-08 01:05:16 +01:00
|
|
|
else if (subset_compare (buf_ptr, "NEXT"))
|
|
|
|
new_layout = next_layout ();
|
|
|
|
else if (subset_compare (buf_ptr, "PREV"))
|
|
|
|
new_layout = prev_layout ();
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
|
|
|
status = TUI_FAILURE;
|
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
tui_set_layout (new_layout, dpy_type);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2007-08-08 20:39:50 +02:00
|
|
|
xfree (buf_ptr);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
status = TUI_FAILURE;
|
|
|
|
|
|
|
|
return status;
|
2001-07-19 00:03:22 +02:00
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
2009-07-02 19:17:42 +02:00
|
|
|
static void
|
|
|
|
extract_display_start_addr (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
enum tui_layout_type cur_layout = tui_current_layout ();
|
2010-03-20 06:17:10 +01:00
|
|
|
struct gdbarch *gdbarch = get_current_arch ();
|
2001-07-18 22:59:00 +02:00
|
|
|
CORE_ADDR addr;
|
2001-07-18 00:22:40 +02:00
|
|
|
CORE_ADDR pc;
|
2002-09-30 02:52:27 +02:00
|
|
|
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
switch (cur_layout)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
|
|
|
case SRC_COMMAND:
|
|
|
|
case SRC_DATA_COMMAND:
|
2009-07-02 19:17:42 +02:00
|
|
|
gdbarch = TUI_SRC_WIN->detail.source_info.gdbarch;
|
2002-09-30 02:52:27 +02:00
|
|
|
find_line_pc (cursal.symtab,
|
2005-11-01 18:40:25 +01:00
|
|
|
TUI_SRC_WIN->detail.source_info.start_line_or_addr.u.line_no,
|
2001-07-18 00:22:40 +02:00
|
|
|
&pc);
|
2001-07-18 22:59:00 +02:00
|
|
|
addr = pc;
|
1999-04-16 03:35:26 +02:00
|
|
|
break;
|
|
|
|
case DISASSEM_COMMAND:
|
|
|
|
case SRC_DISASSEM_COMMAND:
|
|
|
|
case DISASSEM_DATA_COMMAND:
|
2009-07-02 19:17:42 +02:00
|
|
|
gdbarch = TUI_DISASM_WIN->detail.source_info.gdbarch;
|
2005-11-01 18:40:25 +01:00
|
|
|
addr = TUI_DISASM_WIN->detail.source_info.start_line_or_addr.u.addr;
|
1999-04-16 03:35:26 +02:00
|
|
|
break;
|
|
|
|
default:
|
2001-07-18 22:59:00 +02:00
|
|
|
addr = 0;
|
1999-04-16 03:35:26 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2009-07-02 19:17:42 +02:00
|
|
|
*gdbarch_p = gdbarch;
|
|
|
|
*addr_p = addr;
|
2004-02-08 01:05:16 +01:00
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
static void
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-hooks.c, tui-layout.c,
tui-regs.c, tui-source.c, tui-stack.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-wingeneral.h, tui-winsource.c, tui.c,
tui-winsource.h: Whitespace changes, fix pointer declarations
to be consistant.
2007-08-14 22:23:29 +02:00
|
|
|
tui_handle_xdb_layout (struct tui_layout_def *layout_def)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
if (layout_def->split)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-01-24 00:25:17 +01:00
|
|
|
tui_set_layout (SRC_DISASSEM_COMMAND, TUI_UNDEFINED_REGS);
|
2004-02-08 01:05:16 +01:00
|
|
|
tui_set_win_focus_to (tui_win_list[layout_def->display_mode]);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
if (layout_def->display_mode == SRC_WIN)
|
2004-01-24 00:25:17 +01:00
|
|
|
tui_set_layout (SRC_COMMAND, TUI_UNDEFINED_REGS);
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
tui_set_layout (DISASSEM_DATA_COMMAND, layout_def->regs_display_type);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2004-02-08 01:05:16 +01:00
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
static void
|
2004-02-08 01:05:16 +01:00
|
|
|
tui_toggle_layout_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-hooks.c, tui-layout.c,
tui-regs.c, tui-source.c, tui-stack.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-wingeneral.h, tui-winsource.c, tui.c,
tui-winsource.h: Whitespace changes, fix pointer declarations
to be consistant.
2007-08-14 22:23:29 +02:00
|
|
|
struct tui_layout_def *layout_def = tui_layout_def ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2001-07-21 00:26:54 +02:00
|
|
|
/* Make sure the curses mode is enabled. */
|
|
|
|
tui_enable ();
|
2004-02-08 01:05:16 +01:00
|
|
|
if (layout_def->display_mode == SRC_WIN)
|
|
|
|
layout_def->display_mode = DISASSEM_WIN;
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
layout_def->display_mode = SRC_WIN;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
if (!layout_def->split)
|
|
|
|
tui_handle_xdb_layout (layout_def);
|
2001-07-19 00:03:22 +02:00
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
static void
|
2004-02-08 01:05:16 +01:00
|
|
|
tui_toggle_split_layout_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-hooks.c, tui-layout.c,
tui-regs.c, tui-source.c, tui-stack.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-wingeneral.h, tui-winsource.c, tui.c,
tui-winsource.h: Whitespace changes, fix pointer declarations
to be consistant.
2007-08-14 22:23:29 +02:00
|
|
|
struct tui_layout_def *layout_def = tui_layout_def ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2001-07-21 00:26:54 +02:00
|
|
|
/* Make sure the curses mode is enabled. */
|
|
|
|
tui_enable ();
|
2004-02-08 01:05:16 +01:00
|
|
|
layout_def->split = (!layout_def->split);
|
|
|
|
tui_handle_xdb_layout (layout_def);
|
2001-07-19 00:03:22 +02:00
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
static void
|
2004-02-08 01:05:16 +01:00
|
|
|
tui_layout_command (char *arg, int from_tty)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2001-07-21 00:26:54 +02:00
|
|
|
/* Make sure the curses mode is enabled. */
|
|
|
|
tui_enable ();
|
|
|
|
|
|
|
|
/* Switch to the selected layout. */
|
2004-01-24 00:25:17 +01:00
|
|
|
if (tui_set_layout_for_display_command (arg) != TUI_SUCCESS)
|
2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
* event-top.c, exec.c, expprint.c, f-lang.c: Update.
* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
* remote-rdp.c, remote-sim.c, remote-st.c: Update.
* remote-utils.c, remote-utils.h, remote.c: Update.
* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
* somread.c, somsolib.c, source.c, stabsread.c: Update.
* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
* tui/tui-win.c: Update.
2005-02-11 05:06:14 +01:00
|
|
|
warning (_("Invalid layout specified.\n%s"), LAYOUT_USAGE);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2001-07-19 00:03:22 +02:00
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
/* Answer the previous layout to cycle to. */
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui-data.h (tui_win_element): Rename TuiWinElement.
(tui_exec_info_content): Rename TuiExecInfoContent.
(TuiGenWinInfo, TuiGenWinInfoPtr): Delete definitions.
(TuiWinInfo, TuiWinInfoPtr): Ditto.
(TuiScrollDirection, TuiScrollDirectionPtr): Ditto.
(TuiList, TuiListPtr): Ditto.
(TuiLayoutType, TuiLayoutTypePtr): Ditto.
(TuiDataType, TuiDataTypePtr): Ditto.
(TuiRegisterDisplayType, TuiRegisterDisplayTypePtr): Ditto.
(TuiLineOrAddress, TuiLineOrAddressPtr): Ditto.
(TuiLayoutDef, TuiLayoutDefPtr): Ditto.
(TuiSourceElement, TuiSourceElementPtr): Ditto.
(TuiDataElement, TuiDataElementPtr): Ditto.
(TuiWinElement, TuiWinElementPtr): Ditto.
(TuiDataInfo, TuiDataInfoPtr): Ditto.
(TuiCommandElement, TuiCommandElementPtr): Ditto.
(TuiLocatorElement, TuiLocatorElementPtr): Ditto.
(TuiWhichElement, TuiWhichElementPtr): Ditto.
(TuiSourceInfo, TuiSourceInfoPtr): Ditto.
(TuiCommandInfo, TuiCommandInfoPtr): Ditto.
* tui/tui-command.c, tui/tui-data.c: Update references.
* tui/tui-data.h, tui/tui-disasm.c, tui/tui-layout.c: Ditto.
* tui/tui-regs.c, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 17:31:22 +01:00
|
|
|
static enum tui_layout_type
|
2004-02-08 01:05:16 +01:00
|
|
|
next_layout (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
enum tui_layout_type new_layout;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
new_layout = tui_current_layout ();
|
|
|
|
if (new_layout == UNDEFINED_LAYOUT)
|
|
|
|
new_layout = SRC_COMMAND;
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
new_layout++;
|
|
|
|
if (new_layout == UNDEFINED_LAYOUT)
|
|
|
|
new_layout = SRC_COMMAND;
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
return new_layout;
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
/* Answer the next layout to cycle to. */
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui-data.h (tui_win_element): Rename TuiWinElement.
(tui_exec_info_content): Rename TuiExecInfoContent.
(TuiGenWinInfo, TuiGenWinInfoPtr): Delete definitions.
(TuiWinInfo, TuiWinInfoPtr): Ditto.
(TuiScrollDirection, TuiScrollDirectionPtr): Ditto.
(TuiList, TuiListPtr): Ditto.
(TuiLayoutType, TuiLayoutTypePtr): Ditto.
(TuiDataType, TuiDataTypePtr): Ditto.
(TuiRegisterDisplayType, TuiRegisterDisplayTypePtr): Ditto.
(TuiLineOrAddress, TuiLineOrAddressPtr): Ditto.
(TuiLayoutDef, TuiLayoutDefPtr): Ditto.
(TuiSourceElement, TuiSourceElementPtr): Ditto.
(TuiDataElement, TuiDataElementPtr): Ditto.
(TuiWinElement, TuiWinElementPtr): Ditto.
(TuiDataInfo, TuiDataInfoPtr): Ditto.
(TuiCommandElement, TuiCommandElementPtr): Ditto.
(TuiLocatorElement, TuiLocatorElementPtr): Ditto.
(TuiWhichElement, TuiWhichElementPtr): Ditto.
(TuiSourceInfo, TuiSourceInfoPtr): Ditto.
(TuiCommandInfo, TuiCommandInfoPtr): Ditto.
* tui/tui-command.c, tui/tui-data.c: Update references.
* tui/tui-data.h, tui/tui-disasm.c, tui/tui-layout.c: Ditto.
* tui/tui-regs.c, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 17:31:22 +01:00
|
|
|
static enum tui_layout_type
|
2004-02-08 01:05:16 +01:00
|
|
|
prev_layout (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
enum tui_layout_type new_layout;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
new_layout = tui_current_layout ();
|
|
|
|
if (new_layout == SRC_COMMAND)
|
|
|
|
new_layout = DISASSEM_DATA_COMMAND;
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
new_layout--;
|
|
|
|
if (new_layout == UNDEFINED_LAYOUT)
|
|
|
|
new_layout = DISASSEM_DATA_COMMAND;
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
return new_layout;
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
make_command_window (struct tui_win_info **win_info_ptr,
|
|
|
|
int height, int origin_y)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2007-01-03 20:01:25 +01:00
|
|
|
*win_info_ptr = init_and_make_win (*win_info_ptr,
|
|
|
|
CMD_WIN,
|
|
|
|
height,
|
|
|
|
tui_term_width (),
|
|
|
|
0,
|
|
|
|
origin_y,
|
|
|
|
DONT_BOX_WINDOW);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
(*win_info_ptr)->can_highlight = FALSE;
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
2007-08-14 23:39:22 +02:00
|
|
|
/* make_source_window().
|
1999-07-07 22:19:36 +02:00
|
|
|
*/
|
1999-04-16 03:35:26 +02:00
|
|
|
static void
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
make_source_window (struct tui_win_info **win_info_ptr,
|
|
|
|
int height, int origin_y)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
make_source_or_disasm_window (win_info_ptr, SRC_WIN, height, origin_y);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
return;
|
2004-02-08 01:05:16 +01:00
|
|
|
} /* make_source_window */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
2007-08-14 23:39:22 +02:00
|
|
|
/* make_disasm_window().
|
1999-07-07 22:19:36 +02:00
|
|
|
*/
|
1999-04-16 03:35:26 +02:00
|
|
|
static void
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
make_disasm_window (struct tui_win_info **win_info_ptr,
|
|
|
|
int height, int origin_y)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
make_source_or_disasm_window (win_info_ptr, DISASSEM_WIN, height, origin_y);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
return;
|
2004-02-08 01:05:16 +01:00
|
|
|
} /* make_disasm_window */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
static void
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
make_data_window (struct tui_win_info **win_info_ptr,
|
|
|
|
int height, int origin_y)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2007-01-03 20:01:25 +01:00
|
|
|
*win_info_ptr = init_and_make_win (*win_info_ptr,
|
|
|
|
DATA_WIN,
|
|
|
|
height,
|
|
|
|
tui_term_width (),
|
|
|
|
0,
|
|
|
|
origin_y,
|
|
|
|
BOX_WINDOW);
|
2004-02-08 01:05:16 +01:00
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
/* Show the Source/Command layout. */
|
1999-04-16 03:35:26 +02:00
|
|
|
static void
|
2004-02-08 01:05:16 +01:00
|
|
|
show_source_command (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
show_source_or_disasm_and_command (SRC_COMMAND);
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
/* Show the Dissassem/Command layout. */
|
1999-04-16 03:35:26 +02:00
|
|
|
static void
|
2004-02-08 01:05:16 +01:00
|
|
|
show_disasm_command (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
show_source_or_disasm_and_command (DISASSEM_COMMAND);
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
/* Show the Source/Disassem/Command layout. */
|
1999-04-16 03:35:26 +02:00
|
|
|
static void
|
2004-02-08 01:05:16 +01:00
|
|
|
show_source_disasm_command (void)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-07 05:40:36 +01:00
|
|
|
if (tui_current_layout () != SRC_DISASSEM_COMMAND)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
int cmd_height, src_height, asm_height;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
if (TUI_CMD_WIN != NULL)
|
2004-02-08 01:05:16 +01:00
|
|
|
cmd_height = TUI_CMD_WIN->generic.height;
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
cmd_height = tui_term_height () / 3;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
src_height = (tui_term_height () - cmd_height) / 2;
|
|
|
|
asm_height = tui_term_height () - (src_height + cmd_height);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
if (TUI_SRC_WIN == NULL)
|
2004-02-08 01:05:16 +01:00
|
|
|
make_source_window (&TUI_SRC_WIN, src_height, 0);
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
init_gen_win_info (&TUI_SRC_WIN->generic,
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
TUI_SRC_WIN->generic.type,
|
|
|
|
src_height,
|
|
|
|
TUI_SRC_WIN->generic.width,
|
|
|
|
TUI_SRC_WIN->detail.source_info.execution_info->width,
|
|
|
|
0);
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
TUI_SRC_WIN->can_highlight = TRUE;
|
2004-02-08 01:05:16 +01:00
|
|
|
init_gen_win_info (TUI_SRC_WIN->detail.source_info.execution_info,
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
EXEC_INFO_WIN,
|
|
|
|
src_height,
|
|
|
|
3,
|
|
|
|
0,
|
|
|
|
0);
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_make_visible (&TUI_SRC_WIN->generic);
|
|
|
|
tui_make_visible (TUI_SRC_WIN->detail.source_info.execution_info);
|
|
|
|
TUI_SRC_WIN->detail.source_info.has_locator = FALSE;;
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
if (TUI_SRC_WIN != NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-hooks.c, tui-layout.c,
tui-regs.c, tui-source.c, tui-stack.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-wingeneral.h, tui-winsource.c, tui.c,
tui-winsource.h: Whitespace changes, fix pointer declarations
to be consistant.
2007-08-14 22:23:29 +02:00
|
|
|
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_show_source_content (TUI_SRC_WIN);
|
|
|
|
if (TUI_DISASM_WIN == NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
make_disasm_window (&TUI_DISASM_WIN, asm_height, src_height - 1);
|
2007-01-03 20:01:25 +01:00
|
|
|
locator = init_and_make_win (locator,
|
|
|
|
LOCATOR_WIN,
|
|
|
|
2 /* 1 */ ,
|
|
|
|
tui_term_width (),
|
|
|
|
0,
|
|
|
|
(src_height + asm_height) - 1,
|
|
|
|
DONT_BOX_WINDOW);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
init_gen_win_info (locator,
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
LOCATOR_WIN,
|
|
|
|
2 /* 1 */ ,
|
|
|
|
tui_term_width (),
|
|
|
|
0,
|
|
|
|
(src_height + asm_height) - 1);
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
TUI_DISASM_WIN->detail.source_info.has_locator = TRUE;
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
init_gen_win_info (&TUI_DISASM_WIN->generic,
|
|
|
|
TUI_DISASM_WIN->generic.type,
|
|
|
|
asm_height,
|
|
|
|
TUI_DISASM_WIN->generic.width,
|
|
|
|
TUI_DISASM_WIN->detail.source_info.execution_info->width,
|
|
|
|
src_height - 1);
|
2004-02-08 01:05:16 +01:00
|
|
|
init_gen_win_info (TUI_DISASM_WIN->detail.source_info.execution_info,
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
EXEC_INFO_WIN,
|
|
|
|
asm_height,
|
|
|
|
3,
|
|
|
|
0,
|
|
|
|
src_height - 1);
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
TUI_DISASM_WIN->can_highlight = TRUE;
|
|
|
|
tui_make_visible (&TUI_DISASM_WIN->generic);
|
|
|
|
tui_make_visible (TUI_DISASM_WIN->detail.source_info.execution_info);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
if (TUI_DISASM_WIN != NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
TUI_SRC_WIN->detail.source_info.has_locator = FALSE;
|
|
|
|
TUI_DISASM_WIN->detail.source_info.has_locator = TRUE;
|
2004-02-07 00:55:34 +01:00
|
|
|
tui_make_visible (locator);
|
2004-01-29 00:16:50 +01:00
|
|
|
tui_show_locator_content ();
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_show_source_content (TUI_DISASM_WIN);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
if (TUI_CMD_WIN == NULL)
|
2004-02-08 01:05:16 +01:00
|
|
|
make_command_window (&TUI_CMD_WIN,
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
cmd_height,
|
|
|
|
tui_term_height () - cmd_height);
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
init_gen_win_info (&TUI_CMD_WIN->generic,
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
TUI_CMD_WIN->generic.type,
|
|
|
|
TUI_CMD_WIN->generic.height,
|
|
|
|
TUI_CMD_WIN->generic.width,
|
|
|
|
0,
|
|
|
|
TUI_CMD_WIN->generic.origin.y);
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
TUI_CMD_WIN->can_highlight = FALSE;
|
|
|
|
tui_make_visible (&TUI_CMD_WIN->generic);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
if (TUI_CMD_WIN != NULL)
|
|
|
|
tui_refresh_win (&TUI_CMD_WIN->generic);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
}
|
2004-02-07 05:40:36 +01:00
|
|
|
tui_set_current_layout_to (SRC_DISASSEM_COMMAND);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2004-02-08 01:05:16 +01:00
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
/* Show the Source/Data/Command or the Dissassembly/Data/Command
|
|
|
|
layout. */
|
1999-04-16 03:35:26 +02:00
|
|
|
static void
|
2004-02-08 01:05:16 +01:00
|
|
|
show_data (enum tui_layout_type new_layout)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
int total_height = (tui_term_height () - TUI_CMD_WIN->generic.height);
|
|
|
|
int src_height, data_height;
|
|
|
|
enum tui_win_type win_type;
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-hooks.c, tui-layout.c,
tui-regs.c, tui-source.c, tui-stack.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-wingeneral.h, tui-winsource.c, tui.c,
tui-winsource.h: Whitespace changes, fix pointer declarations
to be consistant.
2007-08-14 22:23:29 +02:00
|
|
|
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
data_height = total_height / 2;
|
|
|
|
src_height = total_height - data_height;
|
2004-02-07 00:55:34 +01:00
|
|
|
tui_make_all_invisible ();
|
|
|
|
tui_make_invisible (locator);
|
2004-02-08 01:05:16 +01:00
|
|
|
make_data_window (&TUI_DATA_WIN, data_height, 0);
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
TUI_DATA_WIN->can_highlight = TRUE;
|
2004-02-08 01:05:16 +01:00
|
|
|
if (new_layout == SRC_DATA_COMMAND)
|
|
|
|
win_type = SRC_WIN;
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
win_type = DISASSEM_WIN;
|
|
|
|
if (tui_win_list[win_type] == NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
if (win_type == SRC_WIN)
|
|
|
|
make_source_window (&tui_win_list[win_type], src_height, data_height - 1);
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
make_disasm_window (&tui_win_list[win_type], src_height, data_height - 1);
|
2007-01-03 20:01:25 +01:00
|
|
|
locator = init_and_make_win (locator,
|
|
|
|
LOCATOR_WIN,
|
|
|
|
2 /* 1 */ ,
|
|
|
|
tui_term_width (),
|
|
|
|
0,
|
|
|
|
total_height - 1,
|
|
|
|
DONT_BOX_WINDOW);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
init_gen_win_info (&tui_win_list[win_type]->generic,
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
tui_win_list[win_type]->generic.type,
|
|
|
|
src_height,
|
|
|
|
tui_win_list[win_type]->generic.width,
|
|
|
|
tui_win_list[win_type]->detail.source_info.execution_info->width,
|
|
|
|
data_height - 1);
|
2004-02-08 01:05:16 +01:00
|
|
|
init_gen_win_info (tui_win_list[win_type]->detail.source_info.execution_info,
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
EXEC_INFO_WIN,
|
|
|
|
src_height,
|
|
|
|
3,
|
|
|
|
0,
|
|
|
|
data_height - 1);
|
2004-02-08 01:05:16 +01:00
|
|
|
tui_make_visible (&tui_win_list[win_type]->generic);
|
|
|
|
tui_make_visible (tui_win_list[win_type]->detail.source_info.execution_info);
|
|
|
|
init_gen_win_info (locator,
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
LOCATOR_WIN,
|
|
|
|
2 /* 1 */ ,
|
|
|
|
tui_term_width (),
|
|
|
|
0,
|
|
|
|
total_height - 1);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2004-02-08 01:05:16 +01:00
|
|
|
tui_win_list[win_type]->detail.source_info.has_locator = TRUE;
|
2004-02-07 00:55:34 +01:00
|
|
|
tui_make_visible (locator);
|
2004-01-29 00:16:50 +01:00
|
|
|
tui_show_locator_content ();
|
2004-02-08 01:05:16 +01:00
|
|
|
tui_add_to_source_windows (tui_win_list[win_type]);
|
|
|
|
tui_set_current_layout_to (new_layout);
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2007-08-14 23:39:22 +02:00
|
|
|
/* init_gen_win_info().
|
1999-07-07 22:19:36 +02:00
|
|
|
*/
|
1999-04-16 03:35:26 +02:00
|
|
|
static void
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
init_gen_win_info (struct tui_gen_win_info *win_info,
|
|
|
|
enum tui_win_type type,
|
|
|
|
int height, int width,
|
|
|
|
int origin_x, int origin_y)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
|
|
|
int h = height;
|
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
win_info->type = type;
|
|
|
|
win_info->width = width;
|
|
|
|
win_info->height = h;
|
1999-04-16 03:35:26 +02:00
|
|
|
if (h > 1)
|
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
win_info->viewport_height = h - 1;
|
|
|
|
if (win_info->type != CMD_WIN)
|
|
|
|
win_info->viewport_height--;
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
win_info->viewport_height = 1;
|
|
|
|
win_info->origin.x = origin_x;
|
|
|
|
win_info->origin.y = origin_y;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
return;
|
2004-02-08 01:05:16 +01:00
|
|
|
} /* init_gen_win_info */
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2007-08-14 23:39:22 +02:00
|
|
|
/* init_and_make_win().
|
1999-07-07 22:19:36 +02:00
|
|
|
*/
|
2007-01-03 20:01:25 +01:00
|
|
|
static void *
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
init_and_make_win (void *opaque_win_info,
|
|
|
|
enum tui_win_type win_type,
|
|
|
|
int height, int width,
|
|
|
|
int origin_x, int origin_y,
|
2007-01-03 20:01:25 +01:00
|
|
|
int box_it)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-hooks.c, tui-layout.c,
tui-regs.c, tui-source.c, tui-stack.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-wingeneral.h, tui-winsource.c, tui.c,
tui-winsource.h: Whitespace changes, fix pointer declarations
to be consistant.
2007-08-14 22:23:29 +02:00
|
|
|
struct tui_gen_win_info *generic;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
if (opaque_win_info == NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
if (tui_win_is_auxillary (win_type))
|
|
|
|
opaque_win_info = (void *) tui_alloc_generic_win_info ();
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
opaque_win_info = (void *) tui_alloc_win_info (win_type);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2004-02-08 01:05:16 +01:00
|
|
|
if (tui_win_is_auxillary (win_type))
|
|
|
|
generic = (struct tui_gen_win_info *) opaque_win_info;
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
generic = &((struct tui_win_info *) opaque_win_info)->generic;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
if (opaque_win_info != NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
init_gen_win_info (generic, win_type, height, width, origin_x, origin_y);
|
|
|
|
if (!tui_win_is_auxillary (win_type))
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
|
|
|
if (generic->type == CMD_WIN)
|
2004-02-08 01:05:16 +01:00
|
|
|
((struct tui_win_info *) opaque_win_info)->can_highlight = FALSE;
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
((struct tui_win_info *) opaque_win_info)->can_highlight = TRUE;
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2004-02-08 01:05:16 +01:00
|
|
|
tui_make_window (generic, box_it);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2007-01-03 20:01:25 +01:00
|
|
|
return opaque_win_info;
|
2002-08-24 14:28:33 +02:00
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
static void
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
make_source_or_disasm_window (struct tui_win_info **win_info_ptr,
|
|
|
|
enum tui_win_type type,
|
|
|
|
int height, int origin_y)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-hooks.c, tui-layout.c,
tui-regs.c, tui-source.c, tui-stack.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-wingeneral.h, tui-winsource.c, tui.c,
tui-winsource.h: Whitespace changes, fix pointer declarations
to be consistant.
2007-08-14 22:23:29 +02:00
|
|
|
struct tui_gen_win_info *execution_info = (struct tui_gen_win_info *) NULL;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2007-08-14 23:39:22 +02:00
|
|
|
/* Create the exeuction info window. */
|
1999-04-16 03:35:26 +02:00
|
|
|
if (type == SRC_WIN)
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
execution_info = tui_source_exec_info_win_ptr ();
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
execution_info = tui_disassem_exec_info_win_ptr ();
|
2007-01-03 20:01:25 +01:00
|
|
|
execution_info = init_and_make_win (execution_info,
|
|
|
|
EXEC_INFO_WIN,
|
|
|
|
height,
|
|
|
|
3,
|
|
|
|
0,
|
|
|
|
origin_y,
|
|
|
|
DONT_BOX_WINDOW);
|
2007-08-14 23:39:22 +02:00
|
|
|
|
|
|
|
/* Now create the source window. */
|
2007-01-03 20:01:25 +01:00
|
|
|
*win_info_ptr = init_and_make_win (*win_info_ptr,
|
|
|
|
type,
|
|
|
|
height,
|
|
|
|
tui_term_width () - execution_info->width,
|
|
|
|
execution_info->width,
|
|
|
|
origin_y,
|
|
|
|
BOX_WINDOW);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
(*win_info_ptr)->detail.source_info.execution_info = execution_info;
|
|
|
|
}
|
1999-04-16 03:35:26 +02:00
|
|
|
|
|
|
|
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-command.c, tui-data.c, tui-data.h, tui-disasm.c, tui-file.c,
tui-hooks.c, tui-interp.c, tui-io.c, tui-layout.c, tui-out.c,
tui-regs.c, tui-regs.h, tui-source.c, tui-stack.c, tui-win.c,
tui-windata.c, tui-wingeneral.c, tui-winsource.c, tui-winsource.h,
tui.c, tui.h: Comment reformatting to coding standard (capitals,
spaces after periods, etc).
2007-08-14 23:20:09 +02:00
|
|
|
/* Show the Source/Command or the Disassem layout. */
|
1999-04-16 03:35:26 +02:00
|
|
|
static void
|
2004-02-08 01:05:16 +01:00
|
|
|
show_source_or_disasm_and_command (enum tui_layout_type layout_type)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
if (tui_current_layout () != layout_type)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-hooks.c, tui-layout.c,
tui-regs.c, tui-source.c, tui-stack.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-wingeneral.h, tui-winsource.c, tui.c,
tui-winsource.h: Whitespace changes, fix pointer declarations
to be consistant.
2007-08-14 22:23:29 +02:00
|
|
|
struct tui_win_info **win_info_ptr;
|
2004-02-08 01:05:16 +01:00
|
|
|
int src_height, cmd_height;
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-hooks.c, tui-layout.c,
tui-regs.c, tui-source.c, tui-stack.c, tui-win.c, tui-windata.c,
tui-wingeneral.c, tui-wingeneral.h, tui-winsource.c, tui.c,
tui-winsource.h: Whitespace changes, fix pointer declarations
to be consistant.
2007-08-14 22:23:29 +02:00
|
|
|
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
if (TUI_CMD_WIN != NULL)
|
2004-02-08 01:05:16 +01:00
|
|
|
cmd_height = TUI_CMD_WIN->generic.height;
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
cmd_height = tui_term_height () / 3;
|
|
|
|
src_height = tui_term_height () - cmd_height;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
if (layout_type == SRC_COMMAND)
|
|
|
|
win_info_ptr = &TUI_SRC_WIN;
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
win_info_ptr = &TUI_DISASM_WIN;
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-08 01:05:16 +01:00
|
|
|
if ((*win_info_ptr) == NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
if (layout_type == SRC_COMMAND)
|
|
|
|
make_source_window (win_info_ptr, src_height - 1, 0);
|
1999-04-16 03:35:26 +02:00
|
|
|
else
|
2004-02-08 01:05:16 +01:00
|
|
|
make_disasm_window (win_info_ptr, src_height - 1, 0);
|
2007-01-03 20:01:25 +01:00
|
|
|
locator = init_and_make_win (locator,
|
|
|
|
LOCATOR_WIN,
|
|
|
|
2 /* 1 */ ,
|
|
|
|
tui_term_width (),
|
|
|
|
0,
|
|
|
|
src_height - 1,
|
|
|
|
DONT_BOX_WINDOW);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
init_gen_win_info (locator,
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
LOCATOR_WIN,
|
|
|
|
2 /* 1 */ ,
|
|
|
|
tui_term_width (),
|
|
|
|
0,
|
|
|
|
src_height - 1);
|
2004-02-08 01:05:16 +01:00
|
|
|
(*win_info_ptr)->detail.source_info.has_locator = TRUE;
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
init_gen_win_info (&(*win_info_ptr)->generic,
|
|
|
|
(*win_info_ptr)->generic.type,
|
|
|
|
src_height - 1,
|
|
|
|
(*win_info_ptr)->generic.width,
|
|
|
|
(*win_info_ptr)->detail.source_info.execution_info->width,
|
|
|
|
0);
|
2004-02-08 01:05:16 +01:00
|
|
|
init_gen_win_info ((*win_info_ptr)->detail.source_info.execution_info,
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
EXEC_INFO_WIN,
|
|
|
|
src_height - 1,
|
|
|
|
3,
|
|
|
|
0,
|
|
|
|
0);
|
2004-02-08 01:05:16 +01:00
|
|
|
(*win_info_ptr)->can_highlight = TRUE;
|
|
|
|
tui_make_visible (&(*win_info_ptr)->generic);
|
|
|
|
tui_make_visible ((*win_info_ptr)->detail.source_info.execution_info);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2004-02-08 01:05:16 +01:00
|
|
|
if ((*win_info_ptr) != NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
(*win_info_ptr)->detail.source_info.has_locator = TRUE;
|
2004-02-07 00:55:34 +01:00
|
|
|
tui_make_visible (locator);
|
2004-01-29 00:16:50 +01:00
|
|
|
tui_show_locator_content ();
|
2004-02-08 01:05:16 +01:00
|
|
|
tui_show_source_content (*win_info_ptr);
|
1999-04-16 03:35:26 +02:00
|
|
|
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
if (TUI_CMD_WIN == NULL)
|
1999-04-16 03:35:26 +02:00
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
make_command_window (&TUI_CMD_WIN, cmd_height, src_height);
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
tui_refresh_win (&TUI_CMD_WIN->generic);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-02-08 01:05:16 +01:00
|
|
|
init_gen_win_info (&TUI_CMD_WIN->generic,
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
tui-winsource.h, tui.c, tui.h: Function declarations and
definitions, wrap long lines.
2007-08-15 01:50:39 +02:00
|
|
|
TUI_CMD_WIN->generic.type,
|
|
|
|
TUI_CMD_WIN->generic.height,
|
|
|
|
TUI_CMD_WIN->generic.width,
|
|
|
|
TUI_CMD_WIN->generic.origin.x,
|
|
|
|
TUI_CMD_WIN->generic.origin.y);
|
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui.h: Do not include <stdarg.h>, <string.h>, and
"ansidecl.h". Do not undef "reg" and "chtype". Fix case of
fields and variables.
* tui/tui-wingeneral.h (m_beVisible): Delete macro.
(m_beInvisible): Delete macro.
* tui/tui-data.h: Fix case case fields and variables.
(m_genWinPtrIsNull): Delete macro.
(tui_win_list): Rename winList.
(TUI_SRC_WIN): Rename srcWin.
(TUI_DISASM_WIN): Rename disassemWin.
(TUI_DATA_WIN): Rename dataWin.
(TUI_CMD_WIN): Rename cmdWin.
(m_genWinPtrNotNull): Delete macro.
(m_winPtrIsNull): Delete macro.
(m_winPtrNotNull): Delete macro.
(tui_win_is_source_type): Replace m_winIsSourceType
(tui_win_is_auxillary): Replace m_winIsAuzillary.
(tui_win_has_locator): Replace m_hasLocator.
(tui_set_win_highlight): Replace m_setWinHighlightOn and
m_setWinHighlightOff.
* tui/tui-data.c: Update references.
(tui_win_is_source_type, tui_set_win_highlight): New functions.
(tui_win_has_locator, tui_win_is_auxillary): New functions.
* tui/tui-command.c, tui/tui-disasm.c: Update references.
* tui/tui-io.c, tui/tui-layout.c, tui/tui-regs.c: Ditto.
* tui/tui-regs.h, tui/tui-source.c, tui/tui-stack.c: Ditto.
* tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-winsource.c, tui/tui.c: Ditto.
2004-02-07 21:57:02 +01:00
|
|
|
TUI_CMD_WIN->can_highlight = FALSE;
|
|
|
|
tui_make_visible (&TUI_CMD_WIN->generic);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
|
|
|
}
|
2004-02-08 01:05:16 +01:00
|
|
|
tui_set_current_layout_to (layout_type);
|
1999-04-16 03:35:26 +02:00
|
|
|
}
|
2004-02-08 01:05:16 +01:00
|
|
|
}
|