binutils-gdb/gdb/tui/tui-regs.c

744 lines
22 KiB
C
Raw Normal View History

/* TUI display registers in window.
2002-03-01 07:19:28 +01:00
Copyright (C) 1998-2014 Free Software Foundation, Inc.
2002-03-01 07:19:28 +01:00
Contributed by Hewlett-Packard Company.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
* arch-utils.c (selected_byte_order): Return target_byte_order_user. (show_endian): Use target_byte_order_user if specified; otherwise use get_current_arch () instead of current_gdbarch. (show_architecture): Use set_architecture_string if specified; otherwise use get_current_arch () instead of current_gdbarch. (get_current_arch): New function. * arch-utils.h (get_current_arch): Add prototype. * osabi.c (show_osabi): Use get_current_arch () instead of current_gdbarch. * findcmd.c: Include "arch-utils.h". (parse_find_args): Add BIG_P argument. Use it instead of byte order of current_gdbarch. (find_command): Use get_current_arch () instead of current_gdbarch. Pass byte order to parse_find_args. * maint.c: Include "arch-utils.h". (maintenance_print_architecture): Use get_current_arch () instead of current_gdbarch. * reggroups.c: Include "arch-utils.h". (maintenance_print_reggroups): Use get_current_arch () instead of current_gdbarch. * symfile.c: Include "arch-utils.h". (overlay_load_command): Use get_current_arch () instead of current_gdbarch. * value.c: Include "arch-utils.h". (show_convenience): Use get_current_arch () instead of current_gdbarch. * tui/tui-regs.c: Include "arch-utils.h". (tui_reg_next_command): Use get_current_arch () instead of current_gdbarch. * mi/mi-main.c: Include "arch-utils.h". (mi_cmd_data_read_memory): Use get_current_arch () instead of current_gdbarch. * parse.c: Include "arch-utils.h". (parse_exp_in_context): Use get_current_arch () instead of current_gdbarch.
2009-07-02 19:02:35 +02:00
#include "arch-utils.h"
#include "tui/tui.h"
#include "tui/tui-data.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcmd.h"
#include "frame.h"
#include "regcache.h"
#include "inferior.h"
#include "target.h"
remove gdb_string.h This removes gdb_string.h. This patch is purely mechanical. I created it by running the two commands: git rm common/gdb_string.h perl -pi -e's/"gdb_string.h"/<string.h>/;' *.[chyl] */*.[chyl] 2013-11-18 Tom Tromey <tromey@redhat.com> * common/gdb_string.h: Remove. * aarch64-tdep.c: Use string.h, not gdb_string.h. * ada-exp.y: Use string.h, not gdb_string.h. * ada-lang.c: Use string.h, not gdb_string.h. * ada-lex.l: Use string.h, not gdb_string.h. * ada-typeprint.c: Use string.h, not gdb_string.h. * ada-valprint.c: Use string.h, not gdb_string.h. * aix-thread.c: Use string.h, not gdb_string.h. * alpha-linux-tdep.c: Use string.h, not gdb_string.h. * alpha-mdebug-tdep.c: Use string.h, not gdb_string.h. * alpha-nat.c: Use string.h, not gdb_string.h. * alpha-osf1-tdep.c: Use string.h, not gdb_string.h. * alpha-tdep.c: Use string.h, not gdb_string.h. * alphanbsd-tdep.c: Use string.h, not gdb_string.h. * amd64-dicos-tdep.c: Use string.h, not gdb_string.h. * amd64-linux-nat.c: Use string.h, not gdb_string.h. * amd64-linux-tdep.c: Use string.h, not gdb_string.h. * amd64-nat.c: Use string.h, not gdb_string.h. * amd64-sol2-tdep.c: Use string.h, not gdb_string.h. * amd64fbsd-tdep.c: Use string.h, not gdb_string.h. * amd64obsd-tdep.c: Use string.h, not gdb_string.h. * arch-utils.c: Use string.h, not gdb_string.h. * arm-linux-nat.c: Use string.h, not gdb_string.h. * arm-linux-tdep.c: Use string.h, not gdb_string.h. * arm-tdep.c: Use string.h, not gdb_string.h. * arm-wince-tdep.c: Use string.h, not gdb_string.h. * armbsd-tdep.c: Use string.h, not gdb_string.h. * armnbsd-nat.c: Use string.h, not gdb_string.h. * armnbsd-tdep.c: Use string.h, not gdb_string.h. * armobsd-tdep.c: Use string.h, not gdb_string.h. * avr-tdep.c: Use string.h, not gdb_string.h. * ax-gdb.c: Use string.h, not gdb_string.h. * ax-general.c: Use string.h, not gdb_string.h. * bcache.c: Use string.h, not gdb_string.h. * bfin-tdep.c: Use string.h, not gdb_string.h. * breakpoint.c: Use string.h, not gdb_string.h. * build-id.c: Use string.h, not gdb_string.h. * buildsym.c: Use string.h, not gdb_string.h. * c-exp.y: Use string.h, not gdb_string.h. * c-lang.c: Use string.h, not gdb_string.h. * c-typeprint.c: Use string.h, not gdb_string.h. * c-valprint.c: Use string.h, not gdb_string.h. * charset.c: Use string.h, not gdb_string.h. * cli-out.c: Use string.h, not gdb_string.h. * cli/cli-cmds.c: Use string.h, not gdb_string.h. * cli/cli-decode.c: Use string.h, not gdb_string.h. * cli/cli-dump.c: Use string.h, not gdb_string.h. * cli/cli-interp.c: Use string.h, not gdb_string.h. * cli/cli-logging.c: Use string.h, not gdb_string.h. * cli/cli-script.c: Use string.h, not gdb_string.h. * cli/cli-setshow.c: Use string.h, not gdb_string.h. * cli/cli-utils.c: Use string.h, not gdb_string.h. * coffread.c: Use string.h, not gdb_string.h. * common/common-utils.c: Use string.h, not gdb_string.h. * common/filestuff.c: Use string.h, not gdb_string.h. * common/linux-procfs.c: Use string.h, not gdb_string.h. * common/linux-ptrace.c: Use string.h, not gdb_string.h. * common/signals.c: Use string.h, not gdb_string.h. * common/vec.h: Use string.h, not gdb_string.h. * core-regset.c: Use string.h, not gdb_string.h. * corefile.c: Use string.h, not gdb_string.h. * corelow.c: Use string.h, not gdb_string.h. * cp-abi.c: Use string.h, not gdb_string.h. * cp-support.c: Use string.h, not gdb_string.h. * cp-valprint.c: Use string.h, not gdb_string.h. * cris-tdep.c: Use string.h, not gdb_string.h. * d-lang.c: Use string.h, not gdb_string.h. * dbxread.c: Use string.h, not gdb_string.h. * dcache.c: Use string.h, not gdb_string.h. * demangle.c: Use string.h, not gdb_string.h. * dicos-tdep.c: Use string.h, not gdb_string.h. * disasm.c: Use string.h, not gdb_string.h. * doublest.c: Use string.h, not gdb_string.h. * dsrec.c: Use string.h, not gdb_string.h. * dummy-frame.c: Use string.h, not gdb_string.h. * dwarf2-frame.c: Use string.h, not gdb_string.h. * dwarf2loc.c: Use string.h, not gdb_string.h. * dwarf2read.c: Use string.h, not gdb_string.h. * elfread.c: Use string.h, not gdb_string.h. * environ.c: Use string.h, not gdb_string.h. * eval.c: Use string.h, not gdb_string.h. * event-loop.c: Use string.h, not gdb_string.h. * exceptions.c: Use string.h, not gdb_string.h. * exec.c: Use string.h, not gdb_string.h. * expprint.c: Use string.h, not gdb_string.h. * f-exp.y: Use string.h, not gdb_string.h. * f-lang.c: Use string.h, not gdb_string.h. * f-typeprint.c: Use string.h, not gdb_string.h. * f-valprint.c: Use string.h, not gdb_string.h. * fbsd-nat.c: Use string.h, not gdb_string.h. * findcmd.c: Use string.h, not gdb_string.h. * findvar.c: Use string.h, not gdb_string.h. * fork-child.c: Use string.h, not gdb_string.h. * frame.c: Use string.h, not gdb_string.h. * frv-linux-tdep.c: Use string.h, not gdb_string.h. * frv-tdep.c: Use string.h, not gdb_string.h. * gdb.c: Use string.h, not gdb_string.h. * gdb_bfd.c: Use string.h, not gdb_string.h. * gdbarch.c: Use string.h, not gdb_string.h. * gdbtypes.c: Use string.h, not gdb_string.h. * gnu-nat.c: Use string.h, not gdb_string.h. * gnu-v2-abi.c: Use string.h, not gdb_string.h. * gnu-v3-abi.c: Use string.h, not gdb_string.h. * go-exp.y: Use string.h, not gdb_string.h. * go-lang.c: Use string.h, not gdb_string.h. * go32-nat.c: Use string.h, not gdb_string.h. * hppa-hpux-tdep.c: Use string.h, not gdb_string.h. * hppa-linux-nat.c: Use string.h, not gdb_string.h. * hppanbsd-tdep.c: Use string.h, not gdb_string.h. * hppaobsd-tdep.c: Use string.h, not gdb_string.h. * i386-cygwin-tdep.c: Use string.h, not gdb_string.h. * i386-dicos-tdep.c: Use string.h, not gdb_string.h. * i386-linux-nat.c: Use string.h, not gdb_string.h. * i386-linux-tdep.c: Use string.h, not gdb_string.h. * i386-nto-tdep.c: Use string.h, not gdb_string.h. * i386-sol2-tdep.c: Use string.h, not gdb_string.h. * i386-tdep.c: Use string.h, not gdb_string.h. * i386bsd-tdep.c: Use string.h, not gdb_string.h. * i386gnu-nat.c: Use string.h, not gdb_string.h. * i386nbsd-tdep.c: Use string.h, not gdb_string.h. * i386obsd-tdep.c: Use string.h, not gdb_string.h. * i387-tdep.c: Use string.h, not gdb_string.h. * ia64-libunwind-tdep.c: Use string.h, not gdb_string.h. * ia64-linux-nat.c: Use string.h, not gdb_string.h. * inf-child.c: Use string.h, not gdb_string.h. * inf-ptrace.c: Use string.h, not gdb_string.h. * inf-ttrace.c: Use string.h, not gdb_string.h. * infcall.c: Use string.h, not gdb_string.h. * infcmd.c: Use string.h, not gdb_string.h. * inflow.c: Use string.h, not gdb_string.h. * infrun.c: Use string.h, not gdb_string.h. * interps.c: Use string.h, not gdb_string.h. * iq2000-tdep.c: Use string.h, not gdb_string.h. * irix5-nat.c: Use string.h, not gdb_string.h. * jv-exp.y: Use string.h, not gdb_string.h. * jv-lang.c: Use string.h, not gdb_string.h. * jv-typeprint.c: Use string.h, not gdb_string.h. * jv-valprint.c: Use string.h, not gdb_string.h. * language.c: Use string.h, not gdb_string.h. * linux-fork.c: Use string.h, not gdb_string.h. * linux-nat.c: Use string.h, not gdb_string.h. * lm32-tdep.c: Use string.h, not gdb_string.h. * m2-exp.y: Use string.h, not gdb_string.h. * m2-typeprint.c: Use string.h, not gdb_string.h. * m32c-tdep.c: Use string.h, not gdb_string.h. * m32r-linux-nat.c: Use string.h, not gdb_string.h. * m32r-linux-tdep.c: Use string.h, not gdb_string.h. * m32r-rom.c: Use string.h, not gdb_string.h. * m32r-tdep.c: Use string.h, not gdb_string.h. * m68hc11-tdep.c: Use string.h, not gdb_string.h. * m68k-tdep.c: Use string.h, not gdb_string.h. * m68kbsd-tdep.c: Use string.h, not gdb_string.h. * m68klinux-nat.c: Use string.h, not gdb_string.h. * m68klinux-tdep.c: Use string.h, not gdb_string.h. * m88k-tdep.c: Use string.h, not gdb_string.h. * macrocmd.c: Use string.h, not gdb_string.h. * main.c: Use string.h, not gdb_string.h. * mdebugread.c: Use string.h, not gdb_string.h. * mem-break.c: Use string.h, not gdb_string.h. * memattr.c: Use string.h, not gdb_string.h. * memory-map.c: Use string.h, not gdb_string.h. * mep-tdep.c: Use string.h, not gdb_string.h. * mi/mi-cmd-break.c: Use string.h, not gdb_string.h. * mi/mi-cmd-disas.c: Use string.h, not gdb_string.h. * mi/mi-cmd-env.c: Use string.h, not gdb_string.h. * mi/mi-cmd-stack.c: Use string.h, not gdb_string.h. * mi/mi-cmd-var.c: Use string.h, not gdb_string.h. * mi/mi-cmds.c: Use string.h, not gdb_string.h. * mi/mi-console.c: Use string.h, not gdb_string.h. * mi/mi-getopt.c: Use string.h, not gdb_string.h. * mi/mi-interp.c: Use string.h, not gdb_string.h. * mi/mi-main.c: Use string.h, not gdb_string.h. * mi/mi-parse.c: Use string.h, not gdb_string.h. * microblaze-rom.c: Use string.h, not gdb_string.h. * microblaze-tdep.c: Use string.h, not gdb_string.h. * mingw-hdep.c: Use string.h, not gdb_string.h. * minidebug.c: Use string.h, not gdb_string.h. * minsyms.c: Use string.h, not gdb_string.h. * mips-irix-tdep.c: Use string.h, not gdb_string.h. * mips-linux-tdep.c: Use string.h, not gdb_string.h. * mips-tdep.c: Use string.h, not gdb_string.h. * mips64obsd-tdep.c: Use string.h, not gdb_string.h. * mipsnbsd-tdep.c: Use string.h, not gdb_string.h. * mipsread.c: Use string.h, not gdb_string.h. * mn10300-linux-tdep.c: Use string.h, not gdb_string.h. * mn10300-tdep.c: Use string.h, not gdb_string.h. * monitor.c: Use string.h, not gdb_string.h. * moxie-tdep.c: Use string.h, not gdb_string.h. * mt-tdep.c: Use string.h, not gdb_string.h. * nbsd-tdep.c: Use string.h, not gdb_string.h. * nios2-linux-tdep.c: Use string.h, not gdb_string.h. * nto-procfs.c: Use string.h, not gdb_string.h. * nto-tdep.c: Use string.h, not gdb_string.h. * objc-lang.c: Use string.h, not gdb_string.h. * objfiles.c: Use string.h, not gdb_string.h. * opencl-lang.c: Use string.h, not gdb_string.h. * osabi.c: Use string.h, not gdb_string.h. * osdata.c: Use string.h, not gdb_string.h. * p-exp.y: Use string.h, not gdb_string.h. * p-lang.c: Use string.h, not gdb_string.h. * p-typeprint.c: Use string.h, not gdb_string.h. * parse.c: Use string.h, not gdb_string.h. * posix-hdep.c: Use string.h, not gdb_string.h. * ppc-linux-nat.c: Use string.h, not gdb_string.h. * ppc-sysv-tdep.c: Use string.h, not gdb_string.h. * ppcfbsd-tdep.c: Use string.h, not gdb_string.h. * ppcnbsd-tdep.c: Use string.h, not gdb_string.h. * ppcobsd-tdep.c: Use string.h, not gdb_string.h. * printcmd.c: Use string.h, not gdb_string.h. * procfs.c: Use string.h, not gdb_string.h. * prologue-value.c: Use string.h, not gdb_string.h. * python/py-auto-load.c: Use string.h, not gdb_string.h. * python/py-gdb-readline.c: Use string.h, not gdb_string.h. * ravenscar-thread.c: Use string.h, not gdb_string.h. * regcache.c: Use string.h, not gdb_string.h. * registry.c: Use string.h, not gdb_string.h. * remote-fileio.c: Use string.h, not gdb_string.h. * remote-m32r-sdi.c: Use string.h, not gdb_string.h. * remote-mips.c: Use string.h, not gdb_string.h. * remote-sim.c: Use string.h, not gdb_string.h. * remote.c: Use string.h, not gdb_string.h. * reverse.c: Use string.h, not gdb_string.h. * rs6000-aix-tdep.c: Use string.h, not gdb_string.h. * ser-base.c: Use string.h, not gdb_string.h. * ser-go32.c: Use string.h, not gdb_string.h. * ser-mingw.c: Use string.h, not gdb_string.h. * ser-pipe.c: Use string.h, not gdb_string.h. * ser-tcp.c: Use string.h, not gdb_string.h. * ser-unix.c: Use string.h, not gdb_string.h. * serial.c: Use string.h, not gdb_string.h. * sh-tdep.c: Use string.h, not gdb_string.h. * sh64-tdep.c: Use string.h, not gdb_string.h. * shnbsd-tdep.c: Use string.h, not gdb_string.h. * skip.c: Use string.h, not gdb_string.h. * sol-thread.c: Use string.h, not gdb_string.h. * solib-dsbt.c: Use string.h, not gdb_string.h. * solib-frv.c: Use string.h, not gdb_string.h. * solib-osf.c: Use string.h, not gdb_string.h. * solib-spu.c: Use string.h, not gdb_string.h. * solib-target.c: Use string.h, not gdb_string.h. * solib.c: Use string.h, not gdb_string.h. * somread.c: Use string.h, not gdb_string.h. * source.c: Use string.h, not gdb_string.h. * sparc-nat.c: Use string.h, not gdb_string.h. * sparc-sol2-tdep.c: Use string.h, not gdb_string.h. * sparc-tdep.c: Use string.h, not gdb_string.h. * sparc64-tdep.c: Use string.h, not gdb_string.h. * sparc64fbsd-tdep.c: Use string.h, not gdb_string.h. * sparc64nbsd-tdep.c: Use string.h, not gdb_string.h. * sparcnbsd-tdep.c: Use string.h, not gdb_string.h. * spu-linux-nat.c: Use string.h, not gdb_string.h. * spu-multiarch.c: Use string.h, not gdb_string.h. * spu-tdep.c: Use string.h, not gdb_string.h. * stabsread.c: Use string.h, not gdb_string.h. * stack.c: Use string.h, not gdb_string.h. * std-regs.c: Use string.h, not gdb_string.h. * symfile.c: Use string.h, not gdb_string.h. * symmisc.c: Use string.h, not gdb_string.h. * symtab.c: Use string.h, not gdb_string.h. * target.c: Use string.h, not gdb_string.h. * thread.c: Use string.h, not gdb_string.h. * tilegx-linux-nat.c: Use string.h, not gdb_string.h. * tilegx-tdep.c: Use string.h, not gdb_string.h. * top.c: Use string.h, not gdb_string.h. * tracepoint.c: Use string.h, not gdb_string.h. * tui/tui-command.c: Use string.h, not gdb_string.h. * tui/tui-data.c: Use string.h, not gdb_string.h. * tui/tui-disasm.c: Use string.h, not gdb_string.h. * tui/tui-file.c: Use string.h, not gdb_string.h. * tui/tui-layout.c: Use string.h, not gdb_string.h. * tui/tui-out.c: Use string.h, not gdb_string.h. * tui/tui-regs.c: Use string.h, not gdb_string.h. * tui/tui-source.c: Use string.h, not gdb_string.h. * tui/tui-stack.c: Use string.h, not gdb_string.h. * tui/tui-win.c: Use string.h, not gdb_string.h. * tui/tui-windata.c: Use string.h, not gdb_string.h. * tui/tui-winsource.c: Use string.h, not gdb_string.h. * typeprint.c: Use string.h, not gdb_string.h. * ui-file.c: Use string.h, not gdb_string.h. * ui-out.c: Use string.h, not gdb_string.h. * user-regs.c: Use string.h, not gdb_string.h. * utils.c: Use string.h, not gdb_string.h. * v850-tdep.c: Use string.h, not gdb_string.h. * valarith.c: Use string.h, not gdb_string.h. * valops.c: Use string.h, not gdb_string.h. * valprint.c: Use string.h, not gdb_string.h. * value.c: Use string.h, not gdb_string.h. * varobj.c: Use string.h, not gdb_string.h. * vax-tdep.c: Use string.h, not gdb_string.h. * vaxnbsd-tdep.c: Use string.h, not gdb_string.h. * vaxobsd-tdep.c: Use string.h, not gdb_string.h. * windows-nat.c: Use string.h, not gdb_string.h. * xcoffread.c: Use string.h, not gdb_string.h. * xml-support.c: Use string.h, not gdb_string.h. * xstormy16-tdep.c: Use string.h, not gdb_string.h. * xtensa-linux-nat.c: Use string.h, not gdb_string.h.
2013-11-06 15:14:23 +01:00
#include <string.h>
#include "tui/tui-layout.h"
#include "tui/tui-win.h"
#include "tui/tui-windata.h"
#include "tui/tui-wingeneral.h"
#include "tui/tui-file.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-regs.h"
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
#include "reggroups.h"
gdb * varobj.c (value_get_print_value): Include valprint.h. (value_get_print_value): Use get_formatted_print_options. * value.h (struct value_print_options): Declare. (value_print, val_print, common_val_print, val_print_string): Update. * value.c: Include valprint.h. (show_values): Use get_user_print_options. (show_convenience): Likewise. * valprint.h (prettyprint_arrays, prettyprint_structs): Don't declare. (struct value_print_options): New type. (vtblprint, unionprint, addressprint, objectprint, print_max, inspect_it, repeat_count_threshold, output_format, stop_print_at_null): Don't declare. (user_print_options, get_user_print_options, get_raw_print_options, get_formatted_print_options): Declare. (print_array_indexes_p): Don't declare. (maybe_print_array_index, val_print_array_elements): Update. * valprint.c (print_max): Remove. (user_print_options): New global. (get_user_print_options, get_raw_print_options, get_formatted_print_options): New functions. (print_array_indexes, repeat_count_threshold, stop_print_at_null, prettyprint_structs, prettyprint_arrays, unionprint, addressprint): Remove. (val_print): Remove format, deref_ref, pretty arguments; add options. Update. (common_val_print): Likewise. (print_array_indexes_p): Remove. (maybe_print_array_index): Remove format, pretty arguments; add options. Update. (val_print_array_elements): Remove format, deref_ref, pretty arguments; add options. Update. (val_print_string): Add options argument. Update. (_initialize_valprint): Use user_print_options. (output_format): Remove. (set_output_radix_1): Use user_print_options. * typeprint.c: Include valprint.h. (objectprint): Don't declare. (whatis_exp): Use get_user_print_options. * tui/tui-regs.c: Include valprint.h. (tui_register_format): Use get_formatted_print_options. * tracepoint.c: Include valprint.h. (addressprint): Don't declare. (trace_mention): Use get_user_print_options. (tracepoints_info): Likewise. * stack.c (print_frame_args): Use get_raw_print_options. (print_frame_info): Use get_user_print_options. (print_frame): Likewise. * sh64-tdep.c: Include valprint.h (sh64_do_register): Use get_formatted_print_options. * scm-valprint.c (scm_inferior_print): Remove format, deref_ref, pretty arguments; add options. (scm_scmlist_print): Likewise. Update. (scm_scmval_print): Likewise. (scm_val_print): Likewise. (scm_value_print): Remove format, pretty arguments; add options. Update. * scm-lang.h (scm_value_print, scm_val_print, scm_scmval_print): Update. * scm-lang.c (scm_printstr): Add options argument. * python/python-value.c: Include valprint.h. (valpy_str): Use get_user_print_options. * printcmd.c: Include valprint.h. (addressprint): Don't declare. (inspect_it): Remove. (print_formatted): Remove format option; add options. Update. (print_scalar_formatted): Likewise. (print_address_demangle): Use get_user_print_options. (do_examine): Use get_formatted_print_options. (print_command_1): Likewise. (output_command): Use get_formatted_print_options. (do_one_display): Likewise. (print_variable_value): Use get_user_print_options. * p-valprint.c (pascal_val_print): Remove format, deref_ref, pretty arguments; add options. Update. (pascal_value_print): Remove format, pretty arguments; add options. Update. (vtblprint, objectprint): Don't declare. (pascal_static_field_print): Remove. (pascal_object_print_value_fields): Remove format, pretty arguments; add options. Update. (pascal_object_print_static_field): Likewise. (_initialize_pascal_valprint): Use user_print_options. Update. * p-lang.h (pascal_val_print, pascal_value_print, pascal_printstr, pascal_object_print_value_fields): Update. (vtblprint, static_field_print): Don't declare. * p-lang.c (pascal_printstr): Add options argument. Update. * objc-lang.c (objc_printstr): Add options argument. Update. * mt-tdep.c: Include valprint.h. (mt_registers_info): Use get_raw_print_options. * mips-tdep.c: Include valprint.h. (mips_print_fp_register): Use get_formatted_print_options. (mips_print_register): Likewise. * mi/mi-main.c: Include valprint.h. (get_register): Use get_user_print_options. (mi_cmd_data_evaluate_expression): Likewise. (mi_cmd_data_read_memory): Use get_formatted_print_options. * mi/mi-cmd-stack.c: Include valprint.h. (list_args_or_locals): Use get_raw_print_options. * m2-valprint.c (print_function_pointer_address): Add addressprint argument. (m2_print_long_set): Remove format, pretty arguments. (m2_print_unbounded_array): Remove format, deref_ref, pretty arguments; add options. Update. (print_unpacked_pointer): Remove format argument; add options. Now static. Update. (print_variable_at_address): Remove format, deref_ref, pretty arguments; add options. Update. (m2_print_array_contents): Likewise. (m2_val_print): Likewise. * m2-lang.h (m2_val_print): Update. * m2-lang.c (m2_printstr): Add options argument. Update. * language.h (struct value_print_options): Declare. (struct language_defn) <la_printstr>: Add options argument. <la_val_print>: Remove format, deref_ref, pretty argument; add options. <la_value_print>: Remove format, pretty arguments; add options. <la_print_array_index>: Likewise. (LA_VAL_PRINT, LA_VALUE_PRINT, LA_PRINT_STRING, LA_PRINT_ARRAY_INDEX): Update. (default_print_array_index): Update. * language.c (default_print_array_index): Remove format, pretty arguments; add options. Update. (unk_lang_printstr): Add options argument. (unk_lang_val_print): Remove format, deref_ref, pretty arguments; add options. (unk_lang_value_print): Remove format, pretty arguments; add options. * jv-valprint.c (java_value_print): Remove format, pretty arguments; add options. Update. (java_print_value_fields): Likewise. (java_val_print): Remove format, deref_ref, pretty arguments; add options. Update. * jv-lang.h (java_val_print, java_value_print): Declare. * infcmd.c: Include valprint.h. (print_return_value): Use get_raw_print_options. (default_print_registers_info): Use get_user_print_options, get_formatted_print_options. (registers_info): Use get_formatted_print_options. * gdbtypes.h (struct value_print_options): Declare. (print_scalar_formatted): Update. * f-valprint.c (f77_print_array_1): Remove format, deref_ref, pretty arguments; add options. Update. (f77_print_array): Likewise. (f_val_print): Likewise. * f-lang.h (f_val_print): Update. * f-lang.c (f_printstr): Add options argument. Update. (c_value_print): Update declaration. * expprint.c: Include valprint.h. (print_subexp_standard): Use get_raw_print_options, get_user_print_options. * eval.c: Include valprint.h. (objectprint): Don't declare. (evaluate_subexp_standard): Use get_user_print_options. * cp-valprint.c (vtblprint, objectprint, static_field_print): Remove. (cp_print_value_fields): Remove format, pretty arguments; add options. Update. (cp_print_value): Likewise. (cp_print_static_field): Likewise. (_initialize_cp_valprint): Use user_print_options. Update. * c-valprint.c (print_function_pointer_address): Add addressprint argument. (c_val_print): Remove format, deref_ref, pretty arguments; add options. Update. (c_value_print): Add options argument. Update. * c-lang.h (c_val_print, c_value_print, c_printstr): Update. (vtblprint, static_field_print): Don't declare. (cp_print_value_fields): Update. * c-lang.c (c_printstr): Add options argument. Update. * breakpoint.c: Include valprint.h. (addressprint): Don't declare. (watchpoint_value_print): Use get_user_print_options. (print_one_breakpoint_location): Likewise. (breakpoint_1, print_it_catch_fork, print_it_catch_vfork, mention, print_exception_catchpoint): Likewise. * auxv.c (fprint_target_auxv): Don't declare addressprint. Use get_user_print_options. * ada-valprint.c (struct ada_val_print_args): Remove format, deref_ref, and pretty; add options. (print_optional_low_bound): Add options argument. (val_print_packed_array_elements): Remove format and pretty arguments; add options. Update. (printstr): Add options argument. Update. (ada_printstr): Likewise. (ada_val_print): Remove format, deref_ref, pretty arguments; add options argument. Update. (ada_val_print_stub): Update. (ada_val_print_array): Remove format, deref_ref, pretty arguments; add options. Update. (ada_val_print_1): Likewise. (print_variant_part): Likewise. (ada_value_print): Remove format, pretty arguments; add options. Update. (print_record): Likewise. (print_field_values): Likewise. * ada-lang.h (ada_val_print, ada_value_print, ada_printstr): Update. * ada-lang.c (ada_print_array_index): Add options argument; remove format and pretty arguments. (print_one_exception): Use get_user_print_options. gdb/testsuite * gdb.base/exprs.exp (test_expr): Add enum formatting tests.
2008-10-28 18:19:58 +01:00
#include "valprint.h"
#include "gdb_curses.h"
/*****************************************
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
** STATIC LOCAL FUNCTIONS FORWARD DECLS **
******************************************/
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
static void
tui_display_register (struct tui_data_element *data,
struct tui_gen_win_info *win_info);
static enum tui_status tui_show_register_group (struct reggroup *group,
struct frame_info *frame,
int refresh_values_only);
static enum tui_status tui_get_register (struct frame_info *frame,
struct tui_data_element *data,
int regnum, int *changedp);
static void tui_scroll_regs_forward_command (char *, int);
static void tui_scroll_regs_backward_command (char *, int);
/*****************************************
** PUBLIC FUNCTIONS **
******************************************/
/* Answer the number of the last line in the regs display. If there
are no registers (-1) is returned. */
int
tui_last_regs_line_no (void)
{
int num_lines = (-1);
if (TUI_DATA_WIN->detail.data_display_info.regs_content_count > 0)
{
num_lines = (TUI_DATA_WIN->detail.data_display_info.regs_content_count /
TUI_DATA_WIN->detail.data_display_info.regs_column_count);
if (TUI_DATA_WIN->detail.data_display_info.regs_content_count %
TUI_DATA_WIN->detail.data_display_info.regs_column_count)
num_lines++;
}
return num_lines;
}
/* Answer the line number that the register element at element_no is
on. If element_no is greater than the number of register elements
there are, -1 is returned. */
int
tui_line_from_reg_element_no (int element_no)
{
if (element_no < TUI_DATA_WIN->detail.data_display_info.regs_content_count)
{
int i, line = (-1);
i = 1;
while (line == (-1))
{
if (element_no <
(TUI_DATA_WIN->detail.data_display_info.regs_column_count * i))
line = i - 1;
else
i++;
}
return line;
}
else
return (-1);
}
/* Answer the index of the first element in line_no. If line_no is
past the register area (-1) is returned. */
int
tui_first_reg_element_no_inline (int line_no)
{
if ((line_no * TUI_DATA_WIN->detail.data_display_info.regs_column_count)
<= TUI_DATA_WIN->detail.data_display_info.regs_content_count)
return ((line_no + 1) *
TUI_DATA_WIN->detail.data_display_info.regs_column_count) -
TUI_DATA_WIN->detail.data_display_info.regs_column_count;
else
return (-1);
}
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
/* Show the registers of the given group in the data window
and refresh the window. */
void
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
tui_show_registers (struct reggroup *group)
{
enum tui_status ret = TUI_FAILURE;
struct tui_data_info *display_info;
/* Make sure the curses mode is enabled. */
tui_enable ();
/* Make sure the register window is visible. If not, select an
appropriate layout. */
if (TUI_DATA_WIN == NULL || !TUI_DATA_WIN->generic.is_visible)
tui_set_layout_for_display_command (DATA_NAME);
display_info = &TUI_DATA_WIN->detail.data_display_info;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
if (group == 0)
group = general_reggroup;
/* Say that registers should be displayed, even if there is a
problem. */
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
display_info->display_regs = TRUE;
if (target_has_registers && target_has_stack && target_has_memory)
{
ret = tui_show_register_group (group, get_selected_frame (NULL),
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
group == display_info->current_group);
}
if (ret == TUI_FAILURE)
{
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
display_info->current_group = 0;
tui_erase_data_content (NO_REGS_STRING);
}
else
{
int i;
/* Clear all notation of changed values. */
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
for (i = 0; i < display_info->regs_content_count; i++)
{
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
struct tui_gen_win_info *data_item_win;
struct tui_win_element *win;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
data_item_win = &display_info->regs_content[i]
->which_element.data_window;
win = (struct tui_win_element *) data_item_win->content[0];
win->which_element.data.highlight = FALSE;
}
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
display_info->current_group = group;
tui_display_all_data ();
}
}
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
/* Set the data window to display the registers of the register group
using the given frame. Values are refreshed only when
refresh_values_only is TRUE. */
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
static enum tui_status
tui_show_register_group (struct reggroup *group,
struct frame_info *frame,
int refresh_values_only)
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
{
struct gdbarch *gdbarch = get_frame_arch (frame);
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
enum tui_status ret = TUI_FAILURE;
int nr_regs;
int allocated_here = FALSE;
int regnum, pos;
char title[80];
struct tui_data_info *display_info = &TUI_DATA_WIN->detail.data_display_info;
/* Make a new title showing which group we display. */
snprintf (title, sizeof (title) - 1, "Register group: %s",
reggroup_name (group));
xfree (TUI_DATA_WIN->generic.title);
TUI_DATA_WIN->generic.title = xstrdup (title);
/* See how many registers must be displayed. */
nr_regs = 0;
2007-05-31 Markus Deuling <deuling@de.ibm.com> * gdbarch.sh (NUM_REGS): Replace by gdbarch_num_regs. * i386-tdep.c (i386_dbx_reg_to_regnum) (i386_svr4_reg_to_regnum): Likewise. * inf-ptrace.c (inf_ptrace_fetch_registers) (inf_ptrace_store_registers): Likewise. * corelow.c (get_core_registers): Likewise. * i386-linux-nat.c (supply_gregset, fill_gregset) (i386_linux_fetch_inferior_registers) (i386_linux_store_inferior_registers): Likewise. * remote.c (init_remote_state,packet_reg_from_regnum) (packet_reg_from_pnum,process_g_packet,remote_fetch_registers) (remote_prepare_to_store,store_registers_using_G) (remote_store_registers,remote_arch_state): Likewise. * tracepoint.c (encode_actions): Likewise. * mi/mi-main.c (mi_cmd_data_list_register_names) (mi_cmd_data_list_changed_registers,mi_cmd_data_list_register_values) (mi_cmd_data_write_register_values): Likewise. * tui/tui-regs.c (tui_show_register_group) (tui_show_register_group): Likewise. * xtensa-tdep.h (FP_ALIAS): Likewise. * xtensa-tdep.c (xtensa_register_name,xtensa_register_type) (xtensa_reg_to_regnum,xtensa_pseudo_register_read) (xtensa_pseudo_register_write,xtensa_register_reggroup_p): Likewise. * win32-nat.c (do_win32_fetch_inferior_registers) (do_win32_store_inferior_registers,fetch_elf_core_registers * user-regs.h: Likewise (comment). * user-regs.c (user_reg, user_reg_map_name_to_regnum): Likewise. * trad-frame.c (trad_frame_alloc_saved_regs): Likewise. * target-descriptions.h: Likewise (comment). * target-descriptions.c (tdesc_use_registers): Likewise (comment). * target.c (debug_print_register): Likewise. * stack.c (frame_info): Likewise. * stabsread.c (define_symbol): Likewise. * sh64-tdep.c (sh64_do_pseudo_register,sh64_print_register) (sh64_media_print_registers_info) (sh64_compact_print_registers_info): Likewise. * rs6000-tdep.c (rs6000_register_sim_regno): Likewise. * rs6000-nat.c (fetch_register,store_register): Likewise. * remote-sim.c (one2one_register_sim_regno,gdbsim_fetch_register) (gdbsim_fetch_register,gdbsim_store_register): Likewise. * remote-mips.c (mips_fetch_registers,mips_store_registers): Likewise. * remote-m32r-sdi.c (m32r_fetch_registers) (m32r_store_registers): Likewise. * reggroups.c (default_register_reggroup_p): Likewise. * regcache.c (init_regcache_descr,register_size,regcache,regcache_save) (regcache_restore,regcache_dump): Likewise. * monitor.c (monitor_fetch_registers,monitor_store_registers): Likewise. * mips-tdep.c (mips_xfer_register,mips_register_name) (mips_register_reggroup_p,mips_pseudo_register_read) (mips_pseudo_register_write,mips_convert_register_p,mips_register_type) (mips_unwind_pc,mips_unwind_sp,mips_unwind_dummy_id,set_reg_offset) (mips16_scan_prologue,mips_insn16_frame_cache,reset_saved_regs) (mips32_scan_prologue,mips_insn32_frame_cache,read_next_frame_reg) (mips_n32n64_return_value,mips_o32_return_value,mips_o64_return_value) (print_gp_register_row,mips_print_registers_info) (mips_stab_reg_to_regnum,mips_dwarf_dwarf2_ecoff_reg_to_regnum) (mips_register_sim_regno): Likewise. * mips-linux-tdep.c (mips_linux_o32_sigframe_init) (mips_linux_n32n64_sigframe_init): Likewise. * mips-linux-nat.c (mips_linux_register_addr) (mips64_linux_register_addr): Likewise. * findvar.c (value_of_register): Likewise. * infcmd.c (default_print_registers_info,registers_info) (print_vector_info,print_float_info): Likewise. * mips64obsd-tdep.c (mips64obsd_sigframe_init): Likewise. * inf-child.c (inf_child_fetch_inferior_registers): Likewise. * m68k-tdep.c (m68k_dwarf_reg_to_regnum): Likewise. * m68hc11-tdep.c (m68hc11_frame_unwind_cache(: Likewise. * m32r-tdep.c (m32r_frame_unwind_cache): Likewise. * ia64-linux-nat.c (ia64_register_addr,ia64_cannot_fetch_register) (ia64_cannot_store_register,ia64_linux_fetch_registers) (ia64_linux_store_registers): Likewise. * hpux-thread.c (hpux_thread_fetch_registers) (hpux_thread_store_registers): Likewise. * h8300-tdep.c (E_PSEUDO_CCR_REGNUM,E_PSEUDO_EXR_REGNUM) (h8300_init_frame_cache,h8300_frame_cache,h8300_frame_prev_register) (h8300_register_type): Likewise. * dwarf2-frame.c (dwarf2_frame_cache) (dwarf2_frame_state_alloc_regs): Likewise. * cris-tdep.c (cris_register_size,cris_cannot_fetch_register) (cris_cannot_store_register,crisv32_cannot_fetch_register) (crisv32_cannot_store_register,cris_register_name): Likewise. * avr-tdep.c (avr_frame_unwind_cache): Likewise. * arch-utils.c (legacy_register_sim_regno) (legacy_virtual_frame_pointer): Likewise. * arm-tdep.c (arm_make_prologue_cache,arm_register_sim_regno):Likewise. * arm-tdep.h: Likewise (comment). * frv-tdep.c (frv_register_sim_regno): Likewise. * m68klinux-nat.c (old_fetch_inferior_registers) (old_store_inferior_registers): Likewise. * m32c-tdep.c (m32c_virtual_frame_pointer): Likewise. * irix5-nat.c (fetch_core_registers): Likewise. * hppa-tdep.c (hppa_frame_cache): Likewise. * hppa-linux-nat.c (hppa_linux_register_addr) (hppa_linux_fetch_inferior_registers) (hppa_linux_store_inferior_registers): Likewise. * hppa-hpux-nat.c (hppa_hpux_fetch_inferior_registers) (hppa_hpux_store_inferior_registers): Likewise. * amd64-nat.c (amd64_native_gregset_reg_offset) (amd64_supply_native_gregset,amd64_collect_native_gregset): Likewise. * dbug-rom.c (dbug_regname): Likewise. * m68hc11-tdep.c (m68hc11_frame_unwind_cache) (HARD_PAGE_REGNUM (comment)): Likewise. * gdbarch.sh (NUM_PSEUDO_REGS): Replace by gdbarch_num_pseudo_regs. * i386-tdep.c (i386_dbx_reg_to_regnum) (i386_svr4_reg_to_regnum): Likewise. * mi/mi-main.c (mi_cmd_data_list_register_names) (mi_cmd_data_list_changed_registers,mi_cmd_data_list_register_values) (mi_cmd_data_write_register_values): Likewise. * gdbarch.c, gdbarch.h: Regenerate. * tui/tui-regs.c (tui_show_register_group): Likewise. * xtensa-tdep.h (FP_ALIAS): Likewise. * user-regs.h: Likewise (comment). * user-regs.c (user_reg, user_reg_map_name_to_regnum): Likewise. * trad-frame.c (trad_frame_alloc_saved_regs): Likewise. * target-descriptions.h: Likewise (comment). * target.c (debug_print_register): Likewise. * stack.c (frame_info): Likewise. * stabsread.c (define_symbol): Likewise. * sh64-tdep.c (sh64_print_register,sh64_media_print_registers_info) (sh64_compact_print_registers_info): Likewise. * rs6000-tdep.c (rs6000_register_sim_regno): Likewise. * regcache.c (init_regcache_descr,register_size,regcache,regcache_save (regcache_restore,regcache_dump): Likewise. * mips-tdep.c (print_gp_register_row,mips_print_registers_info) (mips_dwarf_dwarf2_ecoff_reg_to_regnum) (mips_stab_reg_to_regnum): Likewise. * findvar.c (value_of_register): Likewise. * infcmd.c (default_print_registers_info,registers_info) (print_vector_info,print_float_info): Likewise. * m68k-tdep.c (m68k_dwarf_reg_to_regnum): Likewise. * h8300-tdep.c (h8300_register_type): Likewise. * dwarf2-frame.c (dwarf2_frame_cache): Likewise. * frame.h (SIZEOF_FRAME_SAVED_REGS): Likewise. * xtensa-tdep.c (xtensa_register_type,xtensa_reg_to_regnum) (xtensa_pseudo_register_read,xtensa_pseudo_register_write): Likewise. * parse.c: Remove comment. * gdbarch.c, gdbarch.h: Regenerate
2007-05-31 19:32:22 +02:00
for (regnum = 0;
regnum < gdbarch_num_regs (gdbarch)
+ gdbarch_num_pseudo_regs (gdbarch);
2007-05-31 Markus Deuling <deuling@de.ibm.com> * gdbarch.sh (NUM_REGS): Replace by gdbarch_num_regs. * i386-tdep.c (i386_dbx_reg_to_regnum) (i386_svr4_reg_to_regnum): Likewise. * inf-ptrace.c (inf_ptrace_fetch_registers) (inf_ptrace_store_registers): Likewise. * corelow.c (get_core_registers): Likewise. * i386-linux-nat.c (supply_gregset, fill_gregset) (i386_linux_fetch_inferior_registers) (i386_linux_store_inferior_registers): Likewise. * remote.c (init_remote_state,packet_reg_from_regnum) (packet_reg_from_pnum,process_g_packet,remote_fetch_registers) (remote_prepare_to_store,store_registers_using_G) (remote_store_registers,remote_arch_state): Likewise. * tracepoint.c (encode_actions): Likewise. * mi/mi-main.c (mi_cmd_data_list_register_names) (mi_cmd_data_list_changed_registers,mi_cmd_data_list_register_values) (mi_cmd_data_write_register_values): Likewise. * tui/tui-regs.c (tui_show_register_group) (tui_show_register_group): Likewise. * xtensa-tdep.h (FP_ALIAS): Likewise. * xtensa-tdep.c (xtensa_register_name,xtensa_register_type) (xtensa_reg_to_regnum,xtensa_pseudo_register_read) (xtensa_pseudo_register_write,xtensa_register_reggroup_p): Likewise. * win32-nat.c (do_win32_fetch_inferior_registers) (do_win32_store_inferior_registers,fetch_elf_core_registers * user-regs.h: Likewise (comment). * user-regs.c (user_reg, user_reg_map_name_to_regnum): Likewise. * trad-frame.c (trad_frame_alloc_saved_regs): Likewise. * target-descriptions.h: Likewise (comment). * target-descriptions.c (tdesc_use_registers): Likewise (comment). * target.c (debug_print_register): Likewise. * stack.c (frame_info): Likewise. * stabsread.c (define_symbol): Likewise. * sh64-tdep.c (sh64_do_pseudo_register,sh64_print_register) (sh64_media_print_registers_info) (sh64_compact_print_registers_info): Likewise. * rs6000-tdep.c (rs6000_register_sim_regno): Likewise. * rs6000-nat.c (fetch_register,store_register): Likewise. * remote-sim.c (one2one_register_sim_regno,gdbsim_fetch_register) (gdbsim_fetch_register,gdbsim_store_register): Likewise. * remote-mips.c (mips_fetch_registers,mips_store_registers): Likewise. * remote-m32r-sdi.c (m32r_fetch_registers) (m32r_store_registers): Likewise. * reggroups.c (default_register_reggroup_p): Likewise. * regcache.c (init_regcache_descr,register_size,regcache,regcache_save) (regcache_restore,regcache_dump): Likewise. * monitor.c (monitor_fetch_registers,monitor_store_registers): Likewise. * mips-tdep.c (mips_xfer_register,mips_register_name) (mips_register_reggroup_p,mips_pseudo_register_read) (mips_pseudo_register_write,mips_convert_register_p,mips_register_type) (mips_unwind_pc,mips_unwind_sp,mips_unwind_dummy_id,set_reg_offset) (mips16_scan_prologue,mips_insn16_frame_cache,reset_saved_regs) (mips32_scan_prologue,mips_insn32_frame_cache,read_next_frame_reg) (mips_n32n64_return_value,mips_o32_return_value,mips_o64_return_value) (print_gp_register_row,mips_print_registers_info) (mips_stab_reg_to_regnum,mips_dwarf_dwarf2_ecoff_reg_to_regnum) (mips_register_sim_regno): Likewise. * mips-linux-tdep.c (mips_linux_o32_sigframe_init) (mips_linux_n32n64_sigframe_init): Likewise. * mips-linux-nat.c (mips_linux_register_addr) (mips64_linux_register_addr): Likewise. * findvar.c (value_of_register): Likewise. * infcmd.c (default_print_registers_info,registers_info) (print_vector_info,print_float_info): Likewise. * mips64obsd-tdep.c (mips64obsd_sigframe_init): Likewise. * inf-child.c (inf_child_fetch_inferior_registers): Likewise. * m68k-tdep.c (m68k_dwarf_reg_to_regnum): Likewise. * m68hc11-tdep.c (m68hc11_frame_unwind_cache(: Likewise. * m32r-tdep.c (m32r_frame_unwind_cache): Likewise. * ia64-linux-nat.c (ia64_register_addr,ia64_cannot_fetch_register) (ia64_cannot_store_register,ia64_linux_fetch_registers) (ia64_linux_store_registers): Likewise. * hpux-thread.c (hpux_thread_fetch_registers) (hpux_thread_store_registers): Likewise. * h8300-tdep.c (E_PSEUDO_CCR_REGNUM,E_PSEUDO_EXR_REGNUM) (h8300_init_frame_cache,h8300_frame_cache,h8300_frame_prev_register) (h8300_register_type): Likewise. * dwarf2-frame.c (dwarf2_frame_cache) (dwarf2_frame_state_alloc_regs): Likewise. * cris-tdep.c (cris_register_size,cris_cannot_fetch_register) (cris_cannot_store_register,crisv32_cannot_fetch_register) (crisv32_cannot_store_register,cris_register_name): Likewise. * avr-tdep.c (avr_frame_unwind_cache): Likewise. * arch-utils.c (legacy_register_sim_regno) (legacy_virtual_frame_pointer): Likewise. * arm-tdep.c (arm_make_prologue_cache,arm_register_sim_regno):Likewise. * arm-tdep.h: Likewise (comment). * frv-tdep.c (frv_register_sim_regno): Likewise. * m68klinux-nat.c (old_fetch_inferior_registers) (old_store_inferior_registers): Likewise. * m32c-tdep.c (m32c_virtual_frame_pointer): Likewise. * irix5-nat.c (fetch_core_registers): Likewise. * hppa-tdep.c (hppa_frame_cache): Likewise. * hppa-linux-nat.c (hppa_linux_register_addr) (hppa_linux_fetch_inferior_registers) (hppa_linux_store_inferior_registers): Likewise. * hppa-hpux-nat.c (hppa_hpux_fetch_inferior_registers) (hppa_hpux_store_inferior_registers): Likewise. * amd64-nat.c (amd64_native_gregset_reg_offset) (amd64_supply_native_gregset,amd64_collect_native_gregset): Likewise. * dbug-rom.c (dbug_regname): Likewise. * m68hc11-tdep.c (m68hc11_frame_unwind_cache) (HARD_PAGE_REGNUM (comment)): Likewise. * gdbarch.sh (NUM_PSEUDO_REGS): Replace by gdbarch_num_pseudo_regs. * i386-tdep.c (i386_dbx_reg_to_regnum) (i386_svr4_reg_to_regnum): Likewise. * mi/mi-main.c (mi_cmd_data_list_register_names) (mi_cmd_data_list_changed_registers,mi_cmd_data_list_register_values) (mi_cmd_data_write_register_values): Likewise. * gdbarch.c, gdbarch.h: Regenerate. * tui/tui-regs.c (tui_show_register_group): Likewise. * xtensa-tdep.h (FP_ALIAS): Likewise. * user-regs.h: Likewise (comment). * user-regs.c (user_reg, user_reg_map_name_to_regnum): Likewise. * trad-frame.c (trad_frame_alloc_saved_regs): Likewise. * target-descriptions.h: Likewise (comment). * target.c (debug_print_register): Likewise. * stack.c (frame_info): Likewise. * stabsread.c (define_symbol): Likewise. * sh64-tdep.c (sh64_print_register,sh64_media_print_registers_info) (sh64_compact_print_registers_info): Likewise. * rs6000-tdep.c (rs6000_register_sim_regno): Likewise. * regcache.c (init_regcache_descr,register_size,regcache,regcache_save (regcache_restore,regcache_dump): Likewise. * mips-tdep.c (print_gp_register_row,mips_print_registers_info) (mips_dwarf_dwarf2_ecoff_reg_to_regnum) (mips_stab_reg_to_regnum): Likewise. * findvar.c (value_of_register): Likewise. * infcmd.c (default_print_registers_info,registers_info) (print_vector_info,print_float_info): Likewise. * m68k-tdep.c (m68k_dwarf_reg_to_regnum): Likewise. * h8300-tdep.c (h8300_register_type): Likewise. * dwarf2-frame.c (dwarf2_frame_cache): Likewise. * frame.h (SIZEOF_FRAME_SAVED_REGS): Likewise. * xtensa-tdep.c (xtensa_register_type,xtensa_reg_to_regnum) (xtensa_pseudo_register_read,xtensa_pseudo_register_write): Likewise. * parse.c: Remove comment. * gdbarch.c, gdbarch.h: Regenerate
2007-05-31 19:32:22 +02:00
regnum++)
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
{
const char *name;
/* Must be in the group. */
if (!gdbarch_register_reggroup_p (gdbarch, regnum, group))
continue;
/* If the register name is empty, it is undefined for this
processor, so don't display anything. */
name = gdbarch_register_name (gdbarch, regnum);
if (name == 0 || *name == '\0')
continue;
nr_regs++;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
}
if (display_info->regs_content_count > 0 && !refresh_values_only)
{
tui_free_data_content (display_info->regs_content,
display_info->regs_content_count);
display_info->regs_content_count = 0;
}
if (display_info->regs_content_count <= 0)
{
display_info->regs_content = tui_alloc_content (nr_regs, DATA_WIN);
allocated_here = TRUE;
refresh_values_only = FALSE;
}
if (display_info->regs_content != (tui_win_content) NULL)
{
if (!refresh_values_only || allocated_here)
{
TUI_DATA_WIN->generic.content = (void*) NULL;
TUI_DATA_WIN->generic.content_size = 0;
tui_add_content_elements (&TUI_DATA_WIN->generic, nr_regs);
display_info->regs_content
= (tui_win_content) TUI_DATA_WIN->generic.content;
display_info->regs_content_count = nr_regs;
}
/* Now set the register names and values. */
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
pos = 0;
2007-05-31 Markus Deuling <deuling@de.ibm.com> * gdbarch.sh (NUM_REGS): Replace by gdbarch_num_regs. * i386-tdep.c (i386_dbx_reg_to_regnum) (i386_svr4_reg_to_regnum): Likewise. * inf-ptrace.c (inf_ptrace_fetch_registers) (inf_ptrace_store_registers): Likewise. * corelow.c (get_core_registers): Likewise. * i386-linux-nat.c (supply_gregset, fill_gregset) (i386_linux_fetch_inferior_registers) (i386_linux_store_inferior_registers): Likewise. * remote.c (init_remote_state,packet_reg_from_regnum) (packet_reg_from_pnum,process_g_packet,remote_fetch_registers) (remote_prepare_to_store,store_registers_using_G) (remote_store_registers,remote_arch_state): Likewise. * tracepoint.c (encode_actions): Likewise. * mi/mi-main.c (mi_cmd_data_list_register_names) (mi_cmd_data_list_changed_registers,mi_cmd_data_list_register_values) (mi_cmd_data_write_register_values): Likewise. * tui/tui-regs.c (tui_show_register_group) (tui_show_register_group): Likewise. * xtensa-tdep.h (FP_ALIAS): Likewise. * xtensa-tdep.c (xtensa_register_name,xtensa_register_type) (xtensa_reg_to_regnum,xtensa_pseudo_register_read) (xtensa_pseudo_register_write,xtensa_register_reggroup_p): Likewise. * win32-nat.c (do_win32_fetch_inferior_registers) (do_win32_store_inferior_registers,fetch_elf_core_registers * user-regs.h: Likewise (comment). * user-regs.c (user_reg, user_reg_map_name_to_regnum): Likewise. * trad-frame.c (trad_frame_alloc_saved_regs): Likewise. * target-descriptions.h: Likewise (comment). * target-descriptions.c (tdesc_use_registers): Likewise (comment). * target.c (debug_print_register): Likewise. * stack.c (frame_info): Likewise. * stabsread.c (define_symbol): Likewise. * sh64-tdep.c (sh64_do_pseudo_register,sh64_print_register) (sh64_media_print_registers_info) (sh64_compact_print_registers_info): Likewise. * rs6000-tdep.c (rs6000_register_sim_regno): Likewise. * rs6000-nat.c (fetch_register,store_register): Likewise. * remote-sim.c (one2one_register_sim_regno,gdbsim_fetch_register) (gdbsim_fetch_register,gdbsim_store_register): Likewise. * remote-mips.c (mips_fetch_registers,mips_store_registers): Likewise. * remote-m32r-sdi.c (m32r_fetch_registers) (m32r_store_registers): Likewise. * reggroups.c (default_register_reggroup_p): Likewise. * regcache.c (init_regcache_descr,register_size,regcache,regcache_save) (regcache_restore,regcache_dump): Likewise. * monitor.c (monitor_fetch_registers,monitor_store_registers): Likewise. * mips-tdep.c (mips_xfer_register,mips_register_name) (mips_register_reggroup_p,mips_pseudo_register_read) (mips_pseudo_register_write,mips_convert_register_p,mips_register_type) (mips_unwind_pc,mips_unwind_sp,mips_unwind_dummy_id,set_reg_offset) (mips16_scan_prologue,mips_insn16_frame_cache,reset_saved_regs) (mips32_scan_prologue,mips_insn32_frame_cache,read_next_frame_reg) (mips_n32n64_return_value,mips_o32_return_value,mips_o64_return_value) (print_gp_register_row,mips_print_registers_info) (mips_stab_reg_to_regnum,mips_dwarf_dwarf2_ecoff_reg_to_regnum) (mips_register_sim_regno): Likewise. * mips-linux-tdep.c (mips_linux_o32_sigframe_init) (mips_linux_n32n64_sigframe_init): Likewise. * mips-linux-nat.c (mips_linux_register_addr) (mips64_linux_register_addr): Likewise. * findvar.c (value_of_register): Likewise. * infcmd.c (default_print_registers_info,registers_info) (print_vector_info,print_float_info): Likewise. * mips64obsd-tdep.c (mips64obsd_sigframe_init): Likewise. * inf-child.c (inf_child_fetch_inferior_registers): Likewise. * m68k-tdep.c (m68k_dwarf_reg_to_regnum): Likewise. * m68hc11-tdep.c (m68hc11_frame_unwind_cache(: Likewise. * m32r-tdep.c (m32r_frame_unwind_cache): Likewise. * ia64-linux-nat.c (ia64_register_addr,ia64_cannot_fetch_register) (ia64_cannot_store_register,ia64_linux_fetch_registers) (ia64_linux_store_registers): Likewise. * hpux-thread.c (hpux_thread_fetch_registers) (hpux_thread_store_registers): Likewise. * h8300-tdep.c (E_PSEUDO_CCR_REGNUM,E_PSEUDO_EXR_REGNUM) (h8300_init_frame_cache,h8300_frame_cache,h8300_frame_prev_register) (h8300_register_type): Likewise. * dwarf2-frame.c (dwarf2_frame_cache) (dwarf2_frame_state_alloc_regs): Likewise. * cris-tdep.c (cris_register_size,cris_cannot_fetch_register) (cris_cannot_store_register,crisv32_cannot_fetch_register) (crisv32_cannot_store_register,cris_register_name): Likewise. * avr-tdep.c (avr_frame_unwind_cache): Likewise. * arch-utils.c (legacy_register_sim_regno) (legacy_virtual_frame_pointer): Likewise. * arm-tdep.c (arm_make_prologue_cache,arm_register_sim_regno):Likewise. * arm-tdep.h: Likewise (comment). * frv-tdep.c (frv_register_sim_regno): Likewise. * m68klinux-nat.c (old_fetch_inferior_registers) (old_store_inferior_registers): Likewise. * m32c-tdep.c (m32c_virtual_frame_pointer): Likewise. * irix5-nat.c (fetch_core_registers): Likewise. * hppa-tdep.c (hppa_frame_cache): Likewise. * hppa-linux-nat.c (hppa_linux_register_addr) (hppa_linux_fetch_inferior_registers) (hppa_linux_store_inferior_registers): Likewise. * hppa-hpux-nat.c (hppa_hpux_fetch_inferior_registers) (hppa_hpux_store_inferior_registers): Likewise. * amd64-nat.c (amd64_native_gregset_reg_offset) (amd64_supply_native_gregset,amd64_collect_native_gregset): Likewise. * dbug-rom.c (dbug_regname): Likewise. * m68hc11-tdep.c (m68hc11_frame_unwind_cache) (HARD_PAGE_REGNUM (comment)): Likewise. * gdbarch.sh (NUM_PSEUDO_REGS): Replace by gdbarch_num_pseudo_regs. * i386-tdep.c (i386_dbx_reg_to_regnum) (i386_svr4_reg_to_regnum): Likewise. * mi/mi-main.c (mi_cmd_data_list_register_names) (mi_cmd_data_list_changed_registers,mi_cmd_data_list_register_values) (mi_cmd_data_write_register_values): Likewise. * gdbarch.c, gdbarch.h: Regenerate. * tui/tui-regs.c (tui_show_register_group): Likewise. * xtensa-tdep.h (FP_ALIAS): Likewise. * user-regs.h: Likewise (comment). * user-regs.c (user_reg, user_reg_map_name_to_regnum): Likewise. * trad-frame.c (trad_frame_alloc_saved_regs): Likewise. * target-descriptions.h: Likewise (comment). * target.c (debug_print_register): Likewise. * stack.c (frame_info): Likewise. * stabsread.c (define_symbol): Likewise. * sh64-tdep.c (sh64_print_register,sh64_media_print_registers_info) (sh64_compact_print_registers_info): Likewise. * rs6000-tdep.c (rs6000_register_sim_regno): Likewise. * regcache.c (init_regcache_descr,register_size,regcache,regcache_save (regcache_restore,regcache_dump): Likewise. * mips-tdep.c (print_gp_register_row,mips_print_registers_info) (mips_dwarf_dwarf2_ecoff_reg_to_regnum) (mips_stab_reg_to_regnum): Likewise. * findvar.c (value_of_register): Likewise. * infcmd.c (default_print_registers_info,registers_info) (print_vector_info,print_float_info): Likewise. * m68k-tdep.c (m68k_dwarf_reg_to_regnum): Likewise. * h8300-tdep.c (h8300_register_type): Likewise. * dwarf2-frame.c (dwarf2_frame_cache): Likewise. * frame.h (SIZEOF_FRAME_SAVED_REGS): Likewise. * xtensa-tdep.c (xtensa_register_type,xtensa_reg_to_regnum) (xtensa_pseudo_register_read,xtensa_pseudo_register_write): Likewise. * parse.c: Remove comment. * gdbarch.c, gdbarch.h: Regenerate
2007-05-31 19:32:22 +02:00
for (regnum = 0;
regnum < gdbarch_num_regs (gdbarch)
+ gdbarch_num_pseudo_regs (gdbarch);
2007-05-31 Markus Deuling <deuling@de.ibm.com> * gdbarch.sh (NUM_REGS): Replace by gdbarch_num_regs. * i386-tdep.c (i386_dbx_reg_to_regnum) (i386_svr4_reg_to_regnum): Likewise. * inf-ptrace.c (inf_ptrace_fetch_registers) (inf_ptrace_store_registers): Likewise. * corelow.c (get_core_registers): Likewise. * i386-linux-nat.c (supply_gregset, fill_gregset) (i386_linux_fetch_inferior_registers) (i386_linux_store_inferior_registers): Likewise. * remote.c (init_remote_state,packet_reg_from_regnum) (packet_reg_from_pnum,process_g_packet,remote_fetch_registers) (remote_prepare_to_store,store_registers_using_G) (remote_store_registers,remote_arch_state): Likewise. * tracepoint.c (encode_actions): Likewise. * mi/mi-main.c (mi_cmd_data_list_register_names) (mi_cmd_data_list_changed_registers,mi_cmd_data_list_register_values) (mi_cmd_data_write_register_values): Likewise. * tui/tui-regs.c (tui_show_register_group) (tui_show_register_group): Likewise. * xtensa-tdep.h (FP_ALIAS): Likewise. * xtensa-tdep.c (xtensa_register_name,xtensa_register_type) (xtensa_reg_to_regnum,xtensa_pseudo_register_read) (xtensa_pseudo_register_write,xtensa_register_reggroup_p): Likewise. * win32-nat.c (do_win32_fetch_inferior_registers) (do_win32_store_inferior_registers,fetch_elf_core_registers * user-regs.h: Likewise (comment). * user-regs.c (user_reg, user_reg_map_name_to_regnum): Likewise. * trad-frame.c (trad_frame_alloc_saved_regs): Likewise. * target-descriptions.h: Likewise (comment). * target-descriptions.c (tdesc_use_registers): Likewise (comment). * target.c (debug_print_register): Likewise. * stack.c (frame_info): Likewise. * stabsread.c (define_symbol): Likewise. * sh64-tdep.c (sh64_do_pseudo_register,sh64_print_register) (sh64_media_print_registers_info) (sh64_compact_print_registers_info): Likewise. * rs6000-tdep.c (rs6000_register_sim_regno): Likewise. * rs6000-nat.c (fetch_register,store_register): Likewise. * remote-sim.c (one2one_register_sim_regno,gdbsim_fetch_register) (gdbsim_fetch_register,gdbsim_store_register): Likewise. * remote-mips.c (mips_fetch_registers,mips_store_registers): Likewise. * remote-m32r-sdi.c (m32r_fetch_registers) (m32r_store_registers): Likewise. * reggroups.c (default_register_reggroup_p): Likewise. * regcache.c (init_regcache_descr,register_size,regcache,regcache_save) (regcache_restore,regcache_dump): Likewise. * monitor.c (monitor_fetch_registers,monitor_store_registers): Likewise. * mips-tdep.c (mips_xfer_register,mips_register_name) (mips_register_reggroup_p,mips_pseudo_register_read) (mips_pseudo_register_write,mips_convert_register_p,mips_register_type) (mips_unwind_pc,mips_unwind_sp,mips_unwind_dummy_id,set_reg_offset) (mips16_scan_prologue,mips_insn16_frame_cache,reset_saved_regs) (mips32_scan_prologue,mips_insn32_frame_cache,read_next_frame_reg) (mips_n32n64_return_value,mips_o32_return_value,mips_o64_return_value) (print_gp_register_row,mips_print_registers_info) (mips_stab_reg_to_regnum,mips_dwarf_dwarf2_ecoff_reg_to_regnum) (mips_register_sim_regno): Likewise. * mips-linux-tdep.c (mips_linux_o32_sigframe_init) (mips_linux_n32n64_sigframe_init): Likewise. * mips-linux-nat.c (mips_linux_register_addr) (mips64_linux_register_addr): Likewise. * findvar.c (value_of_register): Likewise. * infcmd.c (default_print_registers_info,registers_info) (print_vector_info,print_float_info): Likewise. * mips64obsd-tdep.c (mips64obsd_sigframe_init): Likewise. * inf-child.c (inf_child_fetch_inferior_registers): Likewise. * m68k-tdep.c (m68k_dwarf_reg_to_regnum): Likewise. * m68hc11-tdep.c (m68hc11_frame_unwind_cache(: Likewise. * m32r-tdep.c (m32r_frame_unwind_cache): Likewise. * ia64-linux-nat.c (ia64_register_addr,ia64_cannot_fetch_register) (ia64_cannot_store_register,ia64_linux_fetch_registers) (ia64_linux_store_registers): Likewise. * hpux-thread.c (hpux_thread_fetch_registers) (hpux_thread_store_registers): Likewise. * h8300-tdep.c (E_PSEUDO_CCR_REGNUM,E_PSEUDO_EXR_REGNUM) (h8300_init_frame_cache,h8300_frame_cache,h8300_frame_prev_register) (h8300_register_type): Likewise. * dwarf2-frame.c (dwarf2_frame_cache) (dwarf2_frame_state_alloc_regs): Likewise. * cris-tdep.c (cris_register_size,cris_cannot_fetch_register) (cris_cannot_store_register,crisv32_cannot_fetch_register) (crisv32_cannot_store_register,cris_register_name): Likewise. * avr-tdep.c (avr_frame_unwind_cache): Likewise. * arch-utils.c (legacy_register_sim_regno) (legacy_virtual_frame_pointer): Likewise. * arm-tdep.c (arm_make_prologue_cache,arm_register_sim_regno):Likewise. * arm-tdep.h: Likewise (comment). * frv-tdep.c (frv_register_sim_regno): Likewise. * m68klinux-nat.c (old_fetch_inferior_registers) (old_store_inferior_registers): Likewise. * m32c-tdep.c (m32c_virtual_frame_pointer): Likewise. * irix5-nat.c (fetch_core_registers): Likewise. * hppa-tdep.c (hppa_frame_cache): Likewise. * hppa-linux-nat.c (hppa_linux_register_addr) (hppa_linux_fetch_inferior_registers) (hppa_linux_store_inferior_registers): Likewise. * hppa-hpux-nat.c (hppa_hpux_fetch_inferior_registers) (hppa_hpux_store_inferior_registers): Likewise. * amd64-nat.c (amd64_native_gregset_reg_offset) (amd64_supply_native_gregset,amd64_collect_native_gregset): Likewise. * dbug-rom.c (dbug_regname): Likewise. * m68hc11-tdep.c (m68hc11_frame_unwind_cache) (HARD_PAGE_REGNUM (comment)): Likewise. * gdbarch.sh (NUM_PSEUDO_REGS): Replace by gdbarch_num_pseudo_regs. * i386-tdep.c (i386_dbx_reg_to_regnum) (i386_svr4_reg_to_regnum): Likewise. * mi/mi-main.c (mi_cmd_data_list_register_names) (mi_cmd_data_list_changed_registers,mi_cmd_data_list_register_values) (mi_cmd_data_write_register_values): Likewise. * gdbarch.c, gdbarch.h: Regenerate. * tui/tui-regs.c (tui_show_register_group): Likewise. * xtensa-tdep.h (FP_ALIAS): Likewise. * user-regs.h: Likewise (comment). * user-regs.c (user_reg, user_reg_map_name_to_regnum): Likewise. * trad-frame.c (trad_frame_alloc_saved_regs): Likewise. * target-descriptions.h: Likewise (comment). * target.c (debug_print_register): Likewise. * stack.c (frame_info): Likewise. * stabsread.c (define_symbol): Likewise. * sh64-tdep.c (sh64_print_register,sh64_media_print_registers_info) (sh64_compact_print_registers_info): Likewise. * rs6000-tdep.c (rs6000_register_sim_regno): Likewise. * regcache.c (init_regcache_descr,register_size,regcache,regcache_save (regcache_restore,regcache_dump): Likewise. * mips-tdep.c (print_gp_register_row,mips_print_registers_info) (mips_dwarf_dwarf2_ecoff_reg_to_regnum) (mips_stab_reg_to_regnum): Likewise. * findvar.c (value_of_register): Likewise. * infcmd.c (default_print_registers_info,registers_info) (print_vector_info,print_float_info): Likewise. * m68k-tdep.c (m68k_dwarf_reg_to_regnum): Likewise. * h8300-tdep.c (h8300_register_type): Likewise. * dwarf2-frame.c (dwarf2_frame_cache): Likewise. * frame.h (SIZEOF_FRAME_SAVED_REGS): Likewise. * xtensa-tdep.c (xtensa_register_type,xtensa_reg_to_regnum) (xtensa_pseudo_register_read,xtensa_pseudo_register_write): Likewise. * parse.c: Remove comment. * gdbarch.c, gdbarch.h: Regenerate
2007-05-31 19:32:22 +02:00
regnum++)
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
{
struct tui_gen_win_info *data_item_win;
struct tui_data_element *data;
const char *name;
/* Must be in the group. */
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
if (!gdbarch_register_reggroup_p (gdbarch, regnum, group))
continue;
/* If the register name is empty, it is undefined for this
processor, so don't display anything. */
name = gdbarch_register_name (gdbarch, regnum);
if (name == 0 || *name == '\0')
continue;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
data_item_win =
&display_info->regs_content[pos]->which_element.data_window;
data = &((struct tui_win_element *)
data_item_win->content[0])->which_element.data;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
if (data)
{
if (!refresh_values_only)
{
data->item_no = regnum;
data->name = name;
data->highlight = FALSE;
}
tui_get_register (frame, data, regnum, 0);
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
}
pos++;
}
TUI_DATA_WIN->generic.content_size =
display_info->regs_content_count + display_info->data_content_count;
ret = TUI_SUCCESS;
}
return ret;
}
/* Function to display the registers in the content from
'start_element_no' until the end of the register content or the end
of the display height. No checking for displaying past the end of
the registers is done here. */
void
tui_display_registers_from (int start_element_no)
{
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
struct tui_data_info *display_info = &TUI_DATA_WIN->detail.data_display_info;
if (display_info->regs_content != (tui_win_content) NULL
&& display_info->regs_content_count > 0)
{
int i = start_element_no;
int j, item_win_width, cur_y;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
int max_len = 0;
for (i = 0; i < display_info->regs_content_count; i++)
{
struct tui_data_element *data;
struct tui_gen_win_info *data_item_win;
char *p;
int len;
data_item_win
= &display_info->regs_content[i]->which_element.data_window;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
data = &((struct tui_win_element *)
data_item_win->content[0])->which_element.data;
len = 0;
p = data->content;
if (p != 0)
while (*p)
{
if (*p++ == '\t')
len = 8 * ((len / 8) + 1);
else
len++;
}
if (len > max_len)
max_len = len;
}
item_win_width = max_len + 1;
i = start_element_no;
display_info->regs_column_count =
(TUI_DATA_WIN->generic.width - 2) / item_win_width;
if (display_info->regs_column_count == 0)
display_info->regs_column_count = 1;
item_win_width =
(TUI_DATA_WIN->generic.width - 2) / display_info->regs_column_count;
/* Now create each data "sub" window, and write the display into
it. */
cur_y = 1;
while (i < display_info->regs_content_count
&& cur_y <= TUI_DATA_WIN->generic.viewport_height)
{
for (j = 0;
j < display_info->regs_column_count
&& i < display_info->regs_content_count;
j++)
{
struct tui_gen_win_info *data_item_win;
struct tui_data_element *data_element_ptr;
/* Create the window if necessary. */
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
data_item_win = &display_info->regs_content[i]
->which_element.data_window;
data_element_ptr = &((struct tui_win_element *)
data_item_win->content[0])->which_element.data;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
if (data_item_win->handle != (WINDOW*) NULL
&& (data_item_win->height != 1
|| data_item_win->width != item_win_width
|| data_item_win->origin.x != (item_win_width * j) + 1
|| data_item_win->origin.y != cur_y))
{
tui_delete_win (data_item_win->handle);
data_item_win->handle = 0;
}
if (data_item_win->handle == (WINDOW *) NULL)
{
data_item_win->height = 1;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
data_item_win->width = item_win_width;
data_item_win->origin.x = (item_win_width * j) + 1;
data_item_win->origin.y = cur_y;
tui_make_window (data_item_win, DONT_BOX_WINDOW);
scrollok (data_item_win->handle, FALSE);
}
touchwin (data_item_win->handle);
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
/* Get the printable representation of the register
and display it. */
tui_display_register (data_element_ptr, data_item_win);
i++; /* Next register. */
}
cur_y++; /* Next row. */
}
}
}
/* Function to display the registers in the content from
'start_element_no' on 'start_line_no' until the end of the register
content or the end of the display height. This function checks
that we won't display off the end of the register display. */
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
static void
tui_display_reg_element_at_line (int start_element_no,
int start_line_no)
{
if (TUI_DATA_WIN->detail.data_display_info.regs_content
!= (tui_win_content) NULL
&& TUI_DATA_WIN->detail.data_display_info.regs_content_count > 0)
{
int element_no = start_element_no;
if (start_element_no != 0 && start_line_no != 0)
{
int last_line_no, first_line_on_last_page;
last_line_no = tui_last_regs_line_no ();
first_line_on_last_page
= last_line_no - (TUI_DATA_WIN->generic.height - 2);
if (first_line_on_last_page < 0)
first_line_on_last_page = 0;
/* If there is no other data displayed except registers, and
the element_no causes us to scroll past the end of the
registers, adjust what element to really start the
display at. */
if (TUI_DATA_WIN->detail.data_display_info.data_content_count <= 0
&& start_line_no > first_line_on_last_page)
element_no
= tui_first_reg_element_no_inline (first_line_on_last_page);
}
tui_display_registers_from (element_no);
}
}
/* Function to display the registers starting at line line_no in the
data window. Answers the line number that the display actually
started from. If nothing is displayed (-1) is returned. */
int
tui_display_registers_from_line (int line_no,
int force_display)
{
if (TUI_DATA_WIN->detail.data_display_info.regs_content_count > 0)
{
int line, element_no;
if (line_no < 0)
line = 0;
else if (force_display)
{ /* If we must display regs (force_display is true), then
make sure that we don't display off the end of the
registers. */
if (line_no >= tui_last_regs_line_no ())
{
if ((line = tui_line_from_reg_element_no (
TUI_DATA_WIN->detail.data_display_info.regs_content_count - 1)) < 0)
line = 0;
}
else
line = line_no;
}
else
line = line_no;
element_no = tui_first_reg_element_no_inline (line);
if (element_no
< TUI_DATA_WIN->detail.data_display_info.regs_content_count)
tui_display_reg_element_at_line (element_no, line);
else
line = (-1);
return line;
}
return (-1); /* Nothing was displayed. */
}
/* This function check all displayed registers for changes in values,
given a particular frame. If the values have changed, they are
updated with the new value and highlighted. */
void
tui_check_register_values (struct frame_info *frame)
{
if (TUI_DATA_WIN != NULL
&& TUI_DATA_WIN->generic.is_visible)
{
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
struct tui_data_info *display_info
= &TUI_DATA_WIN->detail.data_display_info;
if (display_info->regs_content_count <= 0
&& display_info->display_regs)
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
tui_show_registers (display_info->current_group);
else
{
int i;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
for (i = 0; (i < display_info->regs_content_count); i++)
{
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
struct tui_data_element *data;
struct tui_gen_win_info *data_item_win_ptr;
int was_hilighted;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
data_item_win_ptr = &display_info->regs_content[i]->
which_element.data_window;
data = &((struct tui_win_element *)
data_item_win_ptr->content[0])->which_element.data;
was_hilighted = data->highlight;
tui_get_register (frame, data,
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
data->item_no, &data->highlight);
if (data->highlight || was_hilighted)
{
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
tui_display_register (data, data_item_win_ptr);
}
}
}
}
}
/* Display a register in a window. If hilite is TRUE, then the value
will be displayed in reverse video. */
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
static void
tui_display_register (struct tui_data_element *data,
struct tui_gen_win_info *win_info)
{
if (win_info->handle != (WINDOW *) NULL)
{
int i;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
if (data->highlight)
/* We ignore the return value, casting it to void in order to avoid
a compiler warning. The warning itself was introduced by a patch
to ncurses 5.7 dated 2009-08-29, changing this macro to expand
to code that causes the compiler to generate an unused-value
warning. */
(void) wstandout (win_info->handle);
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
wmove (win_info->handle, 0, 0);
for (i = 1; i < win_info->width; i++)
waddch (win_info->handle, ' ');
wmove (win_info->handle, 0, 0);
if (data->content)
waddstr (win_info->handle, data->content);
if (data->highlight)
/* We ignore the return value, casting it to void in order to avoid
a compiler warning. The warning itself was introduced by a patch
to ncurses 5.7 dated 2009-08-29, changing this macro to expand
to code that causes the compiler to generate an unused-value
warning. */
(void) wstandend (win_info->handle);
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
tui_refresh_win (win_info);
}
}
static void
tui_reg_next_command (char *arg, int from_tty)
{
* arch-utils.c (selected_byte_order): Return target_byte_order_user. (show_endian): Use target_byte_order_user if specified; otherwise use get_current_arch () instead of current_gdbarch. (show_architecture): Use set_architecture_string if specified; otherwise use get_current_arch () instead of current_gdbarch. (get_current_arch): New function. * arch-utils.h (get_current_arch): Add prototype. * osabi.c (show_osabi): Use get_current_arch () instead of current_gdbarch. * findcmd.c: Include "arch-utils.h". (parse_find_args): Add BIG_P argument. Use it instead of byte order of current_gdbarch. (find_command): Use get_current_arch () instead of current_gdbarch. Pass byte order to parse_find_args. * maint.c: Include "arch-utils.h". (maintenance_print_architecture): Use get_current_arch () instead of current_gdbarch. * reggroups.c: Include "arch-utils.h". (maintenance_print_reggroups): Use get_current_arch () instead of current_gdbarch. * symfile.c: Include "arch-utils.h". (overlay_load_command): Use get_current_arch () instead of current_gdbarch. * value.c: Include "arch-utils.h". (show_convenience): Use get_current_arch () instead of current_gdbarch. * tui/tui-regs.c: Include "arch-utils.h". (tui_reg_next_command): Use get_current_arch () instead of current_gdbarch. * mi/mi-main.c: Include "arch-utils.h". (mi_cmd_data_read_memory): Use get_current_arch () instead of current_gdbarch. * parse.c: Include "arch-utils.h". (parse_exp_in_context): Use get_current_arch () instead of current_gdbarch.
2009-07-02 19:02:35 +02:00
struct gdbarch *gdbarch = get_current_arch ();
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
if (TUI_DATA_WIN != 0)
{
struct reggroup *group
= TUI_DATA_WIN->detail.data_display_info.current_group;
* arch-utils.c (selected_byte_order): Return target_byte_order_user. (show_endian): Use target_byte_order_user if specified; otherwise use get_current_arch () instead of current_gdbarch. (show_architecture): Use set_architecture_string if specified; otherwise use get_current_arch () instead of current_gdbarch. (get_current_arch): New function. * arch-utils.h (get_current_arch): Add prototype. * osabi.c (show_osabi): Use get_current_arch () instead of current_gdbarch. * findcmd.c: Include "arch-utils.h". (parse_find_args): Add BIG_P argument. Use it instead of byte order of current_gdbarch. (find_command): Use get_current_arch () instead of current_gdbarch. Pass byte order to parse_find_args. * maint.c: Include "arch-utils.h". (maintenance_print_architecture): Use get_current_arch () instead of current_gdbarch. * reggroups.c: Include "arch-utils.h". (maintenance_print_reggroups): Use get_current_arch () instead of current_gdbarch. * symfile.c: Include "arch-utils.h". (overlay_load_command): Use get_current_arch () instead of current_gdbarch. * value.c: Include "arch-utils.h". (show_convenience): Use get_current_arch () instead of current_gdbarch. * tui/tui-regs.c: Include "arch-utils.h". (tui_reg_next_command): Use get_current_arch () instead of current_gdbarch. * mi/mi-main.c: Include "arch-utils.h". (mi_cmd_data_read_memory): Use get_current_arch () instead of current_gdbarch. * parse.c: Include "arch-utils.h". (parse_exp_in_context): Use get_current_arch () instead of current_gdbarch.
2009-07-02 19:02:35 +02:00
group = reggroup_next (gdbarch, group);
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
if (group == 0)
* arch-utils.c (selected_byte_order): Return target_byte_order_user. (show_endian): Use target_byte_order_user if specified; otherwise use get_current_arch () instead of current_gdbarch. (show_architecture): Use set_architecture_string if specified; otherwise use get_current_arch () instead of current_gdbarch. (get_current_arch): New function. * arch-utils.h (get_current_arch): Add prototype. * osabi.c (show_osabi): Use get_current_arch () instead of current_gdbarch. * findcmd.c: Include "arch-utils.h". (parse_find_args): Add BIG_P argument. Use it instead of byte order of current_gdbarch. (find_command): Use get_current_arch () instead of current_gdbarch. Pass byte order to parse_find_args. * maint.c: Include "arch-utils.h". (maintenance_print_architecture): Use get_current_arch () instead of current_gdbarch. * reggroups.c: Include "arch-utils.h". (maintenance_print_reggroups): Use get_current_arch () instead of current_gdbarch. * symfile.c: Include "arch-utils.h". (overlay_load_command): Use get_current_arch () instead of current_gdbarch. * value.c: Include "arch-utils.h". (show_convenience): Use get_current_arch () instead of current_gdbarch. * tui/tui-regs.c: Include "arch-utils.h". (tui_reg_next_command): Use get_current_arch () instead of current_gdbarch. * mi/mi-main.c: Include "arch-utils.h". (mi_cmd_data_read_memory): Use get_current_arch () instead of current_gdbarch. * parse.c: Include "arch-utils.h". (parse_exp_in_context): Use get_current_arch () instead of current_gdbarch.
2009-07-02 19:02:35 +02:00
group = reggroup_next (gdbarch, 0);
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
if (group)
tui_show_registers (group);
}
}
static void
tui_reg_float_command (char *arg, int from_tty)
{
tui_show_registers (float_reggroup);
}
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
static void
tui_reg_general_command (char *arg, int from_tty)
{
tui_show_registers (general_reggroup);
}
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
static void
tui_reg_system_command (char *arg, int from_tty)
{
tui_show_registers (system_reggroup);
}
static struct cmd_list_element *tuireglist;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
static void
tui_reg_command (char *args, int from_tty)
{
printf_unfiltered (_("\"tui reg\" must be followed by the name of a "
"tui reg command.\n"));
make calls to help_list use enumerator Currently there are many calls to help_list that pass the constant -1 as the "class" value. However, the parameter is declared as being of type enum command_class, and uses of the constant violate this abstraction. This patch fixes the error everywhere it occurs in the gdb sources. Tested by rebuilding. 2014-06-13 Tom Tromey <tromey@redhat.com> * cp-support.c (maint_cplus_command): Pass all_commands, not -1, to help_list. * guile/guile.c (info_guile_command): Pass all_commands, not -1, to help_list. * tui/tui-win.c (tui_command): Pass all_commands, not -1, to help_list. * tui/tui-regs.c (tui_reg_command): Pass all_commands, not -1, to help_list.Pass all_commands, not -1, to help_list. * cli/cli-dump.c (dump_command, append_command) (srec_dump_command, ihex_dump_command, tekhex_dump_command) (binary_dump_command, binary_append_command): Pass all_commands, not -1, to help_list. * cli/cli-cmds.c (info_command, set_debug): Pass all_commands, not -1, to help_list. * valprint.c (set_print, set_print_raw): Pass all_commands, not -1, to help_list. * typeprint.c (set_print_type): Pass all_commands, not -1, to help_list. * top.c (set_history): Pass all_commands, not -1, to help_list. * target-descriptions.c (set_tdesc_cmd, unset_tdesc_cmd): Pass all_commands, not -1, to help_list. * symfile.c (overlay_command): Pass all_commands, not -1, to help_list. * spu-tdep.c (info_spu_command): Pass all_commands, not -1, to help_list. * serial.c (serial_set_cmd): Pass all_commands, not -1, to help_list. * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Pass all_commands, not -1, to help_list. * remote.c (remote_command, set_remote_cmd): Pass all_commands, not -1, to help_list. * ravenscar-thread.c (set_ravenscar_command): Pass all_commands, not -1, to help_list. * maint.c (maintenance_command, maintenance_info_command) (maintenance_print_command, maintenance_set_cmd): Pass all_commands, not -1, to help_list. * macrocmd.c (macro_command): Pass all_commands, not -1, to help_list. * language.c (set_check): Pass all_commands, not -1, to help_list. * infcmd.c (unset_command): Pass all_commands, not -1, to help_list. * frame.c (set_backtrace_cmd): Pass all_commands, not -1, to help_list. * dwarf2read.c (set_dwarf2_cmd): Pass all_commands, not -1, to help_list. * dcache.c (set_dcache_command): Pass all_commands, not -1, to help_list. * breakpoint.c (save_command): Pass all_commands, not -1, to help_list. * ada-lang.c (maint_set_ada_cmd, set_ada_command): Pass all_commands, not -1, to help_list.
2014-06-05 16:25:00 +02:00
help_list (tuireglist, "tui reg ", all_commands, gdb_stdout);
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
}
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_regs;
void
_initialize_tui_regs (void)
{
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
struct cmd_list_element **tuicmd;
tuicmd = tui_get_cmd_list ();
add_prefix_cmd ("reg", class_tui, tui_reg_command,
_("TUI commands to control the register window."),
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
&tuireglist, "tui reg ", 0,
tuicmd);
add_cmd ("float", class_tui, tui_reg_float_command,
_("Display only floating point registers."),
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
&tuireglist);
add_cmd ("general", class_tui, tui_reg_general_command,
_("Display only general registers."),
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
&tuireglist);
add_cmd ("system", class_tui, tui_reg_system_command,
_("Display only system registers."),
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
&tuireglist);
add_cmd ("next", class_tui, tui_reg_next_command,
_("Display next register group."),
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
&tuireglist);
if (xdb_commands)
{
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
add_com ("fr", class_tui, tui_reg_float_command,
_("Display only floating point registers\n"));
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
add_com ("gr", class_tui, tui_reg_general_command,
_("Display only general registers\n"));
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
add_com ("sr", class_tui, tui_reg_system_command,
_("Display only special registers\n"));
add_com ("+r", class_tui, tui_scroll_regs_forward_command,
_("Scroll the registers window forward\n"));
add_com ("-r", class_tui, tui_scroll_regs_backward_command,
_("Scroll the register window backward\n"));
}
}
/*****************************************
** STATIC LOCAL FUNCTIONS **
******************************************/
static void
tui_restore_gdbout (void *ui)
{
ui_file_delete (gdb_stdout);
gdb_stdout = (struct ui_file*) ui;
pagination_enabled = 1;
}
/* Get the register from the frame and return a printable
representation of it. */
static char *
tui_register_format (struct frame_info *frame, int regnum)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
2000-02-02 01:21:19 +01:00
struct ui_file *stream;
struct ui_file *old_stdout;
struct cleanup *cleanups;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
char *p, *s;
char *ret;
pagination_enabled = 0;
old_stdout = gdb_stdout;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
stream = tui_sfileopen (256);
gdb_stdout = stream;
cleanups = make_cleanup (tui_restore_gdbout, (void*) old_stdout);
gdbarch_print_registers_info (gdbarch, stream, frame, regnum, 1);
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
/* Save formatted output in the buffer. */
p = tui_file_get_strbuf (stream);
/* Remove the possible \n. */
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
s = strrchr (p, '\n');
if (s && s[1] == 0)
*s = 0;
ret = xstrdup (p);
do_cleanups (cleanups);
return ret;
}
/* Get the register value from the given frame and format it for the
display. When changep is set, check if the new register value has
changed with respect to the previous call. */
static enum tui_status
tui_get_register (struct frame_info *frame,
struct tui_data_element *data,
int regnum, int *changedp)
{
enum tui_status ret = TUI_FAILURE;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
if (changedp)
*changedp = FALSE;
if (target_has_registers)
{
char *prev_content = data->content;
* tui/tui-win.h (tui_get_cmd_list): Declare. * tui/tui-win.c (tui_command): New function. (tui_get_cmd_list): New function. (_initialize_tui_win): Moved initialization of tui command in tui_get_cmd_list. * tui/tui-data.c (init_content_element): Setup new data members. (init_win_info): Likewise. (free_content_elements): Free it. * tui/tui-data.h (struct tui_data_element): Store the register content to print. (struct tui_data_info): Keep the current register group. * tui/tui-layout.c (tui_set_layout): Update call to tui_show_registers. * tui/tui-regs.h (tui_show_registers): Update prototype. (tui_toggle_float_regs, tui_calculate_regs_column_count): Remove. (tui_resize_all): No need to calculate anything for register window. * tui/tui-regs.c (tui_calculate_regs_column_count): Remove. (tui_set_register_element, tui_set_general_regs_content): Remove. (tui_set_special_regs_content): Remove. (tui_set_general_and_special_regs_content): Remove. (tui_set_float_regs_content): Remove. (tui_reg_value_has_changed, tui_get_register_raw_value): Remove. (tui_set_regs_content): Remove. (tui_toggle_float_regs, _tui_toggle_float_regs_command): Remove. (tui_v_show_registers_command_support): Remove. (tui_show_registers): Use a reggroup to specify the registers to show. (tui_show_register_group): New function. (tui_display_registers_from): Compute the layout of register window and refresh with new API; be sure to delete old register windows. (tui_check_register_values): Update to use tui_get_register and tui_display_data. (tui_display_register): Just refresh the register window part. (tui_register_format): Format registers and save in tui_data_element. (tui_get_register): New to combine tui_reg_value_has_changed and tui_get_register_raw_value; fix to use the new gdb API. (tui_show_float_command): Renamed tui_reg_float_command. (tui_show_general_command): Renamed tui_reg_general_command. (tui_show_special_command): Renamed tui_reg_system_command. (_initialize_tui_regs): Remove unused commands.
2004-03-13 15:14:01 +01:00
data->content = tui_register_format (frame, regnum);
if (changedp != NULL
&& strcmp (prev_content, data->content) != 0)
*changedp = 1;
xfree (prev_content);
ret = TUI_SUCCESS;
}
return ret;
}
static void
tui_scroll_regs_forward_command (char *arg, int from_tty)
{
tui_scroll (FORWARD_SCROLL, TUI_DATA_WIN, 1);
}
static void
tui_scroll_regs_backward_command (char *arg, int from_tty)
{
tui_scroll (BACKWARD_SCROLL, TUI_DATA_WIN, 1);
}