From 43278090df94225db6c9f881c4fea27a599d91b0 Mon Sep 17 00:00:00 2001 From: nobody <> Date: Fri, 4 Oct 2002 22:17:39 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create tag 'kseitz_interps-20020930-merge'. Sprout from drow-cplus-branch 2002-10-04 22:17:37 UTC nobody 'This commit was manufactured by cvs2svn to create branch 'drow-cplus-' Cherrypick from master 2002-09-30 20:18:52 UTC Andrew Cagney '2002-09-29 Andrew Cagney ': ChangeLog Makefile.in bfd/ChangeLog bfd/elf32-i386.c bfd/elf32-sh.c bfd/elf64-x86-64.c bfd/version.h configure configure.in gdb/ChangeLog gdb/MAINTAINERS gdb/Makefile.in gdb/NEWS gdb/blockframe.c gdb/config/mips/tm-irix6.h gdb/doc/ChangeLog gdb/doc/gdb.texinfo gdb/doc/gdbint.texinfo gdb/dwarf2read.c gdb/event-loop.c gdb/event-top.c gdb/frame.h gdb/gdbarch.c gdb/gdbarch.h gdb/gdbarch.sh gdb/gdbtypes.c gdb/gnu-v3-abi.c gdb/infcmd.c gdb/inferior.h gdb/infrun.c gdb/m32r-stub.c gdb/mi/ChangeLog gdb/mi/gdbmi.texinfo gdb/mi/mi-cmd-var.c gdb/mi/mi-main.c gdb/mi/mi-out.c gdb/mips-tdep.c gdb/objc-lang.c gdb/objc-lang.h gdb/ppc-sysv-tdep.c gdb/remote-sds.c gdb/rs6000-tdep.c gdb/stack.c gdb/testsuite/ChangeLog gdb/testsuite/gdb.mi/ChangeLog gdb/testsuite/gdb.mi/mi-return.exp gdb/testsuite/gdb.mi/mi-stack.exp gdb/testsuite/gdb.mi/mi-var-block.exp gdb/testsuite/gdb.mi/mi-var-child.exp gdb/testsuite/gdb.mi/mi-var-cmd.exp gdb/tracepoint.c gdb/tui/ChangeLog gdb/tui/tui-hooks.c gdb/ui-out.c gdb/ui-out.h gdb/v850ice.c gdb/version.in Delete: Makefile.def Makefile.tpl gdb/testsuite/gdb.c++/casts.cc gdb/testsuite/gdb.c++/casts.exp gdb/testsuite/gdb.mi/mi1-basics.exp gdb/testsuite/gdb.mi/mi1-break.exp gdb/testsuite/gdb.mi/mi1-console.exp gdb/testsuite/gdb.mi/mi1-disassemble.exp gdb/testsuite/gdb.mi/mi1-eval.exp gdb/testsuite/gdb.mi/mi1-hack-cli.exp gdb/testsuite/gdb.mi/mi1-pthreads.exp gdb/testsuite/gdb.mi/mi1-read-memory.exp gdb/testsuite/gdb.mi/mi1-regs.exp gdb/testsuite/gdb.mi/mi1-return.exp gdb/testsuite/gdb.mi/mi1-simplerun.exp gdb/testsuite/gdb.mi/mi1-stack.exp gdb/testsuite/gdb.mi/mi1-stepi.exp gdb/testsuite/gdb.mi/mi1-until.exp gdb/testsuite/gdb.mi/mi1-var-block.exp gdb/testsuite/gdb.mi/mi1-var-child.exp gdb/testsuite/gdb.mi/mi1-var-cmd.exp gdb/testsuite/gdb.mi/mi1-var-display.exp gdb/testsuite/gdb.mi/mi1-watch.exp src-release --- ChangeLog | 47 - Makefile.def | 79 -- Makefile.in | 370 +++++- Makefile.tpl | 1512 ---------------------- bfd/ChangeLog | 29 - bfd/elf32-i386.c | 4 +- bfd/elf32-sh.c | 31 +- bfd/elf64-x86-64.c | 58 +- bfd/version.h | 2 +- configure.in | 33 +- gdb/ChangeLog | 159 +-- gdb/MAINTAINERS | 2 - gdb/Makefile.in | 4 +- gdb/NEWS | 9 - gdb/blockframe.c | 41 +- gdb/config/mips/tm-irix6.h | 1 - gdb/doc/ChangeLog | 16 - gdb/doc/gdb.texinfo | 136 +- gdb/doc/gdbint.texinfo | 7 - gdb/dwarf2read.c | 12 - gdb/event-loop.c | 8 +- gdb/event-top.c | 21 +- gdb/frame.h | 9 - gdb/gdbarch.c | 28 - gdb/gdbarch.h | 16 - gdb/gdbarch.sh | 1 - gdb/gdbtypes.c | 11 +- gdb/gnu-v3-abi.c | 3 - gdb/infcmd.c | 29 +- gdb/inferior.h | 10 - gdb/infrun.c | 15 +- gdb/m32r-stub.c | 12 +- gdb/mi/ChangeLog | 33 - gdb/mi/gdbmi.texinfo | 42 +- gdb/mi/mi-cmd-var.c | 30 +- gdb/mi/mi-main.c | 31 +- gdb/mi/mi-out.c | 30 +- gdb/mips-tdep.c | 60 +- gdb/objc-lang.c | 61 +- gdb/objc-lang.h | 2 + gdb/ppc-sysv-tdep.c | 1 - gdb/remote-sds.c | 1 - gdb/rs6000-tdep.c | 11 +- gdb/stack.c | 23 +- gdb/testsuite/ChangeLog | 14 - gdb/testsuite/gdb.c++/casts.cc | 20 - gdb/testsuite/gdb.c++/casts.exp | 80 -- gdb/testsuite/gdb.mi/ChangeLog | 17 - gdb/testsuite/gdb.mi/mi-return.exp | 2 +- gdb/testsuite/gdb.mi/mi-stack.exp | 6 +- gdb/testsuite/gdb.mi/mi-var-block.exp | 8 +- gdb/testsuite/gdb.mi/mi-var-child.exp | 30 +- gdb/testsuite/gdb.mi/mi-var-cmd.exp | 30 +- gdb/testsuite/gdb.mi/mi1-basics.exp | 174 --- gdb/testsuite/gdb.mi/mi1-break.exp | 138 -- gdb/testsuite/gdb.mi/mi1-console.exp | 112 -- gdb/testsuite/gdb.mi/mi1-disassemble.exp | 224 ---- gdb/testsuite/gdb.mi/mi1-eval.exp | 101 -- gdb/testsuite/gdb.mi/mi1-hack-cli.exp | 40 - gdb/testsuite/gdb.mi/mi1-pthreads.exp | 220 ---- gdb/testsuite/gdb.mi/mi1-read-memory.exp | 100 -- gdb/testsuite/gdb.mi/mi1-regs.exp | 175 --- gdb/testsuite/gdb.mi/mi1-return.exp | 94 -- gdb/testsuite/gdb.mi/mi1-simplerun.exp | 199 --- gdb/testsuite/gdb.mi/mi1-stack.exp | 218 ---- gdb/testsuite/gdb.mi/mi1-stepi.exp | 109 -- gdb/testsuite/gdb.mi/mi1-until.exp | 127 -- gdb/testsuite/gdb.mi/mi1-var-block.exp | 228 ---- gdb/testsuite/gdb.mi/mi1-var-child.exp | 1203 ----------------- gdb/testsuite/gdb.mi/mi1-var-cmd.exp | 552 -------- gdb/testsuite/gdb.mi/mi1-var-display.exp | 627 --------- gdb/testsuite/gdb.mi/mi1-watch.exp | 191 --- gdb/tracepoint.c | 4 + gdb/tui/ChangeLog | 5 - gdb/tui/tui-hooks.c | 1 + gdb/ui-out.c | 17 - gdb/ui-out.h | 4 - gdb/v850ice.c | 6 + gdb/version.in | 2 +- src-release | 326 ----- 80 files changed, 613 insertions(+), 7831 deletions(-) delete mode 100644 Makefile.def delete mode 100644 Makefile.tpl delete mode 100644 gdb/testsuite/gdb.c++/casts.cc delete mode 100644 gdb/testsuite/gdb.c++/casts.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-basics.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-break.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-console.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-disassemble.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-eval.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-hack-cli.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-pthreads.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-read-memory.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-regs.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-return.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-simplerun.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-stack.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-stepi.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-until.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-var-block.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-var-child.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-var-cmd.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-var-display.exp delete mode 100644 gdb/testsuite/gdb.mi/mi1-watch.exp delete mode 100644 src-release diff --git a/ChangeLog b/ChangeLog index f01dee3aa24..c92e73fd0be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,50 +1,3 @@ -2002-10-03 Nathanael Nerode - - * Makefile.tpl: Make SET_LIB_PATH substitution more autoconfy. - * Makefile.tpl: Make RPATH_ENVVAR substitution more autoconfy. - * configure.in: Make SET_LIB_PATH substitution more autoconfy. - * configure.in: Make RPATH_ENVVAR substitution more autoconfy. - * Makefile.in: Regenerate. - -2002-10-02 Nathanael Nerode - - * Makefile.tpl: Eliminate reference to all-gui, all-libproc. - * Makefile.in: Regenerate. - - * Makefile.def: Remove order dependency comments. - * Makefile.tpl: Add explicit install-install dependencies. - * Makefile.in: Regenerate. - - * Makefile.tpl: Remove material now in src-release. (Finally!) - * Makefile.in: Regenerate. - - * configure: Restore my original patch by syncing with gcc version. - - * Bring following over from gcc: - -2002-09-30 Ulrich Weigand - - * configure.in (s390*-*-linux*): Enable libgcj. - -2002-10-02 Nathanael Nerode - - * Makefile.in: Regenerate. This really ought to fix things. :sigh: - -2002-10-02 Alan Modra - - * configure: Move stray lines back to where they belong. - -2002-10-01 Nathanael Nerode - - * Makefile.tpl: Insert configure-target target, for src-release. - - * configure: Finish reverting change which Andrew Cagney started - reverting. Should fix bustage. - - * src-release (BINUTILS_SUPPORT_DIRS): Add cpu directory. - * src-release: New file. Contains material for making net - releases for gdb, binutils, et al., formerly in Makefile.in. - 2002-09-30 Nick Clifton * cpu: New top level directory. Intended to hold input files for diff --git a/Makefile.def b/Makefile.def deleted file mode 100644 index 754b79ee08a..00000000000 --- a/Makefile.def +++ /dev/null @@ -1,79 +0,0 @@ -#! /usr/bin/autogen -AutoGen definitions Makefile.tpl; - -host_modules= { module= ash; }; -host_modules= { module= autoconf; }; -host_modules= { module= automake; }; -host_modules= { module= bash; }; -host_modules= { module= bfd; }; -host_modules= { module= opcodes; }; -host_modules= { module= binutils; }; -host_modules= { module= bison; no_check_cross= true; }; -host_modules= { module= byacc; no_check_cross= true; }; -host_modules= { module= bzip2; }; -host_modules= { module= db; }; -host_modules= { module= dejagnu; }; -host_modules= { module= diff; }; -host_modules= { module= dosutils; no_check= true; }; -host_modules= { module= etc; }; -host_modules= { module= fastjar; no_check_cross= true; }; -host_modules= { module= fileutils; }; -host_modules= { module= findutils; }; -host_modules= { module= find; }; -host_modules= { module= flex; no_check_cross= true; }; -host_modules= { module= gas; }; -host_modules= { module= gawk; }; -host_modules= { module= gettext; }; -host_modules= { module= gnuserv; }; -host_modules= { module= gprof; }; -host_modules= { module= grep; }; -host_modules= { module= gzip; }; -host_modules= { module= hello; }; -host_modules= { module= indent; }; -host_modules= { module= intl; }; -host_modules= { module= tcl; }; -host_modules= { module= itcl; }; -host_modules= { module= ld; }; -host_modules= { module= libgui; }; -host_modules= { module= libiberty; }; -host_modules= { module= libtool; }; -host_modules= { module= m4; }; -host_modules= { module= make; }; -host_modules= { module= mmalloc; no_check=true; }; -host_modules= { module= patch; }; -host_modules= { module= perl; }; -host_modules= { module= prms; }; -host_modules= { module= rcs; }; -host_modules= { module= readline; }; -host_modules= { module= release; no_install= true; no_check= true; }; -host_modules= { module= recode; }; -host_modules= { module= sed; }; -host_modules= { module= send-pr; }; -host_modules= { module= shellutils; }; -host_modules= { module= sid; }; -host_modules= { module= sim; }; -host_modules= { module= snavigator; }; -host_modules= { module= tar; }; -host_modules= { module= texinfo; no_install= true; }; -host_modules= { module= textutils; }; -host_modules= { module= time; }; -host_modules= { module= uudecode; }; -host_modules= { module= wdiff; }; -host_modules= { module= zip; no_check_cross=true; }; -host_modules= { module= zlib; no_install=true; no_check=true; }; - -target_modules = { module= libstdc++-v3; }; -target_modules = { module= newlib; }; -target_modules = { module= libf2c; }; -target_modules = { module= libobjc; }; -target_modules = { module= libtermcap; no_check=true; no_clean=true; }; -target_modules = { module= winsup; }; -target_modules = { module= libgloss; no_check=true; }; -target_modules = { module= libiberty; }; -target_modules = { module= gperf; }; -target_modules = { module= examples; no_check=true; no_install=true; }; -target_modules = { module= libffi; no_install=true; }; -target_modules = { module= libjava; }; -target_modules = { module= zlib; }; -target_modules = { module= boehm-gc; }; -target_modules = { module= qthreads; }; diff --git a/Makefile.in b/Makefile.in index ce4bffa88a4..a386b1bc18d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -26,29 +26,29 @@ NOTPARALLEL = .NOTPARALLEL $(NOTPARALLEL): -srcdir = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -includedir = @includedir@ -oldincludedir = @oldincludedir@ -infodir = @infodir@ -mandir = @mandir@ +srcdir = . + +prefix = /usr/local +exec_prefix = $(prefix) + +bindir=${exec_prefix}/bin +sbindir=${exec_prefix}/sbin +libexecdir=${exec_prefix}/libexec +datadir=${prefix}/share +sysconfdir=${prefix}/etc +sharedstatedir=${prefix}/com +localstatedir=${prefix}/var +libdir=${exec_prefix}/lib +includedir=${prefix}/include +oldincludedir=/usr/include +infodir=${prefix}/info +mandir=${prefix}/man gxx_include_dir=@gxx_include_dir@ -tooldir = @tooldir@ -build_tooldir = @build_tooldir@ +tooldir = $(exec_prefix)/$(target_alias) +build_tooldir = $(exec_prefix)/$(target_alias) -program_transform_name = @program_transform_name@ +program_transform_name = man1dir = $(mandir)/man1 man2dir = $(mandir)/man2 @@ -59,11 +59,13 @@ man6dir = $(mandir)/man6 man7dir = $(mandir)/man7 man8dir = $(mandir)/man8 man9dir = $(mandir)/man9 +infodir = $(prefix)/info +includedir = $(prefix)/include # Directory in which the compiler finds executables, libraries, etc. libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version) GDB_NLM_DEPS = -SHELL = @config_shell@ +SHELL = /bin/sh # pwd command to use. Allow user to override default by setting PWDCMD in # the environment to account for automounters. The make variable must not @@ -124,10 +126,13 @@ NM = nm LD = ld +BZIPPROG = bzip2 +MD5PROG = md5sum + # These values are substituted by configure. -DEFAULT_YACC = @DEFAULT_YACC@ -DEFAULT_LEX = @DEFAULT_LEX@ -DEFAULT_M4 = @DEFAULT_M4@ +DEFAULT_YACC = yacc +DEFAULT_LEX = lex +DEFAULT_M4 = m4 BISON = `if [ -f $$r/bison/bison ] ; then \ echo $$r/bison/bison -L $$s/bison/ ; \ @@ -201,11 +206,11 @@ BUILD_CONFIGARGS = @build_configargs@ # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared # was used. -SET_LIB_PATH = @SET_LIB_PATH@ +SET_LIB_PATH = # This is the name of the environment variable used for the path to # the libraries. This may be changed by configure.in. -RPATH_ENVVAR = @RPATH_ENVVAR@ +RPATH_ENVVAR = LD_LIBRARY_PATH # This is the list of directories that may be needed in RPATH_ENVVAR # so that programs built for the host machine work. @@ -510,7 +515,7 @@ GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) # macro for build!=host builds. ALL_BUILD_MODULES_LIST = \ all-build-libiberty -ALL_BUILD_MODULES = @all_build_modules@ +ALL_BUILD_MODULES = # This is a list of the configure targets for all of the modules which # are compiled using the native tools. @@ -653,6 +658,11 @@ CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) # This is a list of the install targets for all of the modules which are # compiled using $(FLAGS_TO_PASS). +# We put install-opcodes before install-binutils because the installed +# binutils might be on PATH, and they might need the shared opcodes +# library. +# We put install-tcl before install-itcl because itcl wants to run a +# program on installation which uses the Tcl libraries. INSTALL_MODULES = \ install-ash \ install-autoconf \ @@ -1253,8 +1263,12 @@ $(CONFIGURE_BUILD_MODULES): # This rule is used to build the modules which use FLAGS_TO_PASS. To # build a target all-X means to cd to X and make all. -.PHONY: $(ALL_MODULES) -$(ALL_MODULES): +# +# all-gui, and all-libproc are handled specially because +# they are still experimental, and if they fail to build, that +# shouldn't stop "make all". +.PHONY: $(ALL_MODULES) all-gui all-libproc +$(ALL_MODULES) all-gui all-libproc: @dir=`echo $@ | sed -e 's/all-//'`; \ if [ -f ./$${dir}/Makefile ] ; then \ r=`${PWD}`; export r; \ @@ -1660,7 +1674,7 @@ all-gas: all-libiberty all-opcodes all-bfd all-intl all-gawk: all-gcc: all-bison all-byacc all-binutils all-gas all-ld all-zlib all-bootstrap: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib -GDB_TK = @GDB_TK@ +GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK) all-gettext: all-gnuserv: @@ -1668,6 +1682,7 @@ configure-target-gperf: $(ALL_GCC_CXX) all-target-gperf: all-target-libiberty all-target-libstdc++-v3 all-gprof: all-libiberty all-bfd all-opcodes all-intl all-grep: all-libiberty +all-gui: all-gdb all-libproc all-guile: all-gzip: all-libiberty all-hello: all-libiberty @@ -1730,22 +1745,11 @@ all-fastjar: all-zlib all-libiberty configure-target-fastjar: configure-target-zlib all-target-fastjar: configure-target-fastjar all-target-zlib all-target-libiberty configure-target-libiberty: $(ALL_GCC_C) -configure-target: $(CONFIGURE_TARGET_MODULES) all-target: $(ALL_TARGET_MODULES) install-target: $(INSTALL_TARGET_MODULES) install-gdb: install-tcl install-tk install-itcl install-tix install-libgui install-sid: install-tcl install-tk -# We put install-opcodes before install-binutils because the installed -# binutils might be on PATH, and they might need the shared opcodes -# library. -install-binutils: install-opcodes - -# We put install-tcl before install-itcl because itcl wants to run a -# program on installation which uses the Tcl libraries. -install-itcl: install-tcl - - # Dependencies of all-target-foo on configure-target-foo. all-target-libstdc++-v3: configure-target-libstdc++-v3 all-target-newlib: configure-target-newlib @@ -1804,6 +1808,290 @@ Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(SHELL) ./config.status # +# Support for building net releases + +# Files in devo used in any net release. +# ChangeLog omitted because it may refer to files which are not in this +# distribution (perhaps it would be better to include it anyway). +DEVO_SUPPORT= README Makefile.in configure configure.in \ + config.guess config.if config.sub config move-if-change \ + mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \ + COPYING COPYING.LIB install-sh config-ml.in symlink-tree \ + mkinstalldirs ltconfig ltmain.sh missing ylwrap \ + libtool.m4 gettext.m4 ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh + +# Files in devo/etc used in any net release. +# ChangeLog omitted because it may refer to files which are not in this +# distribution (perhaps it would be better to include it anyway). +ETC_SUPPORT= Makefile.in configure configure.in standards.texi \ + make-stds.texi standards.info* configure.texi configure.info* \ + configbuild.* configdev.* + + +# When you use `make setup-dirs' or `make taz' you should always redefine +# this macro. +SUPPORT_FILES = list-of-support-files-for-tool-in-question + +# NOTE: No double quotes in the below. It is used within shell script +# as VER="$(VER)" +VER = ` if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' $(TOOL)/configure.in >/dev/null 2>&1; then \ + sed < bfd/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ + elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ + sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ + elif test -f $(TOOL)/version.in; then \ + head -1 $(TOOL)/version.in; \ + elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \ + sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \ + else \ + echo VERSION; \ + fi` +PACKAGE = $(TOOL) + +.PHONY: taz +taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex + $(MAKE) -f Makefile.in do-proto-toplev \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + $(MAKE) -f Makefile.in do-md5sum \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + $(MAKE) -f Makefile.in do-tar \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + $(MAKE) -f Makefile.in do-bz2 \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + +.PHONY: gdb-tar +gdb-tar: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex + $(MAKE) -f Makefile.in do-proto-toplev \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + $(MAKE) -f Makefile.in do-md5sum \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + $(MAKE) -f Makefile.in do-djunpack \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + $(MAKE) -f Makefile.in do-tar \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + +.PHONY: gdb-taz +gdb-taz: gdb-tar $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex + $(MAKE) -f Makefile.in gdb-tar \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + $(MAKE) -f Makefile.in do-bz2 \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + +.PHONY: do-proto-toplev +do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex + echo "==> Making $(PACKAGE)-$(VER)/" + # Take out texinfo from a few places. + sed -e '/^all\.normal: /s/\all-texinfo //' \ + -e '/^ install-texinfo /d' \ + tmp + mv -f tmp Makefile.in + # + ./configure sun4 + [ -z "$(CONFIGURE_TARGET_MODULES)" ] \ + || $(MAKE) $(CONFIGURE_TARGET_MODULES) \ + ALL_GCC="" ALL_GCC_C="" ALL_GCC_CXX="" \ + CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)" + # Make links, and run "make diststuff" or "make info" when needed. + rm -rf proto-toplev ; mkdir proto-toplev + set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \ + for d in $$dirs ; do \ + if [ -d $$d ]; then \ + if [ ! -f $$d/Makefile ] ; then true ; \ + elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \ + (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \ + elif grep '^info:' $$d/Makefile >/dev/null ; then \ + (cd $$d ; $(MAKE) info ) || exit 1 ; \ + fi ; \ + if [ -d $$d/proto-$$d.dir ]; then \ + ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \ + else \ + ln -s ../$$d proto-toplev/$$d ; \ + fi ; \ + else ln -s ../$$d proto-toplev/$$d ; fi ; \ + done + cd etc && $(MAKE) info + $(MAKE) distclean + # + mkdir proto-toplev/etc + (cd proto-toplev/etc; \ + for i in $(ETC_SUPPORT); do \ + ln -s ../../etc/$$i . ; \ + done) + # + # Take out texinfo from configurable dirs + rm proto-toplev/configure.in + sed -e '/^host_tools=/s/texinfo //' \ + proto-toplev/configure.in + # + mkdir proto-toplev/texinfo + ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/ + if test -r texinfo/util/tex3patch ; then \ + mkdir proto-toplev/texinfo/util && \ + ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \ + else true; fi + chmod -R og=u . || chmod og=u `find . -print` + # + # Create .gmo files from .po files. + for f in `find . -name '*.po' -type f -print`; do \ + msgfmt -o `echo $$f | sed -e 's/\.po$$/.gmo/'` $$f ; \ + done + # + -rm -f $(PACKAGE)-$(VER) + ln -s proto-toplev $(PACKAGE)-$(VER) + +.PHONY: do-tar +do-tar: + echo "==> Making $(PACKAGE)-$(VER).tar" + -rm -f $(PACKAGE)-$(VER).tar + find $(PACKAGE)-$(VER) -follow -name CVS -prune -o -type f -print \ + | tar cTfh - $(PACKAGE)-$(VER).tar + +.PHONY: do-bz2 +do-bz2: + echo "==> Bzipping $(PACKAGE)-$(VER).tar.bz2" + -rm -f $(PACKAGE)-$(VER).tar.bz2 + $(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar + +.PHONY: do-md5sum +do-md5sum: + echo "==> Adding md5 checksum to top-level directory" + cd proto-toplev && find * -follow -name CVS -prune -o -type f -print \ + | xargs $(MD5PROG) > ../md5.sum + mv md5.sum proto-toplev + +.PHONY: do-djunpack +do-djunpack: + echo "==> Adding updated djunpack.bat to top-level directory" + echo - 's /gdb-[0-9\.]*/gdb-'"$(VER)"'/' + sed < djunpack.bat > djunpack.new \ + -e 's/gdb-[0-9][0-9\.]*/gdb-'"$(VER)"'/' + mv djunpack.new djunpack.bat + -rm -f proto-toplev/djunpack.bat + ln -s ../djunpack.bat proto-toplev/djunpack.bat + +TEXINFO_SUPPORT= texinfo/texinfo.tex +DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT) + +.PHONY: gas.tar.bz2 +GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms mkdep +gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas + $(MAKE) -f Makefile.in taz TOOL=gas \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" + +# The FSF "binutils" release includes gprof and ld. +.PHONY: binutils.tar.bz2 +BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms mkdep cpu +binutils.tar.bz2: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils + $(MAKE) -f Makefile.in taz TOOL=binutils \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)" + +.PHONY: gas+binutils.tar.bz2 +GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof +gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas + $(MAKE) -f Makefile.in taz TOOL=gas \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(GASB_SUPPORT_DIRS)" + +GNATS_SUPPORT_DIRS=include libiberty send-pr +gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats + $(MAKE) -f Makefile.in taz TOOL=gnats \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)" + +.PHONY: gdb.tar.bz2 +GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl +gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb + $(MAKE) -f Makefile.in gdb-taz TOOL=gdb \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(GDB_SUPPORT_DIRS)" +.PHONY: gdb.tar +gdb.tar: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb + $(MAKE) -f Makefile.in gdb-tar TOOL=gdb \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(GDB_SUPPORT_DIRS)" + +DEJAGNU_SUPPORT_DIRS= tcl expect libiberty +.PHONY: dejagnu.tar.bz2 +dejagnu.tar.bz2: $(DIST_SUPPORT) $(DEJAGNU_SUPPORT_DIRS) dejagnu + $(MAKE) -f Makefile.in taz TOOL=dejagnu \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(DEJAGNU_SUPPORT_DIRS)" + +.PHONY: gdb+dejagnu.tar.bz2 +GDBD_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl expect dejagnu +gdb+dejagnu.tar.bz2: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb + $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=gdb+dejagnu \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)" +.PHONY: gdb+dejagnu.tar +gdb+dejagnu.tar: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb + $(MAKE) -f Makefile.in gdb-tar TOOL=gdb PACKAGE=gdb+dejagnu \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)" + +.PHONY: insight.tar.bz2 +INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui +insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb + $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=insight \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)" +.PHONY: insight.tar +insight.tar: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb + $(MAKE) -f Makefile.in gdb-tar TOOL=gdb PACKAGE=insight \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)" + +.PHONY: insight+dejagnu.tar.bz2 +INSIGHTD_SUPPORT_DIRS= $(INSIGHT_SUPPORT_DIRS) expect dejagnu +insight+dejagnu.tar.bz2: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb + $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE="insight+dejagnu" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)" +.PHONY: insight+dejagnu.tar +insight+dejagnu.tar: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb + $(MAKE) -f Makefile.in gdb-tar TOOL=gdb PACKAGE="insight+dejagnu" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)" + +.PHONY: newlib.tar.bz2 +NEWLIB_SUPPORT_DIRS=libgloss +# taz configures for the sun4 target which won't configure newlib. +# We need newlib configured so that the .info files are made. +# Unfortunately, it is not enough to just configure newlib separately: +# taz will build the .info files but since SUBDIRS won't contain newlib, +# distclean won't be run (leaving Makefile, config.status, and the tmp files +# used in building the .info files, eg: *.def, *.ref). +# The problem isn't solvable however without a lot of extra work because +# target libraries are built in subdir $(target_alias) which gets nuked during +# the make distclean. For now punt on the issue of shipping newlib info files +# with newlib net releases and wait for a day when some native target (sun4?) +# supports newlib (if only minimally). +newlib.tar.bz2: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib + $(MAKE) -f Makefile.in taz TOOL=newlib \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \ + DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib .NOEXPORT: MAKEOVERRIDES= diff --git a/Makefile.tpl b/Makefile.tpl deleted file mode 100644 index 5ef7d55fa3f..00000000000 --- a/Makefile.tpl +++ /dev/null @@ -1,1512 +0,0 @@ -[+ AutoGen5 template -in -+] - -# Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'. -# -# Makefile for directory with subdirs to build. -# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -# 1999, 2000, 2001, 2002 Free Software Foundation -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# - -# Tell GNU make 3.79 not to run the top level in parallel. This -# prevents contention for $builddir/$target/config.cache, as well -# as minimizing scatter in file system caches. -NOTPARALLEL = .NOTPARALLEL -$(NOTPARALLEL): - -srcdir = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -includedir = @includedir@ -oldincludedir = @oldincludedir@ -infodir = @infodir@ -mandir = @mandir@ -gxx_include_dir=@gxx_include_dir@ - -tooldir = @tooldir@ -build_tooldir = @build_tooldir@ - -program_transform_name = @program_transform_name@ - -man1dir = $(mandir)/man1 -man2dir = $(mandir)/man2 -man3dir = $(mandir)/man3 -man4dir = $(mandir)/man4 -man5dir = $(mandir)/man5 -man6dir = $(mandir)/man6 -man7dir = $(mandir)/man7 -man8dir = $(mandir)/man8 -man9dir = $(mandir)/man9 -# Directory in which the compiler finds executables, libraries, etc. -libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version) -GDB_NLM_DEPS = - -SHELL = @config_shell@ - -# pwd command to use. Allow user to override default by setting PWDCMD in -# the environment to account for automounters. The make variable must not -# be called PWDCMD, otherwise the value set here is passed to make -# subprocesses and overrides the setting from the user's environment. -PWD = $${PWDCMD-pwd} - -# INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a -# cygwin host. -INSTALL_PROGRAM_ARGS = - -INSTALL = $(SHELL) $$s/install-sh -c -INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS) -INSTALL_SCRIPT = $(INSTALL) -INSTALL_DATA = $(INSTALL) -m 644 - -INSTALL_DOSREL = install-dosrel-fake - -AS = as -AR = ar -AR_FLAGS = rc -CC = cc - -# Special variables passed down in EXTRA_GCC_FLAGS. They are defined -# here so that they can be overridden by Makefile fragments. -HOST_CC = $(CC_FOR_BUILD) -BUILD_PREFIX = -BUILD_PREFIX_1 = loser- - -# These flag values are normally overridden by the configure script. -CFLAGS = -g -CXXFLAGS = -g -O2 - -LDFLAGS = -LIBCFLAGS = $(CFLAGS) -CFLAGS_FOR_BUILD = $(CFLAGS) -# During gcc bootstrap, if we use some random cc for stage1 then -# CFLAGS will be just -g. We want to ensure that TARGET libraries -# (which we know are built with gcc) are built with optimizations so -# prepend -O2 when setting CFLAGS_FOR_TARGET. -CFLAGS_FOR_TARGET = -O2 $(CFLAGS) -LDFLAGS_FOR_TARGET = -LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) -PICFLAG = -PICFLAG_FOR_TARGET = - -CXX = c++ - -# Use -O2 to stress test the compiler. -LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates - -DLLTOOL = dlltool -WINDRES = windres - -NM = nm - -LD = ld - -# These values are substituted by configure. -DEFAULT_YACC = @DEFAULT_YACC@ -DEFAULT_LEX = @DEFAULT_LEX@ -DEFAULT_M4 = @DEFAULT_M4@ - -BISON = `if [ -f $$r/bison/bison ] ; then \ - echo $$r/bison/bison -L $$s/bison/ ; \ - else \ - echo bison ; \ - fi` - -YACC = `if [ -f $$r/bison/bison ] ; then \ - echo $$r/bison/bison -y -L $$s/bison/ ; \ - elif [ -f $$r/byacc/byacc ] ; then \ - echo $$r/byacc/byacc ; \ - else \ - echo ${DEFAULT_YACC} ; \ - fi` - -LEX = `if [ -f $$r/flex/flex ] ; \ - then echo $$r/flex/flex ; \ - else echo ${DEFAULT_LEX} ; fi` - -M4 = `if [ -f $$r/m4/m4 ] ; \ - then echo $$r/m4/m4 ; \ - else echo ${DEFAULT_M4} ; fi` - -# For an installed makeinfo, we require it to be from texinfo 4 or -# higher, else we use the "missing" dummy. -MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \ - then echo $$r/texinfo/makeinfo/makeinfo ; \ - else if (makeinfo --version \ - | egrep 'texinfo[^0-9]*([1-3][0-9]|[4-9])') >/dev/null 2>&1; \ - then echo makeinfo; else echo $$s/missing makeinfo; fi; fi` - -# This just becomes part of the MAKEINFO definition passed down to -# sub-makes. It lets flags be given on the command line while still -# using the makeinfo from the object tree. -MAKEINFOFLAGS = - -EXPECT = `if [ -f $$r/expect/expect ] ; \ - then echo $$r/expect/expect ; \ - else echo expect ; fi` - -RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \ - then echo $$s/dejagnu/runtest ; \ - else echo runtest ; fi` - - -# compilers to use to create programs which must be run in the build -# environment. -CC_FOR_BUILD = $(CC) -CXX_FOR_BUILD = $(CXX) - -SUBDIRS = @configdirs@ - -# This is set by the configure script to the list of directories which -# should be built using the target tools. -TARGET_CONFIGDIRS = @target_configdirs@ - -# Target libraries are put under this directory: -# Changed by configure to $(target_alias) if cross. -TARGET_SUBDIR = @target_subdir@ - -BUILD_CONFIGDIRS = libiberty -BUILD_SUBDIR = @build_subdir@ - -# This is set by the configure script to the arguments to use when configuring -# directories built for the target. -TARGET_CONFIGARGS = @target_configargs@ - -# This is set by the configure script to the arguments to use when configuring -# directories built for the build system. -BUILD_CONFIGARGS = @build_configargs@ - -# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared -# was used. -SET_LIB_PATH = @SET_LIB_PATH@ - -# This is the name of the environment variable used for the path to -# the libraries. This may be changed by configure.in. -RPATH_ENVVAR = @RPATH_ENVVAR@ - -# This is the list of directories that may be needed in RPATH_ENVVAR -# so that programs built for the host machine work. -HOST_LIB_PATH = $$r/bfd:$$r/opcodes - -# This is the list of directories that may be needed in RPATH_ENVVAR -# so that prorgams built for the target machine work. -TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs: - -# configure.in sets SET_LIB_PATH to this if --enable-shared was used. -# Some platforms don't like blank entries, so we remove duplicate, -# leading and trailing colons. -REALLY_SET_LIB_PATH = \ - $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); - -ALL = all.normal -INSTALL_TARGET = installdirs \ - install-gcc \ - $(INSTALL_MODULES) \ - $(INSTALL_TARGET_MODULES) \ - $(INSTALL_X11_MODULES) \ - $(INSTALL_DOSREL) - -INSTALL_TARGET_CROSS = installdirs \ - install-gcc-cross \ - $(INSTALL_MODULES) \ - $(INSTALL_TARGET_MODULES) \ - $(INSTALL_X11_MODULES) \ - $(INSTALL_DOSREL) - -# Should be substed by configure.in -FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ -CC_FOR_TARGET = @CC_FOR_TARGET@ -CXX_FOR_TARGET = @CXX_FOR_TARGET@ -CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@ -GCJ_FOR_TARGET = @GCJ_FOR_TARGET@ - -# If GCC_FOR_TARGET is not overriden on the command line, then this -# variable is passed down to the gcc Makefile, where it is used to -# build libgcc2.a. We define it here so that it can itself be -# overridden on the command line. -GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET) - -AS_FOR_TARGET = ` \ - if [ -f $$r/gas/as-new ] ; then \ - echo $$r/gas/as-new ; \ - elif [ -f $$r/gcc/xgcc ]; then \ - $(CC_FOR_TARGET) -print-prog-name=as ; \ - else \ - if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ - echo $(AS); \ - else \ - t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \ - fi; \ - fi` - -LD_FOR_TARGET = ` \ - if [ -f $$r/ld/ld-new ] ; then \ - echo $$r/ld/ld-new ; \ - elif [ -f $$r/gcc/xgcc ]; then \ - $(CC_FOR_TARGET) -print-prog-name=ld ; \ - else \ - if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ - echo $(LD); \ - else \ - t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \ - fi; \ - fi` - -DLLTOOL_FOR_TARGET = ` \ - if [ -f $$r/binutils/dlltool ] ; then \ - echo $$r/binutils/dlltool ; \ - else \ - if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ - echo $(DLLTOOL); \ - else \ - t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \ - fi; \ - fi` - -WINDRES_FOR_TARGET = ` \ - if [ -f $$r/binutils/windres ] ; then \ - echo $$r/binutils/windres ; \ - else \ - if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ - echo $(WINDRES); \ - else \ - t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \ - fi; \ - fi` - -AR_FOR_TARGET = ` \ - if [ -f $$r/binutils/ar ] ; then \ - echo $$r/binutils/ar ; \ - else \ - if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ - echo $(AR); \ - else \ - t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \ - fi; \ - fi` - -RANLIB_FOR_TARGET = ` \ - if [ -f $$r/binutils/ranlib ] ; then \ - echo $$r/binutils/ranlib ; \ - else \ - if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ - if [ x'$(RANLIB)' != x ]; then \ - echo $(RANLIB); \ - else \ - echo ranlib; \ - fi; \ - else \ - t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \ - fi; \ - fi` - -NM_FOR_TARGET = ` \ - if [ -f $$r/binutils/nm-new ] ; then \ - echo $$r/binutils/nm-new ; \ - elif [ -f $$r/gcc/xgcc ]; then \ - $(CC_FOR_TARGET) -print-prog-name=nm ; \ - else \ - if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ - echo $(NM); \ - else \ - t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \ - fi; \ - fi` - -# The first rule in the file had better be this one. Don't put any above it. -# This lives here to allow makefile fragments to contain dependencies. -all: all.normal -.PHONY: all - -# These can be overridden by config/mt-*. -# The _TARGET_ is because they're specified in mt-foo. -# The _HOST_ is because they're programs that run on the host. -EXTRA_TARGET_HOST_ALL_MODULES = -EXTRA_TARGET_HOST_INSTALL_MODULES = -EXTRA_TARGET_HOST_CHECK_MODULES = - -#### host and target specific makefile fragments come in here. -### - -# Flags to pass down to all sub-makes. -# Please keep these in alphabetical order. -BASE_FLAGS_TO_PASS = \ - "AR_FLAGS=$(AR_FLAGS)" \ - "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ - "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ - "BISON=$(BISON)" \ - "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ - "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ - "CFLAGS=$(CFLAGS)" \ - "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ - "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \ - "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ - "CXXFLAGS=$(CXXFLAGS)" \ - "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \ - "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ - "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \ - "INSTALL=$(INSTALL)" \ - "INSTALL_DATA=$(INSTALL_DATA)" \ - "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ - "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ - "LDFLAGS=$(LDFLAGS)" \ - "LEX=$(LEX)" \ - "LD_FOR_TARGET=$(LD_FOR_TARGET)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ - "LIBCXXFLAGS=$(LIBCXXFLAGS)" \ - "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \ - "M4=$(M4)" \ - "MAKE=$(MAKE)" \ - "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ - "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ - "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ - "RPATH_ENVVAR=$(RPATH_ENVVAR)" \ - "SHELL=$(SHELL)" \ - "EXPECT=$(EXPECT)" \ - "RUNTEST=$(RUNTEST)" \ - "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ - "TARGET_SUBDIR=$(TARGET_SUBDIR)" \ - "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \ - "YACC=$(YACC)" \ - "bindir=$(bindir)" \ - "datadir=$(datadir)" \ - "exec_prefix=$(exec_prefix)" \ - "includedir=$(includedir)" \ - "infodir=$(infodir)" \ - "libdir=$(libdir)" \ - "libexecdir=$(libexecdir)" \ - "lispdir=$(lispdir)" \ - "libstdcxx_incdir=$(libstdcxx_incdir)" \ - "libsubdir=$(libsubdir)" \ - "localstatedir=$(localstatedir)" \ - "mandir=$(mandir)" \ - "oldincludedir=$(oldincludedir)" \ - "prefix=$(prefix)" \ - "sbindir=$(sbindir)" \ - "sharedstatedir=$(sharedstatedir)" \ - "sysconfdir=$(sysconfdir)" \ - "tooldir=$(tooldir)" \ - "build_tooldir=$(build_tooldir)" \ - "gxx_include_dir=$(gxx_include_dir)" \ - "gcc_version=$(gcc_version)" \ - "gcc_version_trigger=$(gcc_version_trigger)" \ - "target_alias=$(target_alias)" - -# For any flags above that may contain shell code that varies from one -# target library to another. When doing recursive invocations of the -# top-level Makefile, we don't want the outer make to evaluate them, -# so we pass these variables down unchanged. They must not contain -# single nor double quotes. -RECURSE_FLAGS = \ - CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' - -# Flags to pass down to most sub-makes, in which we're building with -# the host environment. -# If any variables are added here, they must be added to do-*, below. -EXTRA_HOST_FLAGS = \ - 'AR=$(AR)' \ - 'AS=$(AS)' \ - 'CC=$(CC)' \ - 'CXX=$(CXX)' \ - 'DLLTOOL=$(DLLTOOL)' \ - 'LD=$(LD)' \ - 'NM=$(NM)' \ - "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \ - 'WINDRES=$(WINDRES)' - -FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) - -# Flags that are concerned with the location of the X11 include files -# and library files -# -# NOTE: until the top-level is getting the values via autoconf, it only -# causes problems to have this top-level Makefile overriding the autoconf-set -# values in child directories. Only variables that don't conflict with -# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now. -# -X11_FLAGS_TO_PASS = \ - 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \ - 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)' - -# Flags to pass down to makes which are built with the target environment. -# The double $ decreases the length of the command line; the variables -# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. -# If any variables are added here, they must be added to do-*, below. -EXTRA_TARGET_FLAGS = \ - 'AR=$$(AR_FOR_TARGET)' \ - 'AS=$$(AS_FOR_TARGET)' \ - 'CC=$$(CC_FOR_TARGET)' \ - 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ - 'CXX=$$(CXX_FOR_TARGET)' \ - 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ - 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ - 'LD=$$(LD_FOR_TARGET)' \ - 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ - 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ - 'NM=$$(NM_FOR_TARGET)' \ - 'RANLIB=$$(RANLIB_FOR_TARGET)' \ - 'WINDRES=$$(WINDRES_FOR_TARGET)' - -TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) - -# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it -# unfortunately needs the native compiler and the target ar and -# ranlib. -# If any variables are added here, they must be added to do-*, below. -# The HOST_* variables are a special case, which are used for the gcc -# cross-building scheme. -EXTRA_GCC_FLAGS = \ - 'AR=$(AR)' \ - 'AS=$(AS)' \ - 'CC=$(CC)' \ - 'CXX=$(CXX)' \ - 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ - 'HOST_CC=$(CC_FOR_BUILD)' \ - 'BUILD_PREFIX=$(BUILD_PREFIX)' \ - 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \ - 'NM=$(NM)' \ - "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \ - 'WINDRES=$$(WINDRES_FOR_TARGET)' \ - "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ - "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ - "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \ - "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \ - "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \ - "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ - "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ - "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \ - "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \ - "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ - "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" - -GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) - -# This is a list of the targets for all of the modules which are compiled -# using the build machine's native compiler. Configure edits the second -# macro for build!=host builds. -ALL_BUILD_MODULES_LIST = \ - all-build-libiberty -ALL_BUILD_MODULES = @all_build_modules@ - -# This is a list of the configure targets for all of the modules which -# are compiled using the native tools. -CONFIGURE_BUILD_MODULES = \ - configure-build-libiberty - -# This is a list of the targets for all of the modules which are compiled -# using $(FLAGS_TO_PASS). -ALL_MODULES = [+ FOR host_modules +]\ - all-[+module+] [+ ENDFOR host_modules +]\ - $(EXTRA_TARGET_HOST_ALL_MODULES) - -# This is a list of the check targets for all of the modules which are -# compiled using $(FLAGS_TO_PASS). -# -# The list is in two parts. The first lists those tools which -# are tested as part of the host's native tool-chain, and not -# tested in a cross configuration. -NATIVE_CHECK_MODULES = \ - check-bison \ - check-byacc \ - check-fastjar \ - check-flex \ - check-zip - -CROSS_CHECK_MODULES = [+ FOR host_modules +][+ IF no_check +][+ ELIF no_check_cross +][+ ELSE x +]\ - check-[+module+] [+ ENDIF no_check +][+ ENDFOR host_modules +]\ - $(EXTRA_TARGET_HOST_CHECK_MODULES) - -CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) - -# This is a list of the install targets for all of the modules which are -# compiled using $(FLAGS_TO_PASS). -INSTALL_MODULES = [+ FOR host_modules+][+ IF no_install +][+ ELSE no_install +]\ - install-[+module+] [+ ENDIF no_install +][+ ENDFOR host_modules +]\ - $(EXTRA_TARGET_HOST_INSTALL_MODULES) - -# This is a list of the targets for all of the modules which are compiled -# using $(X11_FLAGS_TO_PASS). -ALL_X11_MODULES = \ - all-gdb \ - all-expect \ - all-guile \ - all-tclX \ - all-tk \ - all-tix - -# This is a list of the check targets for all of the modules which are -# compiled using $(X11_FLAGS_TO_PASS). -CHECK_X11_MODULES = \ - check-gdb \ - check-guile \ - check-expect \ - check-tclX \ - check-tk \ - check-tix - -# This is a list of the install targets for all the modules which are -# compiled using $(X11_FLAGS_TO_PASS). -INSTALL_X11_MODULES = \ - install-gdb \ - install-guile \ - install-expect \ - install-tclX \ - install-tk \ - install-tix - -# This is a list of the targets for all of the modules which are compiled -# using $(TARGET_FLAGS_TO_PASS). -ALL_TARGET_MODULES = [+ FOR target_modules +]\ - all-target-[+module+] [+ ENDFOR target_modules +] - -# This is a list of the configure targets for all of the modules which -# are compiled using the target tools. -CONFIGURE_TARGET_MODULES = [+ FOR target_modules +]\ - configure-target-[+module+] [+ ENDFOR target_modules +] - -# This is a list of the check targets for all of the modules which are -# compiled using $(TARGET_FLAGS_TO_PASS). -CHECK_TARGET_MODULES = [+ FOR target_modules +][+ IF no_check +][+ ELSE check +]\ - check-target-[+module+] [+ ENDIF no_check +][+ ENDFOR target_modules +] - -# This is a list of the install targets for all of the modules which are -# compiled using $(TARGET_FLAGS_TO_PASS). -INSTALL_TARGET_MODULES = [+ FOR target_modules +][+ IF no_install +][+ ELSE install +]\ - install-target-[+module+] [+ ENDIF no_install +][+ ENDFOR target_modules +] - -# This is a list of the targets for which we can do a clean-{target}. -CLEAN_MODULES = [+ FOR host_modules +][+ IF no_clean +][+ ELSE no_clean +]\ - clean-[+module+] [+ ENDIF no_clean +][+ ENDFOR host_modules +] - -# All of the target modules that can be cleaned -CLEAN_TARGET_MODULES = [+ FOR target_modules +][+ IF no_clean +][+ ELSE clean +]\ - clean-target-[+module+] [+ ENDIF no_clean +][+ ENDFOR target_modules +] - -# All of the x11 modules that can be cleaned -CLEAN_X11_MODULES = \ - clean-gdb \ - clean-expect \ - clean-guile \ - clean-tclX \ - clean-tk \ - clean-tix - -# The target built for a native build. -.PHONY: all.normal -all.normal: \ - $(ALL_BUILD_MODULES) \ - $(ALL_MODULES) \ - $(ALL_X11_MODULES) \ - $(ALL_TARGET_MODULES) \ - all-gcc - -# Do a target for all the subdirectories. A ``make do-X'' will do a -# ``make X'' in all subdirectories (because, in general, there is a -# dependency (below) of X upon do-X, a ``make X'' will also do this, -# but it may do additional work as well). -# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once, -# because it is so large that it can easily overflow the command line -# length limit on some systems. -DO_X = \ - do-clean \ - do-distclean \ - do-dvi \ - do-info \ - do-install-info \ - do-installcheck \ - do-mostlyclean \ - do-maintainer-clean \ - do-TAGS -.PHONY: $(DO_X) -$(DO_X): - @target=`echo $@ | sed -e 's/^do-//'`; \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - for i in $(SUBDIRS) -dummy-; do \ - if [ -f ./$$i/Makefile ]; then \ - case $$i in \ - gcc) \ - for flag in $(EXTRA_GCC_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - ;; \ - *) \ - for flag in $(EXTRA_HOST_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - ;; \ - esac ; \ - if (cd ./$$i; \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ - $${target}); \ - then true; else exit 1; fi; \ - else true; fi; \ - done - @target=`echo $@ | sed -e 's/^do-//'`; \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - for i in $(TARGET_CONFIGDIRS) -dummy-; do \ - if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - if (cd $(TARGET_SUBDIR)/$$i; \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ - $${target}); \ - then true; else exit 1; fi; \ - else true; fi; \ - done - -# Here are the targets which correspond to the do-X targets. - -.PHONY: info installcheck dvi install-info -.PHONY: clean distclean mostlyclean maintainer-clean realclean -.PHONY: local-clean local-distclean local-maintainer-clean -info: do-info -installcheck: do-installcheck -dvi: do-dvi - -# Make sure makeinfo is built before we do a `make info'. -do-info: all-texinfo - -install-info: do-install-info dir.info - s=`cd $(srcdir); ${PWD}`; export s; \ - if [ -f dir.info ] ; then \ - $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \ - else true ; fi - -local-clean: - -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log - -local-distclean: - -rm -f Makefile config.status config.cache mh-frag mt-frag - -if [ "$(TARGET_SUBDIR)" != "." ]; then \ - rm -rf $(TARGET_SUBDIR); \ - else true; fi - -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile - -rm -f texinfo/doc/Makefile texinfo/po/POTFILES - -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null - -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null - -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null - -local-maintainer-clean: - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -clean: do-clean local-clean -mostlyclean: do-mostlyclean local-clean -distclean: do-distclean local-clean local-distclean -maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean -maintainer-clean: local-distclean -realclean: maintainer-clean - -# This rule is used to clean specific modules. -.PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc -$(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc: - @dir=`echo $@ | sed -e 's/clean-//'`; \ - if [ -f ./$${dir}/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \ - else \ - true; \ - fi - -.PHONY: $(CLEAN_TARGET_MODULES) -$(CLEAN_TARGET_MODULES): - @dir=`echo $@ | sed -e 's/clean-target-//'`; \ - rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ - if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \ - else \ - true; \ - fi - -clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc -clean-target-libgcc: - test ! -d gcc/libgcc || \ - (cd gcc/libgcc && find . -type d -print) | \ - while read d; do rm -f gcc/$$d/libgcc.a || : ; done - -rm -rf gcc/libgcc - -# Check target. - -.PHONY: check do-check -check: - $(MAKE) do-check NOTPARALLEL=parallel-ok - -do-check: $(CHECK_MODULES) \ - $(CHECK_TARGET_MODULES) \ - $(CHECK_X11_MODULES) \ - check-gcc - -# Automated reporting of test results. - -warning.log: build.log - $(srcdir)/contrib/warn_summary build.log > $@ - -mail-report.log: - if test x'$(BOOT_CFLAGS)' != x''; then \ - BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ - fi; \ - $(srcdir)/contrib/test_summary -t >$@ - chmod +x $@ - echo If you really want to send e-mail, run ./$@ now - -mail-report-with-warnings.log: warning.log - if test x'$(BOOT_CFLAGS)' != x''; then \ - BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ - fi; \ - $(srcdir)/contrib/test_summary -t -i warning.log >$@ - chmod +x $@ - echo If you really want to send e-mail, run ./$@ now - -# Installation targets. - -.PHONY: install install-cross uninstall source-vault binary-vault vault-install -install: $(INSTALL_TARGET) -install-cross: $(INSTALL_TARGET_CROSS) - -uninstall: - @echo "the uninstall target is not supported in this tree" - -source-vault: - $(MAKE) -f ./release/Build-A-Release \ - host=$(host_alias) source-vault - -binary-vault: - $(MAKE) -f ./release/Build-A-Release \ - host=$(host_alias) target=$(target_alias) - -vault-install: - @if [ -f ./release/vault-install ] ; then \ - ./release/vault-install $(host_alias) $(target_alias) ; \ - else \ - true ; \ - fi - -.PHONY: install.all -install.all: install-no-fixedincludes - @if [ -f ./gcc/Makefile ] ; then \ - r=`${PWD}` ; export r ; \ - $(SET_LIB_PATH) \ - (cd ./gcc; \ - $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ - else \ - true ; \ - fi - -# install-no-fixedincludes is used because Cygnus can not distribute -# the fixed header files. -.PHONY: install-no-fixedincludes -install-no-fixedincludes: \ - installdirs \ - $(INSTALL_MODULES) \ - $(INSTALL_TARGET_MODULES) \ - $(INSTALL_X11_MODULES) \ - gcc-no-fixedincludes - -# Install the gcc headers files, but not the fixed include files, -# which Cygnus is not allowed to distribute. This rule is very -# dependent on the workings of the gcc Makefile.in. -.PHONY: gcc-no-fixedincludes -gcc-no-fixedincludes: - @if [ -f ./gcc/Makefile ]; then \ - rm -rf gcc/tmp-include; \ - mv gcc/include gcc/tmp-include 2>/dev/null; \ - mkdir gcc/include; \ - cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ - touch gcc/stmp-fixinc gcc/include/fixed; \ - rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}` ; export s; \ - $(SET_LIB_PATH) \ - (cd ./gcc; \ - $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ - rm -rf gcc/include; \ - mv gcc/tmp-include gcc/include 2>/dev/null; \ - else true; fi - -# This rule is used to build the modules which are built with the -# build machine's native compiler. -.PHONY: $(ALL_BUILD_MODULES) -$(ALL_BUILD_MODULES): - dir=`echo $@ | sed -e 's/all-build-//'`; \ - if [ -f ./$${dir}/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - (cd $(BUILD_SUBDIR)/$${dir} && $(MAKE) all); \ - else \ - true; \ - fi - -# This rule is used to configure the modules which are built with the -# native tools. -.PHONY: $(CONFIGURE_BUILD_MODULES) -$(CONFIGURE_BUILD_MODULES): - @dir=`echo $@ | sed -e 's/configure-build-//'`; \ - if [ ! -d $(BUILD_SUBDIR) ]; then \ - true; \ - elif [ -f $(BUILD_SUBDIR)/$${dir}/Makefile ] ; then \ - true; \ - elif echo " $(BUILD_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \ - if [ -d $(srcdir)/$${dir} ]; then \ - [ -d $(BUILD_SUBDIR)/$${dir} ] || mkdir $(BUILD_SUBDIR)/$${dir};\ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - AR="$(AR_FOR_BUILD)"; export AR; \ - AS="$(AS_FOR_BUILD)"; export AS; \ - CC="$(CC_FOR_BUILD)"; export CC; \ - CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ - CXX="$(CXX_FOR_BUILD)"; export CXX; \ - CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ - GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \ - DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \ - LD="$(LD_FOR_BUILD)"; export LD; \ - LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \ - NM="$(NM_FOR_BUILD)"; export NM; \ - RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \ - WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \ - echo Configuring in $(BUILD_SUBDIR)/$${dir}; \ - cd "$(BUILD_SUBDIR)/$${dir}" || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) \ - topdir=$(srcdir) ;; \ - *) \ - case "$(BUILD_SUBDIR)" in \ - .) topdir="../$(srcdir)" ;; \ - *) topdir="../../$(srcdir)" ;; \ - esac ;; \ - esac; \ - if [ "$(srcdir)" = "." ] ; then \ - if [ "$(BUILD_SUBDIR)" != "." ] ; then \ - if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \ - if [ -f Makefile ]; then \ - if $(MAKE) distclean; then \ - true; \ - else \ - exit 1; \ - fi; \ - else \ - true; \ - fi; \ - else \ - exit 1; \ - fi; \ - else \ - true; \ - fi; \ - srcdiroption="--srcdir=."; \ - libsrcdir="."; \ - else \ - srcdiroption="--srcdir=$${topdir}/$${dir}"; \ - libsrcdir="$$s/$${dir}"; \ - fi; \ - if [ -f $${libsrcdir}/configure ] ; then \ - rm -f no-such-file skip-this-dir; \ - CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ - $(BUILD_CONFIGARGS) $${srcdiroption} \ - --with-build-subdir="$(BUILD_SUBDIR)"; \ - else \ - rm -f no-such-file skip-this-dir; \ - CONFIG_SITE=no-such-file $(SHELL) $$s/configure \ - $(BUILD_CONFIGARGS) $${srcdiroption} \ - --with-build-subdir="$(BUILD_SUBDIR)"; \ - fi || exit 1; \ - if [ -f skip-this-dir ] ; then \ - sh skip-this-dir; \ - rm -f skip-this-dir; \ - cd ..; rmdir $${dir} || true; \ - else \ - true; \ - fi; \ - else \ - true; \ - fi; \ - else \ - true; \ - fi - -# This rule is used to build the modules which use FLAGS_TO_PASS. To -# build a target all-X means to cd to X and make all. -.PHONY: $(ALL_MODULES) -$(ALL_MODULES): - @dir=`echo $@ | sed -e 's/all-//'`; \ - if [ -f ./$${dir}/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \ - else \ - true; \ - fi - -# These rules are used to check the modules which use FLAGS_TO_PASS. -# To build a target check-X means to cd to X and make check. Some -# modules are only tested in a native toolchain. - -.PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) -$(NATIVE_CHECK_MODULES): - @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ - dir=`echo $@ | sed -e 's/check-//'`; \ - if [ -f ./$${dir}/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ - else \ - true; \ - fi; \ - fi - -$(CROSS_CHECK_MODULES): - @dir=`echo $@ | sed -e 's/check-//'`; \ - if [ -f ./$${dir}/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ - else \ - true; \ - fi - -# This rule is used to install the modules which use FLAGS_TO_PASS. -# To build a target install-X means to cd to X and make install. -.PHONY: $(INSTALL_MODULES) -$(INSTALL_MODULES): installdirs - @dir=`echo $@ | sed -e 's/install-//'`; \ - if [ -f ./$${dir}/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ - else \ - true; \ - fi - -# This rule is used to configure the modules which are built with the -# target tools. -.PHONY: $(CONFIGURE_TARGET_MODULES) -$(CONFIGURE_TARGET_MODULES): - @dir=`echo $@ | sed -e 's/configure-target-//'`; \ - if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \ - r=`${PWD}`; export r; \ - $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \ - if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \ - if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \ - if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \ - rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ - else \ - echo "Multilibs changed for $${dir}, reconfiguring"; \ - rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \ - mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \ - fi; \ - else \ - mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \ - fi; \ - fi; \ - fi; exit 0 # break command into two pieces - @dir=`echo $@ | sed -e 's/configure-target-//'`; \ - if [ ! -d $(TARGET_SUBDIR) ]; then \ - true; \ - elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ - true; \ - elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \ - if [ -d $(srcdir)/$${dir} ]; then \ - [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - AR="$(AR_FOR_TARGET)"; export AR; \ - AS="$(AS_FOR_TARGET)"; export AS; \ - CC="$(CC_FOR_TARGET)"; export CC; \ - CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ - CXX="$(CXX_FOR_TARGET)"; export CXX; \ - CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ - GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ - DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ - LD="$(LD_FOR_TARGET)"; export LD; \ - LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ - NM="$(NM_FOR_TARGET)"; export NM; \ - RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ - WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ - echo Configuring in $(TARGET_SUBDIR)/$${dir}; \ - cd "$(TARGET_SUBDIR)/$${dir}" || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) \ - topdir=$(srcdir) ;; \ - *) \ - case "$(TARGET_SUBDIR)" in \ - .) topdir="../$(srcdir)" ;; \ - *) topdir="../../$(srcdir)" ;; \ - esac ;; \ - esac; \ - if [ "$(srcdir)" = "." ] ; then \ - if [ "$(TARGET_SUBDIR)" != "." ] ; then \ - if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \ - if [ -f Makefile ]; then \ - if $(MAKE) distclean; then \ - true; \ - else \ - exit 1; \ - fi; \ - else \ - true; \ - fi; \ - else \ - exit 1; \ - fi; \ - else \ - true; \ - fi; \ - srcdiroption="--srcdir=."; \ - libsrcdir="."; \ - else \ - srcdiroption="--srcdir=$${topdir}/$${dir}"; \ - libsrcdir="$$s/$${dir}"; \ - fi; \ - if [ -f $${libsrcdir}/configure ] ; then \ - rm -f no-such-file skip-this-dir; \ - CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ - $(TARGET_CONFIGARGS) $${srcdiroption} \ - --with-target-subdir="$(TARGET_SUBDIR)"; \ - else \ - rm -f no-such-file skip-this-dir; \ - CONFIG_SITE=no-such-file $(SHELL) $$s/configure \ - $(TARGET_CONFIGARGS) $${srcdiroption} \ - --with-target-subdir="$(TARGET_SUBDIR)"; \ - fi || exit 1; \ - if [ -f skip-this-dir ] ; then \ - sh skip-this-dir; \ - rm -f skip-this-dir; \ - cd ..; rmdir $${dir} || true; \ - else \ - true; \ - fi; \ - else \ - true; \ - fi; \ - else \ - true; \ - fi - -# This rule is used to build the modules which use TARGET_FLAGS_TO_PASS. -# To build a target all-X means to cd to X and make all. -.PHONY: $(ALL_TARGET_MODULES) -$(ALL_TARGET_MODULES): - @dir=`echo $@ | sed -e 's/all-target-//'`; \ - if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd $(TARGET_SUBDIR)/$${dir}; \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \ - else \ - true; \ - fi - -# This rule is used to check the modules which use TARGET_FLAGS_TO_PASS. -# To build a target install-X means to cd to X and make install. -.PHONY: $(CHECK_TARGET_MODULES) -$(CHECK_TARGET_MODULES): - @dir=`echo $@ | sed -e 's/check-target-//'`; \ - if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd $(TARGET_SUBDIR)/$${dir}; \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\ - else \ - true; \ - fi - -# This rule is used to install the modules which use -# TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X -# and make install. -.PHONY: $(INSTALL_TARGET_MODULES) -$(INSTALL_TARGET_MODULES): installdirs - @dir=`echo $@ | sed -e 's/install-target-//'`; \ - if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd $(TARGET_SUBDIR)/$${dir}; \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \ - else \ - true; \ - fi - -# This rule is used to build the modules which use X11_FLAGS_TO_PASS. -# To build a target all-X means to cd to X and make all. -.PHONY: $(ALL_X11_MODULES) -$(ALL_X11_MODULES): - @dir=`echo $@ | sed -e 's/all-//'`; \ - if [ -f ./$${dir}/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd $${dir}; \ - $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \ - else \ - true; \ - fi - -# This rule is used to check the modules which use X11_FLAGS_TO_PASS. -# To build a target check-X means to cd to X and make all. -.PHONY: $(CHECK_X11_MODULES) -$(CHECK_X11_MODULES): - @dir=`echo $@ | sed -e 's/check-//'`; \ - if [ -f ./$${dir}/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd $${dir}; \ - $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \ - else \ - true; \ - fi - -# This rule is used to install the modules which use X11_FLAGS_TO_PASS. -# To build a target install-X means to cd to X and make install. -.PHONY: $(INSTALL_X11_MODULES) -$(INSTALL_X11_MODULES): installdirs - @dir=`echo $@ | sed -e 's/install-//'`; \ - if [ -f ./$${dir}/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd $${dir}; \ - $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \ - else \ - true; \ - fi - -# gcc is the only module which uses GCC_FLAGS_TO_PASS. -.PHONY: all-gcc -all-gcc: - @if [ -f ./gcc/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ - else \ - true; \ - fi - -# Building GCC uses some tools for rebuilding "source" files -# like texinfo, bison/byacc, etc. So we must depend on those. -# -# While building GCC, it may be necessary to run various target -# programs like the assembler, linker, etc. So we depend on -# those too. -# -# In theory, on an SMP all those dependencies can be resolved -# in parallel. -# -.PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean -bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-bootstrap - @r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - echo "Bootstrapping the compiler"; \ - cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@ - @r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - case "$@" in \ - *bootstrap4-lean ) \ - msg="Comparing stage3 and stage4 of the compiler"; \ - compare=compare3-lean ;; \ - *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \ - compare=compare3 ;; \ - *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \ - compare=compare-lean ;; \ - * ) msg="Comparing stage2 and stage3 of the compiler"; \ - compare=compare ;; \ - esac; \ - $(SET_LIB_PATH) \ - echo "$$msg"; \ - cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare - @r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}` ; export s; \ - $(SET_LIB_PATH) \ - echo "Building runtime libraries"; \ - $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all - -.PHONY: cross -cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld - @r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - echo "Building the C and C++ compiler"; \ - cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" - @r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}` ; export s; \ - $(SET_LIB_PATH) \ - echo "Building runtime libraries"; \ - $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \ - LANGUAGES="c c++" all - -.PHONY: check-gcc -check-gcc: - @if [ -f ./gcc/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ - else \ - true; \ - fi - -.PHONY: check-c++ -check-c++: - @if [ -f ./gcc/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \ - $(MAKE) check-target-libstdc++-v3; \ - else \ - true; \ - fi - -.PHONY: install-gcc -install-gcc: - @if [ -f ./gcc/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ - else \ - true; \ - fi - -.PHONY: install-gcc-cross -install-gcc-cross: - @if [ -f ./gcc/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \ - else \ - true; \ - fi -# EXPERIMENTAL STUFF -# This rule is used to install the modules which use FLAGS_TO_PASS. -# To build a target install-X means to cd to X and make install. -.PHONY: install-dosrel -install-dosrel: installdirs info - @dir=`echo $@ | sed -e 's/install-//'`; \ - if [ -f ./$${dir}/Makefile ] ; then \ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - $(SET_LIB_PATH) \ - (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ - else \ - true; \ - fi - -install-dosrel-fake: - -ALL_GCC = all-gcc -ALL_GCC_C = $(ALL_GCC) all-target-newlib all-target-libgloss -ALL_GCC_CXX = $(ALL_GCC_C) all-target-libstdc++-v3 - -# This is a list of inter-dependencies among modules. -all-ash: -all-autoconf: all-m4 all-texinfo -all-automake: all-m4 all-texinfo -all-bash: -all-bfd: all-libiberty all-intl -all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl -all-bison: all-texinfo -configure-target-boehm-gc: $(ALL_GCC_C) configure-target-qthreads -all-byacc: -all-bzip2: -all-db: -all-dejagnu: all-tcl all-expect all-tk -all-diff: all-libiberty -all-etc: -configure-target-examples: $(ALL_GCC_C) -all-expect: all-tcl all-tk -all-fileutils: all-libiberty -all-findutils: -all-find: -all-flex: all-libiberty all-bison all-byacc -all-gas: all-libiberty all-opcodes all-bfd all-intl -all-gawk: -all-gcc: all-bison all-byacc all-binutils all-gas all-ld all-zlib -all-bootstrap: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib -GDB_TK = @GDB_TK@ -all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK) -all-gettext: -all-gnuserv: -configure-target-gperf: $(ALL_GCC_CXX) -all-target-gperf: all-target-libiberty all-target-libstdc++-v3 -all-gprof: all-libiberty all-bfd all-opcodes all-intl -all-grep: all-libiberty -all-guile: -all-gzip: all-libiberty -all-hello: all-libiberty -all-indent: -all-intl: -all-itcl: all-tcl all-tk -all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl -configure-target-libgloss: $(ALL_GCC) -all-target-libgloss: configure-target-newlib -all-libgui: all-tcl all-tk all-itcl -all-libiberty: - -all-build-libiberty: configure-build-libiberty - -configure-target-libffi: $(ALL_GCC_C) -configure-target-libjava: $(ALL_GCC_C) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi -all-target-libjava: all-fastjar all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi -configure-target-libstdc++-v3: $(ALL_GCC_C) -all-target-libstdc++-v3: all-target-libiberty -all-libtool: -configure-target-libf2c: $(ALL_GCC_C) -all-target-libf2c: all-target-libiberty -configure-target-libobjc: $(ALL_GCC_C) -all-target-libobjc: all-target-libiberty -all-m4: all-libiberty all-texinfo -all-make: all-libiberty -all-mmalloc: -configure-target-newlib: $(ALL_GCC) -configure-target-libtermcap: $(ALL_GCC_C) -all-opcodes: all-bfd all-libiberty -all-patch: all-libiberty -all-perl: -all-prms: all-libiberty -configure-target-qthreads: $(ALL_GCC_C) -all-rcs: -all-readline: -all-recode: all-libiberty -all-sed: all-libiberty -all-send-pr: all-prms -all-shellutils: -all-sid: all-tcl all-tk -all-sim: all-libiberty all-bfd all-opcodes all-readline -all-snavigator: all-tcl all-tk all-itcl all-tix all-db all-grep all-libgui -all-tar: all-libiberty -all-tcl: -all-tclX: all-tcl all-tk -all-tk: all-tcl -all-texinfo: all-libiberty -all-textutils: -all-time: -all-tix: all-tcl all-tk -all-wdiff: -configure-target-winsup: $(ALL_GCC_C) -all-target-winsup: all-target-libiberty all-target-libtermcap -all-uudecode: all-libiberty -all-zip: -all-zlib: -configure-target-zlib: $(ALL_GCC_C) -all-fastjar: all-zlib all-libiberty -configure-target-fastjar: configure-target-zlib -all-target-fastjar: configure-target-fastjar all-target-zlib all-target-libiberty -configure-target-libiberty: $(ALL_GCC_C) -configure-target: $(CONFIGURE_TARGET_MODULES) -all-target: $(ALL_TARGET_MODULES) -install-target: $(INSTALL_TARGET_MODULES) -install-gdb: install-tcl install-tk install-itcl install-tix install-libgui -install-sid: install-tcl install-tk - -# We put install-opcodes before install-binutils because the installed -# binutils might be on PATH, and they might need the shared opcodes -# library. -install-binutils: install-opcodes - -# We put install-tcl before install-itcl because itcl wants to run a -# program on installation which uses the Tcl libraries. -install-itcl: install-tcl - - -# Dependencies of all-target-foo on configure-target-foo. -[+ FOR target_modules +]all-target-[+module+]: configure-target-[+module+] -[+ ENDFOR target_modules +] - -### other supporting targets - -MAKEDIRS= \ - $(DESTDIR)$(prefix) \ - $(DESTDIR)$(exec_prefix) -.PHONY: installdirs -installdirs: mkinstalldirs - $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) - -dir.info: do-install-info - if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \ - $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \ - mv -f dir.info.new dir.info ; \ - else true ; \ - fi - -dist: - @echo "Building a full distribution of this tree isn't done" - @echo "via 'make dist'. Check out the etc/ subdirectory" - -etags tags: TAGS - -# Right now this just builds TAGS in each subdirectory. emacs19 has the -# ability to use several tags files at once, so there is probably no need -# to combine them into one big TAGS file (like CVS 1.3 does). We could -# (if we felt like it) have this Makefile write a piece of elisp which -# the user could load to tell emacs19 where all the TAGS files we just -# built are. -TAGS: do-TAGS - -# Rebuilding Makefile.in, using autogen. -$(srcdir)/Makefile.in: # $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def - cd $(srcdir) && autogen Makefile.def - -# with the gnu make, this is done automatically. - -Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger) - $(SHELL) ./config.status - -# - -.NOEXPORT: -MAKEOVERRIDES= - -# end of Makefile.in diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f2c7a389e31..f4fb4e00e60 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,32 +1,3 @@ -2002-10-02 Stephen Clarke - - * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount. - (sh_elf_link_hash_newfunc): Initialize it. - (allocate_dynrelocs): Transfer gotplt refs from plt.refcount - to got.refcount for symbols that are forced local or when - we have direct got refs. - (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it - to correctly adjust got.refcount and plt.refcount. - (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across. - (sh_elf_check_relocs): Increment gotplt_refcount. - -2002-10-01 Jakub Jelinek - - * elf32-i386.c (elf_i386_relocate_section): Fix - movl foo@indntpoff, %eax IE->LE transition. - -2002-10-01 Jakub Jelinek - - * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD - sequence and its transitions. - -2002-10-01 Jakub Jelinek - - * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32 - to st_value + addend in non-code sections. - * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve - R_X86_64_DTPOFF32 to st_value + addend in non-code sections. - 2002-09-30 Gavin Romig-Koch Ken Raeburn Aldy Hernandez diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 87e1e766464..b71d78eb073 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -2625,7 +2625,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, if (val == 0xa1) { /* movl foo, %eax. */ - bfd_put_8 (output_bfd, 0xb8, contents + rel->r_offset - 1); + bfd_put_8 (output_bfd, 0xb8, contents + rel->r_offset - 2); } else if (type == 0x8b) { @@ -2926,7 +2926,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, break; case R_386_TLS_LDO_32: - if (info->shared || (input_section->flags & SEC_CODE) == 0) + if (info->shared) relocation -= dtpoff_base (info); else /* When converting LDO to LE, we must negate. */ diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 703ac4016be..c8bbe7152db 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -3388,8 +3388,6 @@ struct elf_sh_link_hash_entry /* Track dynamic relocs copied for this symbol. */ struct elf_sh_dyn_relocs *dyn_relocs; - - bfd_signed_vma gotplt_refcount; }; /* sh ELF linker hash table. */ @@ -3454,7 +3452,6 @@ sh_elf_link_hash_newfunc (entry, table, string) eh = (struct elf_sh_link_hash_entry *) ret; eh->dyn_relocs = NULL; - eh->gotplt_refcount = 0; #ifdef INCLUDE_SHMEDIA ret->datalabel_got_offset = (bfd_vma) -1; #endif @@ -3870,18 +3867,6 @@ allocate_dynrelocs (h, inf) info = (struct bfd_link_info *) inf; htab = sh_elf_hash_table (info); - eh = (struct elf_sh_link_hash_entry *) h; - if ((h->got.refcount > 0 - || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL)) - && eh->gotplt_refcount > 0) - { - /* The symbol has been forced local, or we have some direct got refs, - so treat all the gotplt refs as got refs. */ - h->got.refcount += eh->gotplt_refcount; - if (h->plt.refcount >= eh->gotplt_refcount) - h->plt.refcount -= eh->gotplt_refcount; - } - if (htab->root.dynamic_sections_created && h->plt.refcount > 0) { @@ -3976,6 +3961,7 @@ allocate_dynrelocs (h, inf) else h->got.offset = (bfd_vma) -1; + eh = (struct elf_sh_link_hash_entry *) h; if (eh->dyn_relocs == NULL) return true; @@ -5214,7 +5200,6 @@ sh_elf_gc_sweep_hook (abfd, info, sec, relocs) const Elf_Internal_Rela *rel, *relend; unsigned long r_symndx; struct elf_link_hash_entry *h; - struct elf_sh_link_hash_entry *eh; elf_section_data (sec)->local_dynrel = NULL; @@ -5317,15 +5302,10 @@ sh_elf_gc_sweep_hook (abfd, info, sec, relocs) if (r_symndx >= symtab_hdr->sh_info) { h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - eh = (struct elf_sh_link_hash_entry *) h; - if (eh->gotplt_refcount > 0) - { - eh->gotplt_refcount -= 1; - if (h->plt.refcount > 0) - h->plt.refcount -= 1; - } - else if (h->got.refcount > 0) + if (h->got.refcount > 0) h->got.refcount -= 1; + if (h->plt.refcount > 0) + h->plt.refcount -= 1; } else if (local_got_refcounts != NULL) { @@ -5385,8 +5365,6 @@ sh_elf_copy_indirect_symbol (bed, dir, ind) edir->dyn_relocs = eind->dyn_relocs; eind->dyn_relocs = NULL; } - edir->gotplt_refcount = eind->gotplt_refcount; - eind->gotplt_refcount = 0; _bfd_elf_link_hash_copy_indirect (bed, dir, ind); } @@ -5561,7 +5539,6 @@ sh_elf_check_relocs (abfd, info, sec, relocs) h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT; h->plt.refcount += 1; - ((struct elf_sh_link_hash_entry *) h)->gotplt_refcount += 1; break; diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index cbb961f370a..fa2f2ee5ec1 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -2224,32 +2224,31 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section, if (ELF64_R_TYPE (rel->r_info) == R_X86_64_TLSGD) { unsigned int i; - static unsigned char tlsgd[8] - = { 0x66, 0x48, 0x8d, 0x3d, 0x66, 0x66, 0x48, 0xe8 }; + static unsigned char tlsgd[7] + = { 0x66, 0x66, 0x66, 0x66, 0x48, 0x8d, 0x3d }; /* GD->LE transition. - .byte 0x66; leaq foo@tlsgd(%rip), %rdi - .word 0x6666; rex64; call __tls_get_addr@plt + .long 0x66666666; leaq foo@tlsgd(%rip), %rdi + callq __tls_get_addr@plt Change it into: movq %fs:0, %rax leaq foo@tpoff(%rax), %rax */ - BFD_ASSERT (rel->r_offset >= 4); - for (i = 0; i < 4; i++) + BFD_ASSERT (rel->r_offset >= 7); + for (i = 0; i < 7; i++) BFD_ASSERT (bfd_get_8 (input_bfd, - contents + rel->r_offset - 4 + i) + contents + rel->r_offset - 7 + i) == tlsgd[i]); - BFD_ASSERT (rel->r_offset + 12 <= input_section->_raw_size); - for (i = 0; i < 4; i++) - BFD_ASSERT (bfd_get_8 (input_bfd, - contents + rel->r_offset + 4 + i) - == tlsgd[i+4]); + BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size); + BFD_ASSERT (bfd_get_8 (input_bfd, + contents + rel->r_offset + 4) + == 0xe8); BFD_ASSERT (rel + 1 < relend); BFD_ASSERT (ELF64_R_TYPE (rel[1].r_info) == R_X86_64_PLT32); - memcpy (contents + rel->r_offset - 4, + memcpy (contents + rel->r_offset - 7, "\x64\x48\x8b\x04\x25\0\0\0\0\x48\x8d\x80\0\0\0", 16); bfd_put_32 (output_bfd, tpoff (info, relocation), - contents + rel->r_offset + 8); + contents + rel->r_offset + 5); /* Skip R_X86_64_PLT32. */ rel++; continue; @@ -2398,28 +2397,27 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section, else { unsigned int i; - static unsigned char tlsgd[8] - = { 0x66, 0x48, 0x8d, 0x3d, 0x66, 0x66, 0x48, 0xe8 }; + static unsigned char tlsgd[7] + = { 0x66, 0x66, 0x66, 0x66, 0x48, 0x8d, 0x3d }; /* GD->IE transition. - .byte 0x66; leaq foo@tlsgd(%rip), %rdi - .word 0x6666; rex64; call __tls_get_addr@plt + .long 0x66666666; leaq foo@tlsgd(%rip), %rdi + callq __tls_get_addr@plt Change it into: movq %fs:0, %rax addq foo@gottpoff(%rip), %rax */ - BFD_ASSERT (rel->r_offset >= 4); - for (i = 0; i < 4; i++) + BFD_ASSERT (rel->r_offset >= 7); + for (i = 0; i < 7; i++) BFD_ASSERT (bfd_get_8 (input_bfd, - contents + rel->r_offset - 4 + i) + contents + rel->r_offset - 7 + i) == tlsgd[i]); - BFD_ASSERT (rel->r_offset + 12 <= input_section->_raw_size); - for (i = 0; i < 4; i++) - BFD_ASSERT (bfd_get_8 (input_bfd, - contents + rel->r_offset + 4 + i) - == tlsgd[i+4]); + BFD_ASSERT (rel->r_offset + 9 <= input_section->_raw_size); + BFD_ASSERT (bfd_get_8 (input_bfd, + contents + rel->r_offset + 4) + == 0xe8); BFD_ASSERT (rel + 1 < relend); BFD_ASSERT (ELF64_R_TYPE (rel[1].r_info) == R_X86_64_PLT32); - memcpy (contents + rel->r_offset - 4, + memcpy (contents + rel->r_offset - 7, "\x64\x48\x8b\x04\x25\0\0\0\0\x48\x03\x05\0\0\0", 16); @@ -2428,9 +2426,9 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section, - rel->r_offset - input_section->output_section->vma - input_section->output_offset - - 12); + - 9); bfd_put_32 (output_bfd, relocation, - contents + rel->r_offset + 8); + contents + rel->r_offset + 5); /* Skip R_X86_64_PLT32. */ rel++; continue; @@ -2498,7 +2496,7 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section, break; case R_X86_64_DTPOFF32: - if (info->shared || (input_section->flags & SEC_CODE) == 0) + if (info->shared) relocation -= dtpoff_base (info); else relocation = tpoff (info, relocation); diff --git a/bfd/version.h b/bfd/version.h index 83fd0856cd1..6a77c2a2dcd 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1 +1 @@ -#define BFD_VERSION_DATE 20021004 +#define BFD_VERSION_DATE 20020930 diff --git a/configure.in b/configure.in index 8988bef2782..3041dd4a7c4 100644 --- a/configure.in +++ b/configure.in @@ -421,6 +421,10 @@ case "${target}" in i[34567]86-*-freebsd*) noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;; + s390*-*-linux*) + # The libffi port is not yet in the GCC tree + noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" + ;; i[3456]86-*-linux*) # This section makes it possible to build newlib natively on linux. # If we are using a cross compiler then don't configure newlib. @@ -1321,23 +1325,20 @@ esac # If --enable-shared was set, we must set LD_LIBRARY_PATH so that the # binutils tools will find libbfd.so. if test "${shared}" = "yes" ; then - SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)" -else - SET_LIB_PATH= + sed -e 's/^SET_LIB_PATH[ ]*=.*$/SET_LIB_PATH = $(REALLY_SET_LIB_PATH)/' \ + Makefile > Makefile.tem + rm -f Makefile + mv -f Makefile.tem Makefile + + case "${host}" in + *-*-hpux*) + sed -e 's/^RPATH_ENVVAR[ ]*=.*$/RPATH_ENVVAR = SHLIB_PATH/' \ + Makefile > Makefile.tem + rm -f Makefile + mv -f Makefile.tem Makefile + ;; + esac fi -sed -e "s/@SET_LIB_PATH@/${SET_LIB_PATH}/" Makefile > Makefile.tem -rm -f Makefile -mv -f Makefile.tem Makefile - - -case "${host}" in - *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;; - *) RPATH_ENVVAR=LD_LIBRARY_PATH ;; -esac -sed -e "s/@RPATH_ENVVAR@/${RPATH_ENVVAR}/" Makefile > Makefile.tem -rm -f Makefile -mv -f Makefile.tem Makefile - # Base args. Strip norecursion, cache-file, srcdir, host, build, target. # These are the ones we might not want to pass down to subconfigures. diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6a70cf425d6..0c8030eade0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,141 +1,3 @@ -2002-10-04 Michael Snyder - - * m32r-stub.c (handle_exception): Make sure exception is "trap" - before treating it as a single-step event. - -2002-10-03 Adam Fedor - - * objc-lang.c: ARI fixes. Change string.h to gdb_string.h. - (objc_demangle): Remove assignment in if statements, Replace - free with xfree. - (add_msglist): Likewise. - (end_msglist): Likewise. - (complare_selectors): Likewise. - (selectors_info): Likewise. - (compare_classes): Likewise. - (classes_info): Likewise. - (print_object_command): Likewise. - (find_objc_msgcall_submethod): Replace PTR with void *. - * objc-lang.h: Remove check for __STDC__. - -2002-10-03 Jeff Johnston - - * ui-out.h (ui_out_field_fmt_int): New prototype. - * ui-out.c (ui_out_field_fmt_int): New function allowing specification - of field width and alignment. - * stack.c (print_frame_info_base): When printing frame level, use - ui_out_field_fmt_int with a width of 2 and left alignment. Fix for - PR gdb/192 - -2002-10-03 Jeff Johnston - - * MAINTAINERS: Add self to Write After Approval list. - -2002-10-02 Elena Zannoni - - * infcmd.c (interrupt_target_command_wrapper): Delete. - (interrupt_target_command): Make non static. - (nofp_registers_info): Make static. - * stack.c (return_command_wrapper): Delete. - (return_command): Make non static. - -2002-10-02 Elena Zannoni - - * event-top.c (gdb_setup_readline): New function. Code moved from - _initialize_event_loop(). - (_initialize_event_loop): Call gdb_setup_readline(). - -2002-10-02 Andrew Cagney - - * infrun.c (resume): Convert #ifdef CANNOT_STEP_BREAKPOINT into C. - * gdbarch.sh (CANNOT_STEP_BREAKPOINT): Add. - * gdbarch.h, gdbarch.c: Re-generate. - -2002-10-02 Daniel Jacobowitz - - Fix PR gdb/778 - * gdbtypes.c (fill_in_vptr_fieldno): Call check_typedef - before recursing. - * gnu-v3-abi.c (gnuv3_virtual_fn_field): Check return value - of fill_in_vptr_fieldno. - -2002-10-02 Elena Zannoni - - * inferior.h (registers_info, stepi_command, nexti_command, - continue_command, interrupt_target_command): Export from infcmd.c. - * frame.h (args_info, selected_frame_level_changed_hook, - return_command): Export from stack.c. - * v850ice.c (stepi_command, nexti_command, continue_command): use - prototypes from inferior.h. - * tracepoint.c (registers_info, args_info, locals_info): Use - prototypes from frame.h and inferior.h. - * Makefile.in (mi-main.o): Add dependency on frame.h. - -2002-10-02 Andrew Cagney - - * rs6000-tdep.c (rs6000_store_struct_return): Store struct_return - value in register 3 adjusted by ppc_gp0_regnum. - - * rs6000-tdep.c (skip_prologue): Bias alloca_reg by ppc_gp0_regnum. - -2002-10-02 Marko Mlinar - - * MAINTAINERS: Add myself to the Write After Approval list. - -2002-10-01 Alexandre Oliva - - * mips-tdep.c (mips_find_abi_section): .mdebug.abi64 is the name - of the section for the N64 ABI, fixed. - - * config/mips/tm-irix6.h: Include solib.h. - -2002-10-01 Elena Zannoni - - * dwarf2read.c (dwarf_stack_op_name): Recognize more dwarf3 and - GNU operators. - -2002-10-01 Andrew Cagney - - * NEWS: Mention that MI syntax, selected by "mi" changed to "mi2" - and that "mi0" syntax has been removed. - -2002-09-30 David Carlton - - * Makefile.in (ppc-sysv-tdep.o): Depend on gdb_string_h. - * ppc-sysv-tdep.c: #include "gdb_string.h". - * remote-sds.c (getmessage): Add semicolon after 'retry' label to - pacify GCC. - -2002-10-01 Andrew Cagney - - * rs6000-tdep.c (rs6000_gdbarch_init): For powerpc:7400, fix - "vrsave"'s register number. - -2002-09-30 Andrew Cagney - - * mips-tdep.c (mips_frame_saved_pc): When a generic dummy frame, - use frame_unwind_signed_register to obtain the PC. - (mips_frame_chain): Handle a generic dummy frame. - (mips_init_extra_frame_info): When a generic dummy frame, don't - re-compute the frame base. - (mips_pop_frame): Handle generic dummy frames. - (mips_gdbarch_init): When generic dummy frames, set - use_generic_dummy_frames, push_dummy_frame to - generic_push_dummy_frame, pc_in_call_dummy to - generic_pc_in_call_dummy, and save_dummy_frame_top_of_stack to - generic_save_dummy_frame_tos. - -2002-09-30 Andrew Cagney - - * blockframe.c (generic_find_dummy_frame): Rewrite. Only test - against TOP when TOP was explictly set. - (generic_push_dummy_frame): Set TOP to zero. - -2002-09-30 Elena Zannoni - - * event-loop.c (start_event_loop): Rename variable 'result' to - 'gdb_result', to avoid conflicts with upcoming intepreters changes. - 2002-09-30 Keith Seitz * gdb-events.sh (selected_thread_changed): New event. @@ -148,18 +10,17 @@ 2002-09-30 Fernando Nasser - * disasm.c: New file. - * disasm.h: New file. + * disasm.c: New file. + * disasm.h: New file. * mi/mi-cmd-disas.c (gdb_dis_asm_read_memory): Moved to disasm.c. (compare_lines): Ditto. (dump_insns): Ditto. - (do_mixed_source_and_assembly): Moved to disasm.c. Added uiout - argument. + (do_mixed_source_and_assembly): Moved to disasm.c. Added uiout argument. (do_assembly_only): Ditto. - (do_disassembly): Renamed to gdb_disassembly and moved to - disasm.c. Sdded uiout argument. - * Makefile.in: Add new files. Reorder SFILES list. Update - dependencies. Include libgdb.a later in the insight executable. + (do_disassembly): Renamed to gdb_disassembly and moved to disasm.c. + Sdded uiout argument. + * Makefile.in: Add new files. Reorder SFILES list. Update dependencies. + Include libgdb.a later in the insight executable. 2002-09-29 Andrew Cagney @@ -313,7 +174,7 @@ 2002-09-22 Fernando Nasser - * source.c (get_current_or_default_source_symtab_and_line): Initialize + * source.c (get_current__or_default_source_symtab_and_line): Initialize sal.pc and sal.end fields. (get_current_or_default_source_symtab_and_line): Ditto. * breakpoint.c (parse_breakpoint_sals): Use correct accessor function @@ -10402,9 +10263,9 @@ Wed Apr 24 14:22:21 2002 Andrew Cagney * breakpoint.c (break_at_finish_command): Export. (break_at_finish_at_depth_command): Export. (tbreak_at_finish_command): Export. - (_initialize_breakpoint): Delete "xbreak" and "txbreak" commands. + (_initialize_breakpoint): Delete "xbreak" and "tbreak" commands. * hppa-tdep.c (_initialize_hppa_tdep): Add "xbreak" and - "txbreak" commands, which are HPPA specific. + "tbreak" commands, which are HPPA specific. * printcmd.c (disassemble_command): Remove an ancient artifact of an old merge. diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS index a392f5a8435..cb667800664 100644 --- a/gdb/MAINTAINERS +++ b/gdb/MAINTAINERS @@ -391,7 +391,6 @@ Martin Hunt hunt@redhat.com Jim Ingham jingham@apple.com Daniel Jacobowitz dan@debian.org Andreas Jaeger aj@suse.de -Jeff Johnston jjohnstn@redhat.com Geoff Keating geoffk@redhat.com Mark Kettenis kettenis@gnu.org Jim Kingdon jkingdon@engr.sgi.com ++ @@ -404,7 +403,6 @@ Glen McCready gkm@redhat.com Greg McGary greg@mcgary.org Jason Merrill jason@redhat.com David S. Miller davem@redhat.com -Marko Mlinar markom@opencores.org Alan Modra amodra@bigpond.net.au Jason Molenda jmolenda@apple.com Pierre Muller muller@sources.redhat.com diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 95330c0950b..66352277b6c 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1976,7 +1976,7 @@ ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(frame_h) $(inferior_h) \ $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \ $(objfiles_h) $(regcache_h) $(value_h) $(solib_svr4_h) $(ppc_tdep_h) ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \ - $(regcache_h) $(value_h) $(gdb_string_h) $(ppc_tdep_h) + $(regcache_h) $(value_h) $(ppc_tdep_h) ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ $(serial_h) $(regcache_h) ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \ @@ -2493,7 +2493,7 @@ mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(target_h) $(inferior_h) \ $(gdb_string_h) $(top_h) $(gdbthread_h) $(mi_cmds_h) $(mi_parse_h) \ $(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) \ $(event_loop_h) $(event_top_h) $(gdbcore_h) $(value_h) $(regcache_h) \ - $(gdb_h) $(frame_h) + $(gdb_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(ui_out_h) $(mi_out_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c diff --git a/gdb/NEWS b/gdb/NEWS index 4ce063e0794..8dfa54ce5da 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -3,15 +3,6 @@ *** Changes since GDB 5.3: -* Default MI syntax changed to "mi2". - -The default MI (machine interface) syntax, enabled by the command line -option "-i=mi", has been changed to "mi2". The previous MI syntax, -"mi1", can be enabled by sepcifying the option "-i=mi1". - -Support for the original "mi0" syntax (included in GDB 5.0) has been -removed. - * REMOVED configurations and files V850EA ISA diff --git a/gdb/blockframe.c b/gdb/blockframe.c index eba45a377d9..674285d7074 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -1151,8 +1151,8 @@ static struct dummy_frame *dummy_frame_stack = NULL; /* Function: find_dummy_frame(pc, fp, sp) - Search the stack of dummy frames for one matching the given PC and - FP/SP. Unlike PC_IN_CALL_DUMMY, this function doesn't need to + Search the stack of dummy frames for one matching the given PC, FP + and SP. Unlike PC_IN_CALL_DUMMY, this function doesn't need to adjust for DECR_PC_AFTER_BREAK. This is because it is only legal to call this function after the PC has been adjusted. */ @@ -1163,37 +1163,12 @@ generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp) for (dummyframe = dummy_frame_stack; dummyframe != NULL; dummyframe = dummyframe->next) - { - /* Does the PC fall within the dummy frame's breakpoint - instruction. If not, discard this one. */ - if (!(pc >= dummyframe->call_lo && pc < dummyframe->call_hi)) - continue; - /* Does the FP match? */ - if (dummyframe->top != 0) - { - /* If the target architecture explicitly saved the - top-of-stack before the inferior function call, assume - that that same architecture will always pass in an FP - (frame base) value that eactly matches that saved TOS. - Don't check the saved SP and SP as they can lead to false - hits. */ - if (fp != dummyframe->top) - continue; - } - else - { - /* An older target that hasn't explicitly or implicitly - saved the dummy frame's top-of-stack. Try matching the - FP against the saved SP and FP. NOTE: If you're trying - to fix a problem with GDB not correctly finding a dummy - frame, check the comments that go with FRAME_ALIGN() and - SAVE_DUMMY_FRAME_TOS(). */ - if (fp != dummyframe->fp && fp != dummyframe->sp) - continue; - } - /* The FP matches this dummy frame. */ + if ((pc >= dummyframe->call_lo && pc < dummyframe->call_hi) + && (fp == dummyframe->fp + || fp == dummyframe->sp + || fp == dummyframe->top)) + /* The frame in question lies between the saved fp and sp, inclusive */ return dummyframe->regcache; - } return 0; } @@ -1290,7 +1265,7 @@ generic_push_dummy_frame (void) dummy_frame->pc = read_pc (); dummy_frame->sp = read_sp (); - dummy_frame->top = 0; + dummy_frame->top = dummy_frame->sp; dummy_frame->fp = fp; regcache_cpy (dummy_frame->regcache, current_regcache); dummy_frame->next = dummy_frame_stack; diff --git a/gdb/config/mips/tm-irix6.h b/gdb/config/mips/tm-irix6.h index 58b97e178b2..6a91ebc6239 100644 --- a/gdb/config/mips/tm-irix6.h +++ b/gdb/config/mips/tm-irix6.h @@ -20,7 +20,6 @@ Boston, MA 02111-1307, USA. */ #include "mips/tm-bigmips64.h" -#include "solib.h" /* SGI's assembler doesn't grok dollar signs in identifiers. So we use dots instead. This item must be coordinated with G++. */ diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 749f1811fa7..e21d24a2cf8 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,19 +1,3 @@ -2002-10-03 Jeff Johnston - - * gdbint.texinfo (Item Output Functions): Add new ui_out_field_fmt_int - interface definition. - -2002-10-03 Marko Mlinar - - * gdb.texinfo (Target Commands): Add or1k target specific - commands. - * gdb.texinfo (Contributors): Add myself to the contributors list. - -2002-10-01 Andrew Cagney - - * gdb.texinfo (Mode Options): Update --interpreter option. "mi2" - and "mi1" instead of "mi1" and "mi0". - 2002-09-29 Hans-Peter Nilsson * gdb.texinfo (Packets): Fix typos "alligned". diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 9269c5dcc40..56032f3cb2f 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -394,7 +394,6 @@ Michael Tiemann contributed SPARC support. Tim Tucker contributed support for the Gould NP1 and Gould Powernode. Pace Willison contributed Intel 386 support. Jay Vosburgh contributed Symmetry support. -Marko Mlinar contributed OpenRISC 1000 support. Andreas Schwab contributed M68K @sc{gnu}/Linux support. @@ -1128,12 +1127,10 @@ Use the interpreter @var{interp} for interface with the controlling program or device. This option is meant to be set by programs which communicate with @value{GDBN} using it as a back end. -@samp{--interpreter=mi} (or @samp{--interpreter=mi2}) causes -@value{GDBN} to use the current @dfn{@sc{gdb/mi} interface} -(@pxref{GDB/MI, , The @sc{gdb/mi} Interface}). The previous @sc{gdb/mi} -interface, included in @value{GDBN} version 5.3, can be selected with -@samp{--interpreter=mi1}. Earlier @sc{gdb/mi} interfaces -are not supported. +@samp{--interpreter=mi} (or @samp{--interpreter=mi1}) causes +@value{GDBN} to use the @dfn{gdb/mi interface} (@pxref{GDB/MI, , The +@sc{gdb/mi} Interface}). The older @sc{gdb/mi} interface, included in +@value{GDBN} version 5.0 can be selected with @samp{--interpreter=mi0}. @item -write @cindex @code{--write} @@ -11651,7 +11648,6 @@ configurations. * M68K:: Motorola M68K @c OBSOLETE * M88K:: Motorola M88K * MIPS Embedded:: MIPS Embedded -* OpenRISC 1000:: OpenRisc 1000 * PA:: HP PA Embedded * PowerPC: PowerPC * SH:: Hitachi SH @@ -12240,130 +12236,6 @@ forever because it has no way of knowing how long the program is going to run before stopping. @end table -@node OpenRISC 1000 -@subsection OpenRISC 1000 -@cindex OpenRISC 1000 - -@cindex or1k boards -See OR1k Architecture document (@uref{www.opencores.org}) for more information -about platform and commands. - -@table @code - -@kindex target jtag -@item target jtag jtag://@var{host}:@var{port} - -Connects to remote JTAG server. -JTAG remote server can be either an or1ksim or JTAG server, -connected via parallel port to the board. - -Example: @code{target jtag jtag://localhost:9999} - -@kindex or1ksim -@item or1ksim @var{command} -If connected to @code{or1ksim} OpenRISC 1000 Architectural -Simulator, proprietary commands can be executed. - -@kindex info or1k spr -@item info or1k spr -Displays spr groups. - -@item info or1k spr @var{group} -@itemx info or1k spr @var{groupno} -Displays register names in selected group. - -@item info or1k spr @var{group} @var{register} -@itemx info or1k spr @var{register} -@itemx info or1k spr @var{groupno} @var{registerno} -@itemx info or1k spr @var{registerno} -Shows information about specified spr register. - -@kindex spr -@item spr @var{group} @var{register} @var{value} -@itemx spr @var{register @var{value}} -@itemx spr @var{groupno} @var{registerno @var{value}} -@itemx spr @var{registerno @var{value}} -Writes @var{value} to specified spr register. -@end table - -Some implementations of OpenRISC 1000 Architecture also have hardware trace. -It is very similar to @value{GDBN} trace, except it does not interfere with normal -program execution and is thus much faster. Hardware breakpoints/watchpoint -triggers can be set using: -@table @code -@item $LEA/$LDATA -Load effective address/data -@item $SEA/$SDATA -Store effective address/data -@item $AEA/$ADATA -Access effective address ($SEA or $LEA) or data ($SDATA/$LDATA) -@item $FETCH -Fetch data -@end table - -When triggered, it can capture low level data, like: @code{PC}, @code{LSEA}, -@code{LDATA}, @code{SDATA}, @code{READSPR}, @code{WRITESPR}, @code{INSTR}. - -@code{htrace} commands: -@cindex OpenRISC 1000 htrace -@table @code -@kindex hwatch -@item hwatch @var{conditional} -Set hardware watchpoint on combination of Load/Store Effecive Address(es) -or Data. For example: - -@code{hwatch ($LEA == my_var) && ($LDATA < 50) || ($SEA == my_var) && ($SDATA >= 50)} - -@code{hwatch ($LEA == my_var) && ($LDATA < 50) || ($SEA == my_var) && ($SDATA >= 50)} - -@kindex htrace info -@item htrace info -Display information about current HW trace configuration. - -@kindex htrace trigger -@item htrace trigger @var{conditional} -Set starting criteria for HW trace. - -@kindex htrace qualifier -@item htrace qualifier @var{conditional} -Set acquisition qualifier for HW trace. - -@kindex htrace stop -@item htrace stop @var{conditional} -Set HW trace stopping criteria. - -@kindex htrace record -@item htrace record @var{[data]*} -Selects the data to be recorded, when qualifier is met and HW trace was -triggered. - -@kindex htrace enable -@item htrace enable -@kindex htrace disable -@itemx htrace disable -Enables/disables the HW trace. - -@kindex htrace rewind -@item htrace rewind @var{[filename]} -Clears currently recorded trace data. - -If filename is specified, new trace file is made and any newly collected data -will be written there. - -@kindex htrace print -@item htrace print @var{[start [len]]} -Prints trace buffer, using current record configuration. - -@kindex htrace mode continuous -@item htrace mode continuous -Set continuous trace mode. - -@kindex htrace mode suspend -@item htrace mode suspend -Set suspend trace mode. - -@end table - @node PowerPC @subsection PowerPC diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo index 01587ecd578..1c3743bd08c 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -1011,13 +1011,6 @@ This function outputs a value of an @code{int} variable. It uses the the name of the field. @end deftypefun -@deftypefun void ui_out_field_fmt_int (struct ui_out *@var{uiout}, int @var{width}, enum ui_align @var{alignment}, const char *@var{fldname}, int @var{value}) -This function outputs a value of an @code{int} variable. It differs from -@code{ui_out_field_int} in that the caller specifies the desired @var{width} and @var{alignment} of the output. -@var{fldname} specifies -the name of the field. -@end deftypefun - @deftypefun void ui_out_field_core_addr (struct ui_out *@var{uiout}, const char *@var{fldname}, CORE_ADDR @var{address}) This function outputs an address. @end deftypefun diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index b62b0282b3f..4ef683c13dc 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -5961,18 +5961,6 @@ dwarf_stack_op_name (register unsigned op) return "DW_OP_xderef_size"; case DW_OP_nop: return "DW_OP_nop"; - /* DWARF 3 extensions. */ - case DW_OP_push_object_address: - return "DW_OP_push_object_address"; - case DW_OP_call2: - return "DW_OP_call2"; - case DW_OP_call4: - return "DW_OP_call4"; - case DW_OP_call_ref: - return "DW_OP_call_ref"; - /* GNU extensions. */ - case DW_OP_GNU_push_tls_address: - return "DW_OP_GNU_push_tls_address"; default: return "OP_"; } diff --git a/gdb/event-loop.c b/gdb/event-loop.c index 0fa37c11f96..03eb41c6b16 100644 --- a/gdb/event-loop.c +++ b/gdb/event-loop.c @@ -392,12 +392,10 @@ start_event_loop (void) longer any event sources registered. */ while (1) { - int gdb_result; - - gdb_result = catch_errors (gdb_do_one_event, 0, "", RETURN_MASK_ALL); - if (gdb_result < 0) + int result = catch_errors (gdb_do_one_event, 0, "", RETURN_MASK_ALL); + if (result < 0) break; - if (gdb_result == 0) + if (result == 0) { /* FIXME: this should really be a call to a hook that is interface specific, because interfaces can display the diff --git a/gdb/event-top.c b/gdb/event-top.c index 9d871d65906..86c658d030e 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -1117,12 +1117,8 @@ set_async_prompt (char *args, int from_tty, struct cmd_list_element *c) interface, i.e. via a callback function (rl_callback_read_char), and hook up instream to the event loop. */ void -gdb_setup_readline (void) +_initialize_event_loop (void) { - /* This function is a noop for the sync case. The assumption is that - the sync setup is ALL done in gdb_init, and we would only mess it up - here. The sync stuff should really go away over time. */ - if (event_loop_p) { /* If the input stream is connected to a terminal, turn on @@ -1157,6 +1153,9 @@ gdb_setup_readline (void) register it with the event loop. */ input_fd = fileno (instream); + /* Tell gdb to use the cli_command_loop as the main loop. */ + command_loop_hook = cli_command_loop; + /* Now we need to create the event sources for the input file descriptor. */ /* At this point in time, this is the only event source that we @@ -1167,15 +1166,3 @@ gdb_setup_readline (void) add_file_handler (input_fd, stdin_event_handler, 0); } } - -void -_initialize_event_loop (void) -{ - gdb_setup_readline (); - - if (event_loop_p && command_loop_hook == NULL) - { - /* Tell gdb to use the cli_command_loop as the main loop. */ - command_loop_hook = cli_command_loop; - } -} diff --git a/gdb/frame.h b/gdb/frame.h index 849566bd8b6..79bb3d95a6f 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -373,13 +373,4 @@ extern int frame_register_read (struct frame_info *frame, int regnum, extern int frame_map_name_to_regnum (const char *name, int strlen); extern const char *frame_map_regnum_to_name (int regnum); -/* From stack.c. */ -extern void args_info (char *, int); - -extern void locals_info (char *, int); - -extern void (*selected_frame_level_changed_hook) (int); - -extern void return_command (char *, int); - #endif /* !defined (FRAME_H) */ diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index c0c4f9f0f0d..bc27aaeef6a 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -269,7 +269,6 @@ struct gdbarch gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special; gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special; const char * name_of_malloc; - int cannot_step_breakpoint; }; @@ -428,7 +427,6 @@ struct gdbarch startup_gdbarch = 0, 0, "malloc", - 0, /* startup_gdbarch() */ }; @@ -806,7 +804,6 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */ /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */ /* Skip verify of name_of_malloc, invalid_p == 0 */ - /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ buf = ui_file_xstrdup (log, &dummy); make_cleanup (xfree, buf); if (strlen (buf) > 0) @@ -996,14 +993,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->cannot_fetch_register /*CANNOT_FETCH_REGISTER ()*/); #endif -#ifdef CANNOT_STEP_BREAKPOINT - fprintf_unfiltered (file, - "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n", - XSTRING (CANNOT_STEP_BREAKPOINT)); - fprintf_unfiltered (file, - "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n", - CANNOT_STEP_BREAKPOINT); -#endif #ifdef CANNOT_STORE_REGISTER fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -5035,23 +5024,6 @@ set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, gdbarch->name_of_malloc = name_of_malloc; } -int -gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ - if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n"); - return gdbarch->cannot_step_breakpoint; -} - -void -set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, - int cannot_step_breakpoint) -{ - gdbarch->cannot_step_breakpoint = cannot_step_breakpoint; -} - /* Keep a registry of per-architecture data-pointers required by GDB modules. */ diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index b14d3c17692..2f26cba9a13 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -2579,22 +2579,6 @@ extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * na #endif #endif -/* Default (value) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (CANNOT_STEP_BREAKPOINT) -#define CANNOT_STEP_BREAKPOINT (0) -#endif - -extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch); -extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STEP_BREAKPOINT) -#error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT" -#endif -#if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_STEP_BREAKPOINT) -#define CANNOT_STEP_BREAKPOINT (gdbarch_cannot_step_breakpoint (current_gdbarch)) -#endif -#endif - extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 79c7fe512ad..0ee74df6f44 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -662,7 +662,6 @@ F:2:DWARF2_BUILD_FRAME_INFO:void:dwarf2_build_frame_info:struct objfile *objfile f:2:ELF_MAKE_MSYMBOL_SPECIAL:void:elf_make_msymbol_special:asymbol *sym, struct minimal_symbol *msym:sym, msym:::default_elf_make_msymbol_special::0 f:2:COFF_MAKE_MSYMBOL_SPECIAL:void:coff_make_msymbol_special:int val, struct minimal_symbol *msym:val, msym:::default_coff_make_msymbol_special::0 v::NAME_OF_MALLOC:const char *:name_of_malloc::::"malloc":"malloc"::0 -v::CANNOT_STEP_BREAKPOINT:int:cannot_step_breakpoint::::0:0::0 EOF } diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 3ef1828cd40..40223943b7c 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -1276,12 +1276,13 @@ fill_in_vptr_fieldno (struct type *type) virtual (and hence we cannot share the table pointer). */ for (i = 0; i < TYPE_N_BASECLASSES (type); i++) { - struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i)); - fill_in_vptr_fieldno (baseclass); - if (TYPE_VPTR_FIELDNO (baseclass) >= 0) + fill_in_vptr_fieldno (TYPE_BASECLASS (type, i)); + if (TYPE_VPTR_FIELDNO (TYPE_BASECLASS (type, i)) >= 0) { - TYPE_VPTR_FIELDNO (type) = TYPE_VPTR_FIELDNO (baseclass); - TYPE_VPTR_BASETYPE (type) = TYPE_VPTR_BASETYPE (baseclass); + TYPE_VPTR_FIELDNO (type) + = TYPE_VPTR_FIELDNO (TYPE_BASECLASS (type, i)); + TYPE_VPTR_BASETYPE (type) + = TYPE_VPTR_BASETYPE (TYPE_BASECLASS (type, i)); break; } } diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index 2b4e01a78a4..fbab8af0a18 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -324,9 +324,6 @@ gnuv3_virtual_fn_field (struct value **value_p, type now. */ if (TYPE_VPTR_FIELDNO (vfn_base) < 0) fill_in_vptr_fieldno (vfn_base); - if (TYPE_VPTR_FIELDNO (vfn_base) < 0) - error ("Could not find virtual table pointer for class \"%s\".", - TYPE_TAG_NAME (vfn_base) ? TYPE_TAG_NAME (vfn_base) : ""); /* Now that we know which base class is defining our virtual function, cast our value to that baseclass. This takes care of diff --git a/gdb/infcmd.c b/gdb/infcmd.c index a36258152c7..a1d030bbce5 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -42,23 +42,17 @@ #include "parser-defs.h" #include "regcache.h" -/* Functions exported for general use, in inferior.h: */ +/* Functions exported for general use: */ + +void nofp_registers_info (char *, int); void all_registers_info (char *, int); void registers_info (char *, int); -void nexti_command (char *, int); - -void stepi_command (char *, int); - -void continue_command (char *, int); - -void interrupt_target_command (char *args, int from_tty); - /* Local functions: */ -static void nofp_registers_info (char *, int); +void continue_command (char *, int); static void print_return_value (int struct_return, struct type *value_type); @@ -78,6 +72,8 @@ static void float_info (char *, int); static void detach_command (char *, int); +static void interrupt_target_command (char *args, int from_tty); + static void unset_environment_command (char *, int); static void set_environment_command (char *, int); @@ -96,6 +92,10 @@ static void step_1 (int, int, char *); static void step_once (int skip_subroutines, int single_inst, int count); static void step_1_continuation (struct continuation_arg *arg); +void nexti_command (char *, int); + +void stepi_command (char *, int); + static void next_command (char *, int); static void step_command (char *, int); @@ -1729,7 +1729,7 @@ all_registers_info (char *addr_exp, int from_tty) registers_info (addr_exp, 1); } -static void +void nofp_registers_info (char *addr_exp, int from_tty) { registers_info (addr_exp, 0); @@ -1891,7 +1891,14 @@ detach_command (char *args, int from_tty) /* Stop the execution of the target while running in async mode, in the backgound. */ + void +interrupt_target_command_wrapper (char *args, int from_tty) +{ + interrupt_target_command (args, from_tty); +} + +static void interrupt_target_command (char *args, int from_tty) { if (event_loop_p && target_can_async_p ()) diff --git a/gdb/inferior.h b/gdb/inferior.h index 2cccda1103b..8035ccd9825 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -315,16 +315,6 @@ extern char *set_inferior_args (char *); extern void set_inferior_args_vector (int, char **); -extern void registers_info (char *, int); - -extern void nexti_command (char *, int); - -extern void stepi_command (char *, int); - -extern void continue_command (char *, int); - -extern void interrupt_target_command (char *args, int from_tty); - /* Last signal that the inferior received (why it stopped). */ extern enum target_signal stop_signal; diff --git a/gdb/infrun.c b/gdb/infrun.c index 89a1d23a458..0f0c96b62ec 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -870,14 +870,13 @@ resume (int step, enum target_signal sig) resume_ptid = inferior_ptid; } - if (CANNOT_STEP_BREAKPOINT) - { - /* Most targets can step a breakpoint instruction, thus - executing it normally. But if this one cannot, just - continue and we will hit it anyway. */ - if (step && breakpoints_inserted && breakpoint_here_p (read_pc ())) - step = 0; - } +#ifdef CANNOT_STEP_BREAKPOINT + /* Most targets can step a breakpoint instruction, thus executing it + normally. But if this one cannot, just continue and we will hit + it anyway. */ + if (step && breakpoints_inserted && breakpoint_here_p (read_pc ())) + step = 0; +#endif target_resume (resume_ptid, step, sig); } diff --git a/gdb/m32r-stub.c b/gdb/m32r-stub.c index 2e69b4403ea..a691a657a23 100644 --- a/gdb/m32r-stub.c +++ b/gdb/m32r-stub.c @@ -210,16 +210,8 @@ handle_exception(int exceptionVector) unsigned char buf[16]; int binary; - /* Do not call finish_from_step() if this is not a trap #1 - * (breakpoint trap). Without this check, the finish_from_step() - * might interpret a system call trap as a single step trap. This - * can happen if: the stub receives 's' and exits, but an interrupt - * was pending; the interrupt is now handled and causes the stub to - * be reentered because some function makes a system call. - */ - if (exceptionVector == 1) /* Trap exception? */ - if (!finish_from_step()) /* Go see if stepping state needs update. */ - return; /* "false step": let the target continue */ + if (!finish_from_step()) + return; /* "false step": let the target continue */ gdb_m32r_vector = exceptionVector; diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog index 0a0954f534e..dca5af32e5e 100644 --- a/gdb/mi/ChangeLog +++ b/gdb/mi/ChangeLog @@ -1,36 +1,3 @@ -2002-10-03 Jeff Johnston - - * gdbmi.texinfo: Fix examples that show frames to remove - extraneous blank in level field. Part of fix for PR gdb/192. - -2002-10-03 Jeff Johnston - - * mi-cmd-var.c (mi_cmd_var_update): Fix for PR gdb/672. For m2, - output list begin and end for "changelist" rather than tuple begin/end. - (varobj_update_one): For m2, add tuple begin and end for varobj - update output. - -2002-10-02 Elena Zannoni - - * mi-main.c (mi_cmd_exec_return): Don't use - return_command_wrapper, use return_command instead. - (mi_cmd_exec_interrupt): Don't use - interrupt_target_command_wrapper, use interrupt_target_command - instead. - (return_command_wrapper, interrupt_target_command_wrapper): - Delete. - Include frame.h. - -2002-10-01 Andrew Cagney - - * mi-main.c (mi2_command_loop): New function. - (mi0_command_loop): Delete function. - (_initialize_mi_main): Recognize, and default to, "mi2". Do not - recognize "mi0". - * mi-out.c (mi_table_begin): Remove mi0 code. - (mi_table_body, mi_table_end): Ditto. - (mi_table_header, mi_open, mi_close): Ditto. - 2002-09-29 Andrew Cagney * mi-out.c (mi_version): New function. diff --git a/gdb/mi/gdbmi.texinfo b/gdb/mi/gdbmi.texinfo index 164b1e823b7..6145dcf81e6 100644 --- a/gdb/mi/gdbmi.texinfo +++ b/gdb/mi/gdbmi.texinfo @@ -2034,7 +2034,7 @@ file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@} 205^done (@value{GDBP}) 111-exec-return -111^done,frame=@{level="0",func="callee3", +111^done,frame=@{level="0 ",func="callee3", args=[@{name="strarg", value="0x11940 \"A string argument.\""@}], file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@} @@ -2641,15 +2641,15 @@ functionality of @samp{-stack-list-arguments}. -stack-list-frames ^done, stack=[ -frame=@{level="0",addr="0x00010734",func="callee4", +frame=@{level="0 ",addr="0x00010734",func="callee4", file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@}, -frame=@{level="1",addr="0x0001076c",func="callee3", +frame=@{level="1 ",addr="0x0001076c",func="callee3", file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="17"@}, -frame=@{level="2",addr="0x0001078c",func="callee2", +frame=@{level="2 ",addr="0x0001078c",func="callee2", file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="22"@}, -frame=@{level="3",addr="0x000107b4",func="callee1", +frame=@{level="3 ",addr="0x000107b4",func="callee1", file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="27"@}, -frame=@{level="4",addr="0x000107e0",func="main", +frame=@{level="4 ",addr="0x000107e0",func="main", file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="32"@}] (@value{GDBP}) -stack-list-arguments 0 @@ -2731,25 +2731,25 @@ Full stack backtrace: (@value{GDBP}) -stack-list-frames ^done,stack= -[frame=@{level="0",addr="0x0001076c",func="foo", +[frame=@{level="0 ",addr="0x0001076c",func="foo", file="recursive2.c",line="11"@}, -frame=@{level="1",addr="0x000107a4",func="foo", +frame=@{level="1 ",addr="0x000107a4",func="foo", file="recursive2.c",line="14"@}, -frame=@{level="2",addr="0x000107a4",func="foo", +frame=@{level="2 ",addr="0x000107a4",func="foo", file="recursive2.c",line="14"@}, -frame=@{level="3",addr="0x000107a4",func="foo", +frame=@{level="3 ",addr="0x000107a4",func="foo", file="recursive2.c",line="14"@}, -frame=@{level="4",addr="0x000107a4",func="foo", +frame=@{level="4 ",addr="0x000107a4",func="foo", file="recursive2.c",line="14"@}, -frame=@{level="5",addr="0x000107a4",func="foo", +frame=@{level="5 ",addr="0x000107a4",func="foo", file="recursive2.c",line="14"@}, -frame=@{level="6",addr="0x000107a4",func="foo", +frame=@{level="6 ",addr="0x000107a4",func="foo", file="recursive2.c",line="14"@}, -frame=@{level="7",addr="0x000107a4",func="foo", +frame=@{level="7 ",addr="0x000107a4",func="foo", file="recursive2.c",line="14"@}, -frame=@{level="8",addr="0x000107a4",func="foo", +frame=@{level="8 ",addr="0x000107a4",func="foo", file="recursive2.c",line="14"@}, -frame=@{level="9",addr="0x000107a4",func="foo", +frame=@{level="9 ",addr="0x000107a4",func="foo", file="recursive2.c",line="14"@}, frame=@{level="10",addr="0x000107a4",func="foo", file="recursive2.c",line="14"@}, @@ -2764,11 +2764,11 @@ Show frames between @var{low_frame} and @var{high_frame}: (@value{GDBP}) -stack-list-frames 3 5 ^done,stack= -[frame=@{level="3",addr="0x000107a4",func="foo", +[frame=@{level="3 ",addr="0x000107a4",func="foo", file="recursive2.c",line="14"@}, -frame=@{level="4",addr="0x000107a4",func="foo", +frame=@{level="4 ",addr="0x000107a4",func="foo", file="recursive2.c",line="14"@}, -frame=@{level="5",addr="0x000107a4",func="foo", +frame=@{level="5 ",addr="0x000107a4",func="foo", file="recursive2.c",line="14"@}] (@value{GDBP}) @end smallexample @@ -2779,7 +2779,7 @@ Show a single frame: (@value{GDBP}) -stack-list-frames 3 3 ^done,stack= -[frame=@{level="3",addr="0x000107a4",func="foo", +[frame=@{level="3 ",addr="0x000107a4",func="foo", file="recursive2.c",line="14"@}] (@value{GDBP}) @end smallexample @@ -3442,7 +3442,7 @@ number-of-threads="3" (@value{GDBP}) -thread-select 3 ^done,new-thread-id="3", -frame=@{level="0",func="vprintf", +frame=@{level="0 ",func="vprintf", args=[@{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""@}, @{name="arg",value="0x2"@}],file="vprintf.c",line="31"@} (@value{GDBP}) diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c index 114906609ef..cb5e939e9f1 100644 --- a/gdb/mi/mi-cmd-var.c +++ b/gdb/mi/mi-cmd-var.c @@ -405,7 +405,6 @@ mi_cmd_var_update (char *command, char **argv, int argc) struct varobj *var; struct varobj **rootlist; struct varobj **cr; - struct cleanup *cleanup; char *name; int nv; @@ -420,13 +419,10 @@ mi_cmd_var_update (char *command, char **argv, int argc) if ((*name == '*') && (*(name + 1) == '\0')) { nv = varobj_list (&rootlist); - if (mi_version (uiout) <= 1) - cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, "changelist"); - else - cleanup = make_cleanup_ui_out_list_begin_end (uiout, "changelist"); + ui_out_tuple_begin (uiout, "changelist"); if (nv <= 0) { - do_cleanups (cleanup); + ui_out_tuple_end (uiout); return MI_CMD_DONE; } cr = rootlist; @@ -436,7 +432,7 @@ mi_cmd_var_update (char *command, char **argv, int argc) cr++; } xfree (rootlist); - do_cleanups (cleanup); + ui_out_tuple_end (uiout); } else { @@ -445,12 +441,9 @@ mi_cmd_var_update (char *command, char **argv, int argc) if (var == NULL) error ("mi_cmd_var_update: Variable object not found"); - if (mi_version (uiout) <= 1) - cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, "changelist"); - else - cleanup = make_cleanup_ui_out_list_begin_end (uiout, "changelist"); + ui_out_tuple_begin (uiout, "changelist"); varobj_update_one (var); - do_cleanups (cleanup); + ui_out_tuple_end (uiout); } return MI_CMD_DONE; } @@ -464,7 +457,6 @@ varobj_update_one (struct varobj *var) { struct varobj **changelist; struct varobj **cc; - struct cleanup *cleanup = NULL; int nc; nc = varobj_update (&var, &changelist); @@ -477,25 +469,17 @@ varobj_update_one (struct varobj *var) return 1; else if (nc == -1) { - if (mi_version (uiout) > 1) - cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, NULL); ui_out_field_string (uiout, "name", varobj_get_objname(var)); ui_out_field_string (uiout, "in_scope", "false"); - if (mi_version (uiout) > 1) - do_cleanups (cleanup); return -1; } else if (nc == -2) { - if (mi_version (uiout) > 1) - cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, NULL); ui_out_field_string (uiout, "name", varobj_get_objname (var)); ui_out_field_string (uiout, "in_scope", "true"); ui_out_field_string (uiout, "new_type", varobj_get_type(var)); ui_out_field_int (uiout, "new_num_children", varobj_get_num_children(var)); - if (mi_version (uiout) > 1) - do_cleanups (cleanup); } else { @@ -503,13 +487,9 @@ varobj_update_one (struct varobj *var) cc = changelist; while (*cc != NULL) { - if (mi_version (uiout) > 1) - cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, NULL); ui_out_field_string (uiout, "name", varobj_get_objname (*cc)); ui_out_field_string (uiout, "in_scope", "true"); ui_out_field_string (uiout, "type_changed", "false"); - if (mi_version (uiout) > 1) - do_cleanups (cleanup); cc++; } xfree (changelist); diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 41775922def..69dcc3ea79f 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -39,8 +39,6 @@ #include "value.h" /* for write_register_bytes() */ #include "regcache.h" #include "gdb.h" -#include "frame.h" - #include #include @@ -101,6 +99,12 @@ static void mi_load_progress (const char *section_name, unsigned long total_sent, unsigned long grand_total); +/* FIXME: these should go in some .h file, but infcmd.c doesn't have a + corresponding .h file. These wrappers will be obsolete anyway, once + we pull the plug on the sanitization. */ +extern void interrupt_target_command_wrapper (char *, int); +extern void return_command_wrapper (char *, int); + /* Command implementations. FIXME: Is this libgdb? No. This is the MI layer that calls libgdb. Any operation used in the below should be formalized. */ @@ -175,11 +179,11 @@ mi_cmd_exec_return (char *args, int from_tty) if (*args) /* Call return_command with from_tty argument equal to 0 so as to avoid being queried. */ - return_command (args, 0); + return_command_wrapper (args, 0); else /* Call return_command with from_tty argument equal to 0 so as to avoid being queried. */ - return_command (NULL, 0); + return_command_wrapper (NULL, 0); /* Because we have called return_command with from_tty = 0, we need to print the frame here. */ @@ -211,7 +215,7 @@ mi_cmd_exec_interrupt (char *args, int from_tty) "mi_cmd_exec_interrupt: Inferior not executing."); return MI_CMD_ERROR; } - interrupt_target_command (args, from_tty); + interrupt_target_command_wrapper (args, from_tty); if (last_async_command) fputs_unfiltered (last_async_command, raw_stdout); fputs_unfiltered ("^done", raw_stdout); @@ -1510,15 +1514,15 @@ mi_command_loop (int mi_version) } static void -mi1_command_loop (void) +mi0_command_loop (void) { - mi_command_loop (1); + mi_command_loop (0); } static void -mi2_command_loop (void) +mi1_command_loop (void) { - mi_command_loop (2); + mi_command_loop (1); } static void @@ -1543,12 +1547,11 @@ _initialize_mi_main (void) return; /* If we're _the_ interpreter, take control. */ - if (strcmp (interpreter_p, "mi") == 0) - command_loop_hook = mi2_command_loop; - else if (strcmp (interpreter_p, "mi1") == 0) + if (strcmp (interpreter_p, "mi0") == 0) + command_loop_hook = mi0_command_loop; + else if (strcmp (interpreter_p, "mi") == 0 + || strcmp (interpreter_p, "mi1") == 0) command_loop_hook = mi1_command_loop; - else if (strcmp (interpreter_p, "mi2") == 0) - command_loop_hook = mi2_command_loop; else return; diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c index f7156ca9c59..f7ed7ecfbdc 100644 --- a/gdb/mi/mi-out.c +++ b/gdb/mi/mi-out.c @@ -109,6 +109,14 @@ mi_table_begin (struct ui_out *uiout, { struct ui_out_data *data = ui_out_data (uiout); mi_open (uiout, tblid, ui_out_type_tuple); + if (data->mi_version == 0) + { + if (nr_rows == 0) + data->suppress_output = 1; + else + mi_open (uiout, "hdr", ui_out_type_list); + return; + } mi_field_int (uiout, -1/*fldno*/, -1/*width*/, -1/*alin*/, "nr_rows", nr_rows); mi_field_int (uiout, -1/*fldno*/, -1/*width*/, -1/*alin*/, @@ -126,6 +134,8 @@ mi_table_body (struct ui_out *uiout) return; /* close the table header line if there were any headers */ mi_close (uiout, ui_out_type_list); + if (data->mi_version == 0) + return; mi_open (uiout, "body", ui_out_type_list); } @@ -136,6 +146,11 @@ mi_table_end (struct ui_out *uiout) { struct ui_out_data *data = ui_out_data (uiout); data->suppress_output = 0; + if (data->mi_version == 0) + { + mi_close (uiout, ui_out_type_tuple); + return; + } mi_close (uiout, ui_out_type_list); /* body */ mi_close (uiout, ui_out_type_tuple); } @@ -150,6 +165,11 @@ mi_table_header (struct ui_out *uiout, int width, enum ui_align alignment, struct ui_out_data *data = ui_out_data (uiout); if (data->suppress_output) return; + if (data->mi_version == 0) + { + mi_field_string (uiout, 0, width, alignment, 0, colhdr); + return; + } mi_open (uiout, NULL, ui_out_type_tuple); mi_field_int (uiout, 0, 0, 0, "width", width); mi_field_int (uiout, 0, 0, 0, "alignment", alignment); @@ -341,7 +361,10 @@ mi_open (struct ui_out *uiout, fputc_unfiltered ('{', data->buffer); break; case ui_out_type_list: - fputc_unfiltered ('[', data->buffer); + if (data->mi_version == 0) + fputc_unfiltered ('{', data->buffer); + else + fputc_unfiltered ('[', data->buffer); break; default: internal_error (__FILE__, __LINE__, "bad switch"); @@ -359,7 +382,10 @@ mi_close (struct ui_out *uiout, fputc_unfiltered ('}', data->buffer); break; case ui_out_type_list: - fputc_unfiltered (']', data->buffer); + if (data->mi_version == 0) + fputc_unfiltered ('}', data->buffer); + else + fputc_unfiltered (']', data->buffer); break; default: internal_error (__FILE__, __LINE__, "bad switch"); diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index fd61c5ba49d..95b288ce6da 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -1704,14 +1704,7 @@ mips_frame_saved_pc (struct frame_info *frame) int pcreg = frame->signal_handler_caller ? PC_REGNUM : (proc_desc ? PROC_PC_REG (proc_desc) : RA_REGNUM); - if (USE_GENERIC_DUMMY_FRAMES - && PC_IN_CALL_DUMMY (frame->pc, 0, 0)) - { - LONGEST tmp; - frame_unwind_signed_register (frame, PC_REGNUM, &tmp); - saved_pc = tmp; - } - else if (proc_desc && PROC_DESC_IS_DUMMY (proc_desc)) + if (proc_desc && PROC_DESC_IS_DUMMY (proc_desc)) saved_pc = read_memory_integer (frame->frame - MIPS_SAVED_REGSIZE, MIPS_SAVED_REGSIZE); else saved_pc = read_next_frame_reg (frame, pcreg); @@ -2428,15 +2421,6 @@ mips_frame_chain (struct frame_info *frame) if ((tmp = SKIP_TRAMPOLINE_CODE (saved_pc)) != 0) saved_pc = tmp; - if (USE_GENERIC_DUMMY_FRAMES - && PC_IN_CALL_DUMMY (saved_pc, 0, 0)) - { - /* A dummy frame, uses SP not FP. Get the old SP value. If all - is well, frame->frame the bottom of the current frame will - contain that value. */ - return frame->frame; - } - /* Look up the procedure descriptor for this PC. */ proc_desc = find_proc_desc (saved_pc, frame, 1); if (!proc_desc) @@ -2452,10 +2436,8 @@ mips_frame_chain (struct frame_info *frame) /* The previous frame from a sigtramp frame might be frameless and have frame size zero. */ && !frame->signal_handler_caller - /* For a generic dummy frame, let get_frame_pointer() unwind a - register value saved as part of the dummy frame call. */ - && !(USE_GENERIC_DUMMY_FRAMES - && PC_IN_CALL_DUMMY (frame->pc, 0, 0))) + /* Check if this is a call dummy frame. */ + && frame->pc != CALL_DUMMY_ADDRESS ()) return 0; else return get_frame_pointer (frame, proc_desc); @@ -2485,15 +2467,6 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci) if (fci->pc == PROC_LOW_ADDR (proc_desc) && !PROC_DESC_IS_DUMMY (proc_desc)) fci->frame = read_next_frame_reg (fci->next, SP_REGNUM); - else if (USE_GENERIC_DUMMY_FRAMES - && PC_IN_CALL_DUMMY (fci->pc, 0, 0)) - /* Do not ``fix'' fci->frame. It will have the value of the - generic dummy frame's top-of-stack (since the draft - fci->frame is obtained by returning the unwound stack - pointer) and that is what we want. That way the fci->frame - value will match the top-of-stack value that was saved as - part of the dummy frames data. */ - /* Do nothing. */; else fci->frame = get_frame_pointer (fci->next, proc_desc); @@ -3810,15 +3783,8 @@ mips_pop_frame (void) register int regnum; struct frame_info *frame = get_current_frame (); CORE_ADDR new_sp = FRAME_FP (frame); - mips_extra_func_info_t proc_desc = frame->extra_info->proc_desc; - if (USE_GENERIC_DUMMY_FRAMES - && PC_IN_CALL_DUMMY (frame->pc, 0, 0)) - { - generic_pop_dummy_frame (); - flush_cached_frames (); - return; - } + mips_extra_func_info_t proc_desc = frame->extra_info->proc_desc; write_register (PC_REGNUM, FRAME_SAVED_PC (frame)); if (frame->saved_regs == NULL) @@ -5592,7 +5558,7 @@ mips_find_abi_section (bfd *abfd, asection *sect, void *obj) *abip = MIPS_ABI_O32; else if (strcmp (name, ".mdebug.abiN32") == 0) *abip = MIPS_ABI_N32; - else if (strcmp (name, ".mdebug.abi64") == 0) + else if (strcmp (name, ".mdebug.abiN64") == 0) *abip = MIPS_ABI_N64; else if (strcmp (name, ".mdebug.abiO64") == 0) *abip = MIPS_ABI_O64; @@ -5990,38 +5956,22 @@ mips_gdbarch_init (struct gdbarch_info info, set_gdbarch_call_dummy_p (gdbarch, 1); set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0); -#if OLD_STYLE_MIPS_DUMMY_FRAMES set_gdbarch_use_generic_dummy_frames (gdbarch, 0); -#else - set_gdbarch_use_generic_dummy_frames (gdbarch, 1); -#endif set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT); set_gdbarch_call_dummy_address (gdbarch, mips_call_dummy_address); set_gdbarch_push_return_address (gdbarch, mips_push_return_address); -#if OLD_STYLE_MIPS_DUMMY_FRAMES set_gdbarch_push_dummy_frame (gdbarch, mips_push_dummy_frame); -#else - set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame); -#endif set_gdbarch_pop_frame (gdbarch, mips_pop_frame); set_gdbarch_call_dummy_start_offset (gdbarch, 0); set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); set_gdbarch_call_dummy_length (gdbarch, 0); set_gdbarch_fix_call_dummy (gdbarch, mips_fix_call_dummy); -#if OLD_STYLE_MIPS_DUMMY_FRAMES set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_at_entry_point); -#else - set_gdbarch_pc_in_call_dummy (gdbarch, generic_pc_in_call_dummy); -#endif set_gdbarch_call_dummy_words (gdbarch, mips_call_dummy_words); set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (mips_call_dummy_words)); set_gdbarch_push_return_address (gdbarch, mips_push_return_address); set_gdbarch_frame_align (gdbarch, mips_frame_align); -#if OLD_STYLE_MIPS_DUMMY_FRAMES -#else - set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); -#endif set_gdbarch_register_convertible (gdbarch, mips_register_convertible); set_gdbarch_register_convert_to_virtual (gdbarch, mips_register_convert_to_virtual); diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 0c749a2ebe5..dc839518b24 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -34,7 +34,7 @@ #include "value.h" #include "symfile.h" #include "objfiles.h" -#include "gdb_string.h" /* for strchr */ +#include "string.h" /* for strchr */ #include "target.h" /* for target_has_execution */ #include "gdbcore.h" #include "gdbcmd.h" @@ -266,10 +266,9 @@ objc_demangle (const char *mangled) while (*cp && *cp == '_') cp++; /* skip any initial underbars in class name */ - cp = strchr(cp, '_'); - if (!cp) /* find first non-initial underbar */ + if (!(cp = strchr(cp, '_'))) /* find first non-initial underbar */ { - xfree(demangled); /* not mangled name */ + free(demangled); /* not mangled name */ return NULL; } if (cp[1] == '_') { /* easy case: no category name */ @@ -278,10 +277,9 @@ objc_demangle (const char *mangled) } else { *cp++ = '('; /* less easy case: category name */ - cp = strchr(cp, '_'); - if (!cp) + if (!(cp = strchr(cp, '_'))) { - xfree(demangled); /* not mangled name */ + free(demangled); /* not mangled name */ return NULL; } *cp++ = ')'; @@ -741,7 +739,7 @@ add_msglist(struct stoken *str, int addcolon) s = (char *)xmalloc(len); strcpy(s, msglist_sel); strncat(s, p, plen); - xfree(msglist_sel); + free(msglist_sel); msglist_sel = s; if (addcolon) { s[len-2] = ':'; @@ -766,9 +764,9 @@ end_msglist(void) if (!selid) error("Can't find selector \"%s\"", p); write_exp_elt_longcst (selid); - xfree(p); + free(p); write_exp_elt_longcst (val); /* Number of args */ - xfree(sel); + free(sel); return val; } @@ -807,14 +805,12 @@ compare_selectors (void *a, void *b) { char *aname, *bname; - aname = SYMBOL_SOURCE_NAME (*(struct symbol **) a); - bname = SYMBOL_SOURCE_NAME (*(struct symbol **) b); - if (aname == NULL || bname == NULL) + if ((aname = SYMBOL_SOURCE_NAME (*(struct symbol **) a)) == NULL || + (bname = SYMBOL_SOURCE_NAME (*(struct symbol **) b)) == NULL) error ("internal: compare_selectors(1)"); - aname = strchr(aname, ' '); - bname = strchr(bname, ' '); - if (aname == NULL || bname == NULL) + if ((aname = strchr(aname, ' ')) == NULL || + (bname = strchr(bname, ' ')) == NULL) error ("internal: compare_selectors(2)"); return specialcmp (aname+1, bname+1); @@ -874,8 +870,7 @@ selectors_info (char *regexp, int from_tty) ALL_MSYMBOLS (objfile, msymbol) { QUIT; - name = SYMBOL_DEMANGLED_NAME (msymbol); - if (name == NULL) + if ((name = SYMBOL_DEMANGLED_NAME (msymbol)) == NULL) name = SYMBOL_NAME (msymbol); if (name && (name[0] == '-' || name[0] == '+') && @@ -907,8 +902,7 @@ selectors_info (char *regexp, int from_tty) ALL_MSYMBOLS (objfile, msymbol) { QUIT; - name = SYMBOL_DEMANGLED_NAME (msymbol); - if (name == NULL) + if ((name = SYMBOL_DEMANGLED_NAME (msymbol)) == NULL) name = SYMBOL_NAME (msymbol); if (name && (name[0] == '-' || name[0] == '+') && @@ -933,8 +927,7 @@ selectors_info (char *regexp, int from_tty) char *p = asel; QUIT; - name = SYMBOL_DEMANGLED_NAME (sym_arr[ix]); - if (name == NULL) + if ((name = SYMBOL_DEMANGLED_NAME (sym_arr[ix])) == NULL) name = SYMBOL_NAME (sym_arr[ix]); name = strchr (name, ' ') + 1; if (p[0] && specialcmp(name, p) == 0) @@ -965,9 +958,8 @@ compare_classes (void *a, void *b) { char *aname, *bname; - aname = SYMBOL_SOURCE_NAME (*(struct symbol **) a); - bname = SYMBOL_SOURCE_NAME (*(struct symbol **) b); - if (aname == NULL || bname == NULL) + if ((aname = SYMBOL_SOURCE_NAME (*(struct symbol **) a)) == NULL || + (bname = SYMBOL_SOURCE_NAME (*(struct symbol **) b)) == NULL) error ("internal: compare_classes(1)"); return specialcmp (aname+1, bname+1); @@ -1017,8 +1009,7 @@ classes_info (char *regexp, int from_tty) ALL_MSYMBOLS (objfile, msymbol) { QUIT; - name = SYMBOL_DEMANGLED_NAME (msymbol); - if (name == NULL) + if ((name = SYMBOL_DEMANGLED_NAME (msymbol)) == NULL) name = SYMBOL_NAME (msymbol); if (name && (name[0] == '-' || name[0] == '+') && @@ -1043,8 +1034,7 @@ classes_info (char *regexp, int from_tty) ALL_MSYMBOLS (objfile, msymbol) { QUIT; - name = SYMBOL_DEMANGLED_NAME (msymbol); - if (name == NULL) + if ((name = SYMBOL_DEMANGLED_NAME (msymbol)) == NULL) name = SYMBOL_NAME (msymbol); if (name && (name[0] == '-' || name[0] == '+') && @@ -1062,8 +1052,7 @@ classes_info (char *regexp, int from_tty) char *p = aclass; QUIT; - name = SYMBOL_DEMANGLED_NAME (sym_arr[ix]); - if (name == NULL) + if ((name = SYMBOL_DEMANGLED_NAME (sym_arr[ix])) == NULL) name = SYMBOL_NAME (sym_arr[ix]); name += 2; if (p[0] && specialcmp(name, p) == 0) @@ -1562,14 +1551,12 @@ print_object_command (char *args, int from_tty) do_cleanups (old_chain); } - function = find_function_in_inferior ("_NSPrintForDebugger"); - if (!function) + if (!(function = find_function_in_inferior ("_NSPrintForDebugger"))) error ("Unable to locate _NSPrintForDebugger in child process"); description = call_function_by_hand (function, 1, &object); - string_addr = value_as_long (description); - if (string_addr == 0) + if ((string_addr = value_as_long (description)) == 0) error ("object returns null description"); read_memory (string_addr + i++, &c, 1); @@ -1671,7 +1658,7 @@ struct objc_submethod_helper_data { }; int -find_objc_msgcall_submethod_helper (void * arg) +find_objc_msgcall_submethod_helper (PTR arg) { struct objc_submethod_helper_data *s = (struct objc_submethod_helper_data *) arg; @@ -1694,7 +1681,7 @@ find_objc_msgcall_submethod (CORE_ADDR (*f) (CORE_ADDR, CORE_ADDR *), s.new_pc = new_pc; if (catch_errors (find_objc_msgcall_submethod_helper, - (void *) &s, + (PTR) &s, "Unable to determine target of Objective-C method call (ignoring):\n", RETURN_MASK_ALL) == 0) return 1; diff --git a/gdb/objc-lang.h b/gdb/objc-lang.h index 9fd93e7a5fc..87e315b5c06 100644 --- a/gdb/objc-lang.h +++ b/gdb/objc-lang.h @@ -19,7 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifdef __STDC__ /* Forward decls for prototypes. */ struct value; +#endif extern int objc_parse (void); /* Defined in c-exp.y */ diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c index ecaed850cbf..0d33683a4c4 100644 --- a/gdb/ppc-sysv-tdep.c +++ b/gdb/ppc-sysv-tdep.c @@ -25,7 +25,6 @@ #include "inferior.h" #include "regcache.h" #include "value.h" -#include "gdb_string.h" #include "ppc-tdep.h" diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c index 053b97a7615..507ac5be208 100644 --- a/gdb/remote-sds.c +++ b/gdb/remote-sds.c @@ -978,7 +978,6 @@ getmessage (unsigned char *buf, int forever) /* Try the whole thing again. */ retry: /* need to do something here */ - ; } /* We have tried hard enough, and just can't receive the packet. Give up. */ diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 53b9dd333e0..e6a68ef202b 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -465,7 +465,6 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata) int prev_insn_was_prologue_insn = 1; int num_skip_non_prologue_insns = 0; const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (current_gdbarch); - struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); /* Attempt to find the end of the prologue when no limit is specified. Note that refine_prologue_limit() has been written so that it may @@ -695,7 +694,7 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata) { /* mr r31, r1 */ fdata->frameless = 0; framep = 1; - fdata->alloca_reg = (tdep->ppc_gp0_regnum + 31); + fdata->alloca_reg = 31; continue; /* Another way to set up the frame pointer. */ @@ -704,8 +703,7 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata) { /* addi rX, r1, 0x0 */ fdata->frameless = 0; framep = 1; - fdata->alloca_reg = (tdep->ppc_gp0_regnum - + ((op & ~0x38010000) >> 21)); + fdata->alloca_reg = (op & ~0x38010000) >> 21; continue; } /* AltiVec related instructions. */ @@ -1991,8 +1989,7 @@ rs6000_stab_reg_to_regnum (int num) static void rs6000_store_struct_return (CORE_ADDR addr, CORE_ADDR sp) { - struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); - write_register (tdep->ppc_gp0_regnum + 3, addr); + write_register (3, addr); } /* Write into appropriate registers a function return value @@ -2796,7 +2793,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) break; case bfd_mach_ppc_7400: tdep->ppc_vr0_regnum = 119; - tdep->ppc_vrsave_regnum = 152; + tdep->ppc_vrsave_regnum = 153; tdep->ppc_ev0_regnum = -1; tdep->ppc_ev31_regnum = -1; break; diff --git a/gdb/stack.c b/gdb/stack.c index f36e651a375..83fd26e476b 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -50,10 +50,10 @@ void (*selected_frame_level_changed_hook) (int); void _initialize_stack (void); -void return_command (char *, int); - /* Prototypes for local functions. */ +static void return_command (char *, int); + static void down_command (char *, int); static void down_silently_base (char *); @@ -358,10 +358,7 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args) /* Do this regardless of SOURCE because we don't have any source to list for this frame. */ if (level >= 0) - { - ui_out_text (uiout, "#"); - ui_out_field_fmt_int (uiout, 2, ui_left, "level", level); - } + printf_filtered ("#%-2d ", level); annotate_function_call (); printf_filtered ("\n"); annotate_frame_end (); @@ -374,10 +371,7 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args) /* Do this regardless of SOURCE because we don't have any source to list for this frame. */ if (level >= 0) - { - ui_out_text (uiout, "#"); - ui_out_field_fmt_int (uiout, 2, ui_left, "level", level); - } + printf_filtered ("#%-2d ", level); annotate_signal_handler_caller (); printf_filtered ("\n"); annotate_frame_end (); @@ -554,7 +548,8 @@ print_frame (struct frame_info *fi, if (level >= 0) { ui_out_text (uiout, "#"); - ui_out_field_fmt_int (uiout, 2, ui_left, "level", level); + ui_out_field_fmt (uiout, "level", "%-2d", level); + ui_out_spaces (uiout, 1); } if (addressprint) if (fi->pc != sal.pc || !sal.symtab || source == LOC_AND_ADDRESS) @@ -1760,6 +1755,12 @@ down_command (char *count_exp, int from_tty) } void +return_command_wrapper (char *retval_exp, int from_tty) +{ + return_command (retval_exp, from_tty); +} + +static void return_command (char *retval_exp, int from_tty) { struct symbol *thisfun; diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5ca030910ee..6a6bc54be82 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,17 +1,3 @@ -2002-10-02 Jim Blandy - - * gdb.c++/casts.cc, gdb.c++/casts.exp: New test. - -2002-10-01 Andrew Cagney - - * mi1-basics.exp: Copy of mi1-basics.exp MIFLAGS set "-i=mi1". - * mi1-break.exp, mi1-console.exp, mi1-disassemble.exp: Ditto. - * mi1-eval.exp, mi1-hack-cli.exp, mi1-pthreads.exp: Ditto. - * mi1-read-memory.exp, mi1-regs.exp, mi1-return.exp: Ditto. - * mi1-simplerun.exp, mi1-stack.exp, mi1-stepi.exp: Ditto. - * mi1-until.exp, mi1-var-block.exp, mi1-var-child.exp: Ditto. - * mi1-var-cmd.exp, mi1-var-display.exp, mi1-watch.exp: Ditto. - 2002-09-29 Andrew Cagney * mi0-basics.exp, mi0-break.exp, mi0-console.exp: Delete. diff --git a/gdb/testsuite/gdb.c++/casts.cc b/gdb/testsuite/gdb.c++/casts.cc deleted file mode 100644 index 831add94418..00000000000 --- a/gdb/testsuite/gdb.c++/casts.cc +++ /dev/null @@ -1,20 +0,0 @@ -struct A -{ - int a; - A (int aa): a (aa) {} -}; - -struct B: public A -{ - int b; - B (int aa, int bb): A (aa), b(bb) {} -}; - -int -main (int argc, char **argv) -{ - A *a = new B(42, 1729); - B *b = (B *) a; - - return 0; /* breakpoint spot: casts.exp: 1 */ -} diff --git a/gdb/testsuite/gdb.c++/casts.exp b/gdb/testsuite/gdb.c++/casts.exp deleted file mode 100644 index 68ce704bc13..00000000000 --- a/gdb/testsuite/gdb.c++/casts.exp +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright 2002 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# This file is part of the gdb testsuite - -# Test casting, especially between class types or pointer-to-class -# types. - -# This file is part of the gdb testsuite - -if $tracelevel then { - strace $tracelevel - } - -# -# test running programs -# - -set prms_id 0 -set bug_id 0 - -if { [skip_cplus_tests] } { continue } - -set testfile "casts" -set srcfile ${testfile}.cc -set binfile ${objdir}/${subdir}/${testfile} - -if [get_compiler_info ${binfile} "c++"] { - return -1; -} - -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - - -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} - -gdb_test "break [gdb_get_line_number "casts.exp: 1"]" \ - "Breakpoint.*at.* file .*" \ - "" - -gdb_test "run" "Breakpoint .* at casts.cc" "" - -# Casting a pointer to a base class to a pointer to a derived class -# should yield the entire derived class. Until August 2002, GDB got -# the enclosing type on `(B *) a' wrong: while the value's static type -# was `B *', as it should be, the enclosing type (which is supposed to -# be the dynamic type) was `A *'. It's senseless to have a static -# type derived from the dynamic type; it should be the other way -# 'round. Dereferencing this oddly typed pointer yielded a value in -# which only the base class's members were initialized, since GDB uses -# the enclosing type to decide how many bytes to read. Members from -# the derived class were garbage, from GDB's address space. -gdb_test "print * (B *) a" ".* = { = {a = 42}, b = 1729}" \ - "cast base class pointer to derived class pointer" - -# Check also that we get the same results from letting the compiler do -# the dereference. -gdb_test "print * b" ".* = { = {a = 42}, b = 1729}" \ - "let compiler cast base class pointer to derived class pointer" diff --git a/gdb/testsuite/gdb.mi/ChangeLog b/gdb/testsuite/gdb.mi/ChangeLog index d3830308095..eb9420b44f5 100644 --- a/gdb/testsuite/gdb.mi/ChangeLog +++ b/gdb/testsuite/gdb.mi/ChangeLog @@ -1,20 +1,3 @@ -2002-10-03 Jeff Johnston - - * mi-return.exp: Change expected frame output to remove extraneous - space in level field when frame level is single digit. Part of - fix for PR gdb/192. - * mi-stack.exp: Ditto. - * mi1-return.exp: Ditto. - * mi1-stack.exp: Ditto. - -2002-10-03 Jeff Johnston - - * mi-var-block.exp: Change expected output from -var-update - command to expect list format for "changelist". Fix for - PR gdb/672. - * mi-var-cmd.exp: Ditto. - * mi-var-child: Ditto. - 2002-09-25 Keith Seitz * mi-pthreads.exp (get_mi_thread_list): Check if expect_out diff --git a/gdb/testsuite/gdb.mi/mi-return.exp b/gdb/testsuite/gdb.mi/mi-return.exp index 1e7c863a7a8..318fa8e9d45 100644 --- a/gdb/testsuite/gdb.mi/mi-return.exp +++ b/gdb/testsuite/gdb.mi/mi-return.exp @@ -80,7 +80,7 @@ proc test_return_simple {} { send_gdb "111-exec-return\n" gdb_expect { - -re "111\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {pass "return from callee4 now"} + -re "111\\^done,frame=\{level=\"0 \",addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {pass "return from callee4 now"} -re ".*\r\n$mi_gdb_prompt$" { fail "return from callee4 now" } timeout { fail "return from callee4 now (timeout)" } diff --git a/gdb/testsuite/gdb.mi/mi-stack.exp b/gdb/testsuite/gdb.mi/mi-stack.exp index 4c682e21e2f..7af458e348d 100644 --- a/gdb/testsuite/gdb.mi/mi-stack.exp +++ b/gdb/testsuite/gdb.mi/mi-stack.exp @@ -73,13 +73,13 @@ proc test_stack_frame_listing {} { # -stack-list-frames 1 3 mi_gdb_test "231-stack-list-frames" \ - "231\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4\",addr=\"$hex\",func=\"main\",.*\}\\\]" \ + "231\\^done,stack=\\\[frame=\{level=\"0 \",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2 \",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3 \",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4 \",addr=\"$hex\",func=\"main\",.*\}\\\]" \ "stack frame listing" mi_gdb_test "232-stack-list-frames 1 1" \ - "232\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \ + "232\\^done,stack=\\\[frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \ "stack frame listing 1 1" mi_gdb_test "233-stack-list-frames 1 3" \ - "233\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\}\\\]" \ + "233\\^done,stack=\\\[frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2 \",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3 \",addr=\"$hex\",func=\"callee1\",.*\}\\\]" \ "stack frame listing 1 3" mi_gdb_test "234-stack-list-frames 1" \ diff --git a/gdb/testsuite/gdb.mi/mi-var-block.exp b/gdb/testsuite/gdb.mi/mi-var-block.exp index 506275c94a6..469839b0332 100644 --- a/gdb/testsuite/gdb.mi/mi-var-block.exp +++ b/gdb/testsuite/gdb.mi/mi-var-block.exp @@ -104,7 +104,7 @@ gdb_expect { # Test: c_variable-3.4 # Desc: check foo, cb changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"foo\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"cb\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"foo\",in_scope=\"true\",type_changed=\"false\",name=\"cb\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars: cb foo changed" # step to "foo = 321;" @@ -155,7 +155,7 @@ mi_gdb_test "-var-evaluate-expression inner_foo" \ clear_xfail *-*-* mi_gdb_test "-var-update foo" \ - "\\^done,changelist=\\\[\\\]" \ + "\\^done,changelist=\{\}" \ "update foo: did not change" mi_gdb_test "-var-delete inner_foo" \ @@ -193,7 +193,7 @@ gdb_expect { # Desc: check that only cb is in scope (known gdb problem) setup_xfail *-*-* mi_gdb_test "-var-update foo2" \ - "\\^done,changelist=\\\[FIXME\\\]" \ + "\\^done,changelist=\{FIXME\}" \ "update foo2 should be out of scope: KNOWN PROBLEM" clear_xfail *-*-* setup_xfail *-*-* @@ -202,7 +202,7 @@ mi_gdb_test "-var-update foo" \ "update foo should be out of scope: KNOWN PROBLEM" clear_xfail *-*-* mi_gdb_test "-var-update cb" \ - "\\^done,changelist=\\\[\\\]" \ + "\\^done,changelist=\{\}" \ "update cb" # Test: c_variable-3.10 diff --git a/gdb/testsuite/gdb.mi/mi-var-child.exp b/gdb/testsuite/gdb.mi/mi-var-child.exp index af058d5170d..18b5a29d86f 100644 --- a/gdb/testsuite/gdb.mi/mi-var-child.exp +++ b/gdb/testsuite/gdb.mi/mi-var-child.exp @@ -750,7 +750,7 @@ mi_gdb_test "-var-delete weird" \ # Test: c_variable-5.1 # Desc: check that nothing changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\\\]" \ + "\\^done,changelist=\{\}" \ "update all vars. None changed" # Step over "struct_declarations.integer = 123;" @@ -760,7 +760,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" # Test: c_variable-5.2 # Desc: check that integer changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"struct_declarations.integer\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"struct_declarations.integer\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars struct_declarations.integer" # Step over: @@ -773,7 +773,7 @@ mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd # Test: c_variable-5.3 # Desc: check that char_ptr changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars struct_declarations.char_ptr" # Step over "struct_declarations.int_ptr_ptr = &foo;" @@ -783,7 +783,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" # Test: c_variable-5.4 # Desc: check that int_ptr_ptr and children changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars int_ptr_ptr and children changed" # Step over "weird->long_array[0] = 1234;" @@ -793,7 +793,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" # Test: c_variable-5.5 # Desc: check that long_array[0] changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.0\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"struct_declarations.long_array.0\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars struct_declarations.long_array.0 changed" # Step over "struct_declarations.long_array[1] = 2345;" @@ -803,7 +803,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" # Test: c_variable-5.6 # Desc: check that long_array[1] changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.1\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"struct_declarations.long_array.1\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars struct_declarations.long_array.1 changed" # Step over "weird->long_array[2] = 3456;" @@ -813,7 +813,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" # Test: c_variable-5.7 # Desc: check that long_array[2] changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.2\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"struct_declarations.long_array.2\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars struct_declarations.long_array.2 changed" # Step over: @@ -830,7 +830,7 @@ mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd # Test: c_variable-5.8 # Desc: check that long_array[3-9] changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.3\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.4\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.5\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.6\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.7\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.8\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"struct_declarations.long_array.9\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"struct_declarations.long_array.3\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.4\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.5\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.6\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.7\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.8\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.9\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars struct_declarations.long_array.3-9 changed" @@ -841,7 +841,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" # Test: c_variable-5.9 # Desc: check that func_ptr changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"struct_declarations.func_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"struct_declarations.func_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars struct_declarations.func_ptr changed" # Delete all variables @@ -1133,7 +1133,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" # Test: c_variable-5.47 # Desc: check that psnp->char_ptr (and [0].char_ptr) changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars psnp->char_ptr (and 0.char_ptr) changed" # Step over "snp1.char_ptr = &c3;" @@ -1143,7 +1143,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" # Test: c_variable-5.48 # Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars psnp->next->char_ptr (and 1.char_ptr) changed" @@ -1154,7 +1154,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" # Test: c_variable-5.49 # Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.next.char_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars psnp->next->next->char_ptr (and 2.char_ptr) changed" @@ -1165,7 +1165,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" # Test: c_variable-5.50 # Desc: check that psnp->long_ptr (and [0].long_ptr) changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.long_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"psnp->ptrs.0.long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars psnp->long_ptr (and 0.long_ptr) changed" @@ -1178,7 +1178,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" # Why does this have a FIXME? setup_xfail *-*-* mi_gdb_test "-var-update *" \ - "FIXME\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "FIXME\\^done,changelist=\{name=\"psnp->ptrs.0.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars psnp->next->long_ptr (and 1.long_ptr) changed" clear_xfail *-*-* @@ -1193,7 +1193,7 @@ mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" # Test: c_variable-5.52 # Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars psnp->next->next->long_ptr (and 2.long_ptr) changed" diff --git a/gdb/testsuite/gdb.mi/mi-var-cmd.exp b/gdb/testsuite/gdb.mi/mi-var-cmd.exp index 26a91cf960b..8be0d8dc7d9 100644 --- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp +++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp @@ -176,7 +176,7 @@ mi_gdb_test "-var-create int * int" \ # Test: c_variable-2.1 # Desc: check whether values changed at do_block_tests mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\\\]" \ + "\\^done,changelist=\{\}" \ "update all vars" # Step over "linteger = 1234;" @@ -185,7 +185,7 @@ mi_step_to "do_locals_tests" "" "var-cmd.c" "107" "step at do_locals_test" # Test: c_variable-2.2 # Desc: check whether only linteger changed values mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars: linteger changed" # Step over "lpinteger = &linteger;" @@ -194,7 +194,7 @@ mi_step_to "do_locals_tests" "" "var-cmd.c" 108 "step at do_locals_tests (2)" # Test: c_variable-2.3 # Desc: check whether only lpinteger changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars: lpinteger changed" # Step over "lcharacter = 'a';" @@ -203,7 +203,7 @@ mi_step_to "do_locals_tests" "" "var-cmd.c" "109" "step at do_locals_tests (3)" # Test: c_variable-2.4 # Desc: check whether only lcharacter changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars: lcharacter changed" # Step over "lpcharacter = &lcharacter;" @@ -212,7 +212,7 @@ mi_step_to "do_locals_tests" "" "var-cmd.c" "110" "step at do_locals_tests (4)" # Test: c_variable-2.5 # Desc: check whether only lpcharacter changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"lpcharacter\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"lpcharacter\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars: lpcharacter changed" @@ -234,7 +234,7 @@ mi_execute_to "exec-step 9" "end-stepping-range" "do_locals_tests" "" \ # Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer, # lsimple.unsigned_character lsimple.integer lsimple.character changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lpdouble\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"ldouble\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lpfloat\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lfloat\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lplong\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\",name=\"lpdouble\",in_scope=\"true\",type_changed=\"false\",name=\"ldouble\",in_scope=\"true\",type_changed=\"false\",name=\"lpfloat\",in_scope=\"true\",type_changed=\"false\",name=\"lfloat\",in_scope=\"true\",type_changed=\"false\",name=\"lplong\",in_scope=\"true\",type_changed=\"false\",name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars: many changed" # Step over: @@ -249,7 +249,7 @@ mi_execute_to "exec-step 4" "end-stepping-range" "do_locals_tests" "" \ # Test: c_variable-2.7 # Desc: check whether (lsimple.signed_character, lsimple.char_ptr) lpsimple, func changed mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"func\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lpsimple\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"func\",in_scope=\"true\",type_changed=\"false\",name=\"lpsimple\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars: func and lpsimple changed" # Step over @@ -271,7 +271,7 @@ mi_execute_to "exec-step 8" "end-stepping-range" "do_locals_tests" "" \ # Note: this test also checks that lpsimple->integer and lsimple.integer have # changed (they are the same) mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"ldouble\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lfloat\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\",name=\"ldouble\",in_scope=\"true\",type_changed=\"false\",name=\"lfloat\",in_scope=\"true\",type_changed=\"false\",name=\"llong\",in_scope=\"true\",type_changed=\"false\",name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\",name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars: func and lpsimple changed" @@ -421,7 +421,7 @@ mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\ # Test: c_variable-2.13 # Desc: change subroutine1 local i mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"i\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"i\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars: i changed" mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \ @@ -430,7 +430,7 @@ mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\ # Test: c_variable-2.14 # Desc: change do_locals_tests local llong mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}" \ "update all vars: llong changed" mi_next_to "do_locals_tests" "" "var-cmd.c" "136" "next out of subroutine1" @@ -438,7 +438,7 @@ mi_next_to "do_locals_tests" "" "var-cmd.c" "136" "next out of subroutine1" # Test: c_variable-2.15 # Desc: check for out of scope subroutine1 locals mi_gdb_test "-var-update *" \ - "\\^done,changelist=\\\[\{name=\"l\",in_scope=\"false\"\},\{name=\"i\",in_scope=\"false\"\}\\\]" \ + "\\^done,changelist=\{name=\"l\",in_scope=\"false\",name=\"i\",in_scope=\"false\"\}" \ "update all vars: all now out of scope" # Done with locals/globals tests. Erase all variables @@ -538,15 +538,15 @@ mi_gdb_test "-break-insert incr_a" \ mi_continue_to {.*} incr_a {.*} {.*var-cmd.c} {.*} {stop in incr_a} mi_gdb_test "-var-update selected_a" \ - "\\^done,changelist=\\\[\{name=\"selected_a\",in_scope=\"true\",new_type=\"char\",new_num_children=\"0\"\}\\\]" \ - "update selected_a in incr_a" + {\^done,changelist=\{name="selected_a",in_scope="true",new_type="char",new_num_children="0"\}} \ + "update selected_a in incr_a" mi_next "step a line in incr_a" mi_next "return from incr_a to do_special_tests" mi_gdb_test "-var-update selected_a" \ - "\\^done,changelist=\\\[\{name=\"selected_a\",in_scope=\"true\",new_type=\"int\",new_num_children=\"0\"\}\\\]" \ - "update selected_a in do_special_tests" + {\^done,changelist=\{name="selected_a",in_scope="true",new_type="int",new_num_children="0"\}} \ + "update selected_a in do_special_tests" mi_gdb_exit return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-basics.exp b/gdb/testsuite/gdb.mi/mi1-basics.exp deleted file mode 100644 index 42d022d6861..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-basics.exp +++ /dev/null @@ -1,174 +0,0 @@ -# Copyright 1999, 2000 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# -# test basic Machine interface (MI) operations -# -# Verify that, using the MI, we can load a program and do -# other basic things that are used by all test files through mi_gdb_exit, -# mi_gdb_start, mi_delete_breakpoints, mi_gdb_reinitialize_dir and -# mi_gdb_load, so we can safely use those. -# -# The goal is not to test gdb functionality, which is done by other tests, -# but the command syntax and correct output response to MI operations. -# - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -# In this file we want to test if the operations needed by the following -# procedures work, so it makes no sense using them here. - -# mi_delete_breakpoints -# mi_gdb_reinitialize_dir $srcdir/$subdir -# mi_gdb_load ${binfile} - -# Test if the MI interpreter has been configured - -proc test_mi_interpreter_selection {} { - global mi_gdb_prompt - global gdb_prompt - - # All this test expects is to get the prompt back - # with no syntax error message - send_gdb "-gdb-version\n" - gdb_expect { - -re "GNU gdb .*\r\n$mi_gdb_prompt$" \ - { pass "acceptance of MI operations" - return 1} - -re ".*\r\n$mi_gdb_prompt$" \ - { fail "acceptance of MI operations" - note "Skipping all other MI tests." } - -re "Undefined command.*$gdb_prompt $" \ - { fail "acceptance of MI operations" - note "Skipping all other MI tests." } - -re ".*$gdb_prompt $" \ - { fail "acceptance of MI operations" - note "Skipping all other MI tests." } - timeout { fail "acceptance of MI operations (timeout)" - note "Skipping all other MI tests." } - } - return 0 -} - -proc test_exec_and_symbol_mi_operatons {} { - global mi_gdb_prompt - global binfile - - # Load symbols and specify executable on a single operation - # Tests: - # -file-exec-and-symbols - - # Can't use mi_gdb_test as if this doesn't work, - # we must give up on the whole test file - send_gdb "-file-exec-and-symbols ${binfile}\n" - gdb_expect { - -re "\[\r\n\]*\\\^done\r\n$mi_gdb_prompt$" \ - { pass "file-exec-and-symbols operation" } - timeout { fail "file-exec-and-symbols operation (timeout)" - note "Skipping all other MI tests." - return 0} - } - - # The following is not used by mi-support.exp, but we test here so - # we get done with loading a program basics. - - # Do it again, but now load symbols and specify executable with - # two separate operations - # Tests: - # -file-clear - # -file-exec-file - # -file-symbol-file - - # FIXME: file-clear is not implemented yet. -# mi_gdb_test "-file-clear" \ -# "\\\^done" \ -# "file-clear operation" - - mi_gdb_test "-file-exec-file ${binfile}" \ - "\\\^done" \ - "file-exec-file operation" - - mi_gdb_test "-file-symbol-file ${binfile}" \ - "\\\^done" \ - "file-symbol-file operation" - - # FIXME: if we cannot load we have to skip all other tests. -} - -proc test_breakpoints_deletion {} { - global mi_gdb_prompt - global srcfile - - # Clear all breakpoints and list to confirm - # Tests: - # -break-delete (all) - # -break-list - - # The all parameter is actually no parameter. - mi_gdb_test "200-break-delete" \ - "\\\^done" \ - "break-delete (all) operation" - - mi_gdb_test "201-break-list" \ - ".*\\\^done,BreakpointTable=\\\{.*,body=\\\[\\\]\\\}" \ - "all breakpoints removed" -} - -proc test_dir_specification {} { - global mi_gdb_prompt - global srcdir - global subdir - - # Clear the search directories, then specify one to be searched - # Tests: - # -environment-directory - # -environment-directory arg - -#exp_internal 1 - mi_gdb_test "202-environment-directory" \ - "\\\^done" \ - "environment-directory operation" - - mi_gdb_test "203-environment-directory ${srcdir}/${subdir}" \ - "\\\^done" \ - "environment-directory arg operation" -#exp_internal 0 -} - -if [test_mi_interpreter_selection] { - test_exec_and_symbol_mi_operatons - test_breakpoints_deletion - test_dir_specification -} - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-break.exp b/gdb/testsuite/gdb.mi/mi1-break.exp deleted file mode 100644 index 34a6ef7b141..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-break.exp +++ /dev/null @@ -1,138 +0,0 @@ -# Copyright 1999 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# -# Test essential Machine interface (MI) operations -# -# Verify that, using the MI, we can run a simple program and perform basic -# debugging activities like: insert breakpoints, run the program, -# step, next, continue until it ends and, last but not least, quit. -# -# The goal is not to test gdb functionality, which is done by other tests, -# but to verify the correct output response to MI operations. -# - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} - -proc test_tbreak_creation_and_listing {} { - global mi_gdb_prompt - global srcfile - global hex - - # Insert some breakpoints and list them - # Also, disable some so they do not interfere with other tests - # Tests: - # -break-insert -t main - # -break-insert -t basics.c:callee2 - # -break-insert -t basics.c:15 - # -break-insert -t srcfile:6 - # -break-list - - mi_gdb_test "222-break-insert -t main" \ - "222\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \ - "break-insert -t operation" - - mi_gdb_test "333-break-insert -t basics.c:callee2" \ - "333\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"22\",times=\"0\"\}" \ - "insert temp breakpoint at basics.c:callee2" - - mi_gdb_test "444-break-insert -t basics.c:15" \ - "444\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"15\",times=\"0\"\}" \ - "insert temp breakpoint at basics.c:15 (callee3)" - - # Getting the quoting right is tricky. That is "\"\":6" - mi_gdb_test "555-break-insert -t \"\\\"${srcfile}\\\":6\"" \ - "555\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"6\",times=\"0\"\}" \ - "insert temp breakpoint at \"\":6 (callee4)" - - mi_gdb_test "666-break-list" \ - "666\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}.*\\\]\}" \ - "list of breakpoints" - - mi_gdb_test "777-break-delete" \ - "777\\^done" \ - "delete temp breakpoints" -} - -proc test_rbreak_creation_and_listing {} { - global mi_gdb_prompt - global srcfile - global hex - - # Insert some breakpoints and list them - # Also, disable some so they do not interfere with other tests - # Tests: - # -break-insert -r main - # -break-insert -r callee2 - # -break-insert -r callee - # -break-insert -r .*llee - # -break-list - - setup_xfail "*-*-*" - mi_gdb_test "122-break-insert -r main" \ - "122\\^done,bkpt=\{number=\"5\",addr=\"$hex\",file=\".*basics.c\",line=\"32\"\}" \ - "break-insert -r operation" - - setup_xfail "*-*-*" - mi_gdb_test "133-break-insert -r callee2" \ - "133\\^done,bkpt=\{number=\"6\",addr=\"$hex\",file=\".*basics.c\",line=\"22\"\}" \ - "insert breakpoint with regexp callee2" - - setup_xfail "*-*-*" - mi_gdb_test "144-break-insert -r callee" \ - "144\\^done,bkpt=\{number=\"7\",addr=\"$hex\",file=\".*basics.c\",line=\"27\"\},bkpt=\{number=\"8\",addr=\"$hex\",file=\".*basics.c\",line=\"22\"\},bkpt=\{number=\"9\",addr=\"$hex\",file=\".*basics.c\",line=\"17\"\},bkpt=\{number=\"10\",addr=\"$hex\",file=\".*basics.c\",line=\"8\"\}" \ - "insert breakpoint with regexp callee" - - setup_xfail "*-*-*" - mi_gdb_test "155-break-insert -r \.\*llee" \ - "155\\^done,bkpt=\{number=\"11\",addr=\"$hex\",file=\".*basics.c\",line=\"27\"\},bkpt=\{number=\"12\",addr=\"$hex\",file=\".*basics.c\",line=\"22\"\},bkpt=\{number=\"13\",addr=\"$hex\",file=\".*basics.c\",line=\"17\"\},bkpt=\{number=\"14\",addr=\"$hex\",file=\".*basics.c\",line=\"8\"\}" \ - "insert breakpoint with regexp .*llee" - - setup_xfail "*-*-*" - mi_gdb_test "166-break-list" \ - "1\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \ - "list of breakpoints" - - mi_gdb_test "177-break-delete" \ - "177\\^done" \ - "delete temp breakpoints" -} - -test_tbreak_creation_and_listing -test_rbreak_creation_and_listing - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-console.exp b/gdb/testsuite/gdb.mi/mi1-console.exp deleted file mode 100644 index 5a6d6f2b897..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-console.exp +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# -# Test essential Machine interface (MI) operations -# -# Verify that, using the MI, we can run a simple program and perform basic -# debugging activities like: insert breakpoints, run the program, -# step, next, continue until it ends and, last but not least, quit. -# -# The goal is not to test gdb functionality, which is done by other tests, -# but to verify the correct output response to MI operations. -# - -# This test only works when talking to a target that routes its output -# through GDB. Check that we're either talking to a simulator or a -# remote target. - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "mi-console" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} - -# Halt in main -mi_gdb_test "200-break-insert main" \ - "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*mi-console.c\",line=\"13\",times=\"0\"\}" \ - "break-insert operation" -mi_run_cmd -gdb_expect { - -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*mi-console.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" { - pass "run to main" - } - -re ".*$mi_gdb_prompt$" { - fail "run to main (2)" - } - timeout { - fail "run to main (timeout)" - } -} - -# Next over the hello() call which will produce lots of output -send_gdb "47-exec-next\n" -gdb_expect { - -re "47\\^running\r\n$mi_gdb_prompt" { - pass "Started step over hello" - } - timeout { - fail "Started step over hello (timeout)" - } -} - -gdb_expect { - -re "@\"H\"\r\n.*@\"e\"\r\n.*@\"l\"\r\n.*@\"l\"\r\n.*@\"o\"\r\n.*@\" \"\r\n.*@\"\\\\\\\\\"\r\n.*@\"\\\\\"\"\r\n.*@\"!\"\r\n.*@\"\\\\r\"\r\n.*@\"\\\\n\"\r\n" { - pass "Hello message" - } - -re "Hello" { - - # Probably a native system where GDB doesn't have direct - # control over the inferior console. - # For this to work, GDB would need to run the inferior process - # under a PTY and then use the even-loops ability to wait on - # multiple event sources to channel the output back through the - # MI. - - fail "Hello message (known bug)" - } - timeout { - fail "Hello message (timeout)" - } -} - -gdb_expect { - -re "47\\*stopped.*$mi_gdb_prompt$" { - pass "Finished step over hello" - } - timeout { - fail "Finished step over hello (timeout)" - } -} - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-disassemble.exp b/gdb/testsuite/gdb.mi/mi1-disassemble.exp deleted file mode 100644 index 65af76d245e..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-disassemble.exp +++ /dev/null @@ -1,224 +0,0 @@ -# Copyright 1999, 2000 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# -# Test Machine interface (MI) operations for disassembly. -# -# The goal is not to test gdb functionality, which is done by other tests, -# but to verify the correct output response to MI operations. -# - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} - -proc test_breakpoints_creation_and_listing {} { - global mi_gdb_prompt - global srcfile - global hex - - # Insert some breakpoints and list them - # Also, disable some so they do not interfere with other tests - # Tests: - # -break-insert - # -break-list - # -break-disable - # -break-info - - mi_gdb_test "200-break-insert main" \ - "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \ - "break-insert operation" - - mi_gdb_test "204-break-list" \ - "204\\^done,BreakpointTable=\{.*,body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\\\]\}" \ - "list of breakpoints" -} - -proc test_running_the_program {} { - global mi_gdb_prompt - global hex - - # Run the program without args - # Tests: - # -exec-run - - # mi_gdb_test cannot be used for asynchronous commands because there are - # two prompts involved and this can lead to a race condition. - # FIXME: We are accepting a duplicate file and line info temporarely. - # The following is equivalent to a send_gdb "000-exec-run\n" - mi_run_cmd - # The running part has been checked already by mi_run_cmd - gdb_expect { - -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" { - pass "run to main" - } - -re ".*$mi_gdb_prompt$" {fail "run to main (2)"} - timeout {fail "run to main (timeout 2)"} - } -} - -proc test_disassembly_only {} { - global mi_gdb_prompt - global hex - global decimal - - # Test disassembly more only for the current function. - # Tests: - # -data-disassemble -s $pc -e "$pc+8" -- 0 - # -data-disassembly -f basics.c -l 32 -- 0 - - mi_gdb_test "print/x \$pc" "" "" - mi_gdb_test "111-data-disassemble -s \$pc -e \"\$pc + 12\" -- 0" \ - "111\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\},\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\]" \ - "data-disassemble from pc to pc+12 assembly only" - - mi_gdb_test "222-data-disassemble -f basics.c -l 32 -- 0" \ - "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \ - "data-disassemble file & line, assembly only" -} - -proc test_disassembly_lines_limit {} { - global mi_gdb_prompt - global hex - global decimal - - # Test disassembly more only for the current function. - # Tests: - # -data-disassembly -f basics.c -l 32 -n 20 -- 0 - # -data-disassembly -f basics.c -l 32 -n 0 -- 0 - # -data-disassembly -f basics.c -l 32 -n 50 -- 0 - - mi_gdb_test "print/x \$pc" "" "" - mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 20 -- 0" \ - "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \ - "data-disassemble file, line, number assembly only" - - mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 0 -- 0" \ - "222\\^done,asm_insns=\\\[\\\]" \ - "data-disassemble file, line, number (zero lines) assembly only" - - mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 50 -- 0" \ - "222\\^done,asm_insns=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]" \ - "data-disassemble file, line, number (more than main lines) assembly only" -} - - -proc test_disassembly_mixed {} { - global mi_gdb_prompt - global hex - global decimal - - # Test disassembly more only for the current function. - # Tests: - # -data-disassembly -f basics.c -l 21 -- 1 - # -data-disassembly -s $pc -e "$pc+8" -- 1 - - mi_gdb_test "002-data-disassemble -f basics.c -l 21 -- 1" \ - "002\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"21\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"callee2\",offset=\"0\",inst=\".*\"\}.*\\\]\}.*,src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[.*\{address=\"$hex\",func-name=\"callee2\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \ - "data-disassemble file, line assembly mixed" - - # - # In mixed mode, the lowest level of granularity is the source line. - # So we are going to get the disassembly for the source line at - # which we are now, even if we have specified that the range is only 2 insns. - # - mi_gdb_test "003-data-disassemble -s \$pc -e \"\$pc+4\" -- 1" \ - "003\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\\\]" \ - "data-disassemble range assembly mixed" -} - -proc test_disassembly_mixed_lines_limit {} { - global mi_gdb_prompt - global hex - global decimal - - # Test disassembly more only for the current function. - # Tests: - # -data-disassembly -f basics.c -l 32 -n 20 -- 1 - # -data-disassembly -f basics.c -l 32 -n 0 -- 1 - # -data-disassembly -f basics.c -l 32 -n 50 -- 1 - - mi_gdb_test "print/x \$pc" "" "" - mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 20 -- 1" \ - "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \ - "data-disassemble file, line, number assembly mixed" - - mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 0 -- 1" \ - "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"31\",file=\".*basics.c\",line_asm_insn=\\\[\\\]\}\\\]" \ - "data-disassemble file, line, number (zero lines) assembly mixed" - - mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 50 -- 1" \ - "222\\^done,asm_insns=\\\[src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\\\[\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\}.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\\\]\}\]" \ - "data-disassemble file, line, number (more than main lines) assembly mixed" -} - -proc test_disassembly_bogus_args {} { - global mi_gdb_prompt - global hex - - # Test that bogus input to disassembly command is rejected. - # Tests: - # -data-disassembly -f foo -l abc -n 0 -- 0 - # -data-disassembly -s foo -e bar -- 0 - # -data-disassembly -s $pc -f basics.c -- 0 - # -data-disassembly -f basics.c -l 32 -- 9 - - mi_gdb_test "123-data-disassemble -f foo -l abc -n 0 -- 0" \ - ".*123\\^error,msg=\"mi_cmd_disassemble: Invalid filename.\"" \ - "data-disassemble bogus filename" - - mi_gdb_test "321-data-disassemble -s foo -e bar -- 0" \ - "321\\^error,msg=\"No symbol \\\\\"foo\\\\\" in current context.\"" \ - "data-disassemble bogus address" - - mi_gdb_test "456-data-disassemble -s \$pc -f basics.c -- 0" \ - "456\\^error,msg=\"mi_cmd_disassemble: Usage: \\( .-f filename -l linenum .-n howmany.. | .-s startaddr -e endaddr.\\) .--. mixed_mode.\"" \ - "data-disassemble mix different args" - - mi_gdb_test "789-data-disassemble -f basics.c -l 32 -- 9" \ - "789\\^error,msg=\"mi_cmd_disassemble: Mixed_mode argument must be 0 or 1.\"" \ - "data-disassemble wrong mode arg" - -} - -test_breakpoints_creation_and_listing -test_running_the_program -test_disassembly_only -test_disassembly_mixed -test_disassembly_bogus_args -test_disassembly_lines_limit -test_disassembly_mixed_lines_limit - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-eval.exp b/gdb/testsuite/gdb.mi/mi1-eval.exp deleted file mode 100644 index 898c7b78777..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-eval.exp +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 1999, 2000 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# -# Test essential Machine interface (MI) operations -# -# Verify -data-evaluate-expression. There are really minimal tests. - -# The goal is not to test gdb functionality, which is done by other tests, -# but to verify the correct output response to MI operations. -# - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} - -proc test_running_the_program {} { - global mi_gdb_prompt - global hex - - # Run the program without args, then specify srgs and rerun the program - # Tests: - # -exec-run - - mi_gdb_test "300-break-insert callee4" \ - "300\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \ - "insert breakpoint at callee4" - - # mi_gdb_test cannot be used for asynchronous commands because there are - # two prompts involved and this can lead to a race condition. - # The following is equivalent to a send_gdb "000-exec-run\n" - mi_run_cmd - # The running part has been checked already by mi_run_cmd - gdb_expect { - -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" \ - { pass "run to callee4" } - -re ".*$mi_gdb_prompt$" {fail "run to callee4 (2)"} - timeout {fail "run to callee4 (timeout 2)"} - } - - send_gdb "101-exec-next\n" - gdb_expect { - -re "101\\^running\r\n$mi_gdb_prompt" { - gdb_expect { - -re "\[\r\n\]*101\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"9\"\}\r\n$mi_gdb_prompt$" \ - { pass "next in callee4" } - -re ".*$mi_gdb_prompt$" {fail "next in callee4 (2)"} - timeout {fail "next in callee4 (timeout 2)"} - } - } - -re ".*$mi_gdb_prompt$" {fail "next in callee4 (1)"} - timeout {fail "next in callee4 (timeout 1)"} - } - -} - -test_running_the_program - -mi_gdb_test "211-data-evaluate-expression A" "211\\^done,value=\"1\"" "eval A" - -mi_gdb_test "311-data-evaluate-expression &A" "311\\^done,value=\"$hex\"" "eval &A" - -mi_gdb_test "411-data-evaluate-expression A+3" "411\\^done,value=\"4\"" "eval A+3" - -mi_gdb_test "511-data-evaluate-expression \"A + 3\"" "511\\^done,value=\"4\"" "eval A + 3" - - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-hack-cli.exp b/gdb/testsuite/gdb.mi/mi1-hack-cli.exp deleted file mode 100644 index 951981a16b9..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-hack-cli.exp +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 1999 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - - -# Some basic checks for the CLI. - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -mi_gdb_test "show architecture" \ - "&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n\\^done" \ - "show architecture" - -mi_gdb_test "47show architecture" \ - "&\"show architecture\\\\n\"\r\n~\"The target architecture.*\"\r\n47\\^done" \ - "47show architecture" - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-pthreads.exp b/gdb/testsuite/gdb.mi/mi1-pthreads.exp deleted file mode 100644 index aea4f582836..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-pthreads.exp +++ /dev/null @@ -1,220 +0,0 @@ -# Copyright 2002 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# This file tests MI thread commands. -# Specifically, we are testing the MI command set and the console (in MI) -# command set ("interpreter-exec") and that the commands that are executed -# via these command pathways are properly executed. Console commands -# executed via MI should use MI output wrappers, MI event handlers, etc. - -# This only works with native configurations -if {![isnative]} { - return -} - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if {[mi_gdb_start]} { - continue -} - -# The procs below dealing with parsing cli/mi output for the threadlist -# is duplicated in gdb669.exp. Any changes here will probably need to -# be made there as well. - -proc get_mi_thread_list {name} { - global expect_out - - # MI will return a list of thread ids: - # - # -thread-list-ids - # ^done,thread-ids=[thread-id="1",thread-id="2",...],number-of-threads="N" - # (gdb) - mi_gdb_test "-thread-list-ids" \ - {\^done,thread-ids={(thread-id="[0-9]+"(,)?)+},number-of-threads="[0-9]+"} \ - "-thread_list_ids ($name)" - - set output {} - if {[info exists expect_out(buffer)]} { - set output $expect_out(buffer) - } - - set thread_list {} - if {![regexp {thread-ids=\{(thread-id="[0-9]+"(,)?)*\}} $output threads]} { - fail "finding threads in MI output ($name)" - } else { - pass "finding threads in MI output ($name)" - - # Make list of console threads - set start [expr {[string first \{ $threads] + 1}] - set end [expr {[string first \} $threads] - 1}] - set threads [string range $threads $start $end] - foreach thread [split $threads ,] { - if {[scan $thread {thread-id="%d"} num]} { - lappend thread_list $num - } - } - } - - return $thread_list -} - -# Check that MI and the console know of the same threads. -# Appends NAME to all test names. -proc check_mi_and_console_threads {name} { - global expect_out - - mi_gdb_test "-thread-list-ids" \ - {\^done,thread-ids={(thread-id="[0-9]+"(,)*)+},number-of-threads="[0-9]+"} \ - "-thread-list-ids ($name)" - set mi_output {} - if {[info exists expect_out(buffer)]} { - set mi_output $expect_out(buffer) - } - - # GDB will return a list of thread ids and some more info: - # - # (gdb) - # -interpreter-exec console "info threads" - # ~" 4 Thread 2051 (LWP 7734) 0x401166b1 in __libc_nanosleep () at __libc_nanosleep:-1" - # ~" 3 Thread 1026 (LWP 7733) () at __libc_nanosleep:-1" - # ~" 2 Thread 2049 (LWP 7732) 0x401411f8 in __poll (fds=0x804bb24, nfds=1, timeout=2000) at ../sysdeps/unix/sysv/linux/poll.c:63" - # ~"* 1 Thread 1024 (LWP 7731) main (argc=1, argv=0xbfffdd94) at ../../../src/gdb/testsuite/gdb.mi/pthreads.c:160" - # FIXME: kseitz/2002-09-05: Don't use the hack-cli method. - mi_gdb_test "info threads" \ - {.*(~".*"[\r\n]*)+.*} \ - "info threads ($name)" - set console_output {} - if {[info exists $expect_out(buffer)]} { - set console_output $expect_out(buffer) - } - - # Make a list of all known threads to console (gdb's thread IDs) - set console_thread_list {} - foreach line [split $console_output \n] { - if {[string index $line 0] == "~"} { - # This is a line from the console; trim off "~", " ", "*", and "\"" - set line [string trim $line ~\ \"\*] - if {[scan $line "%d" id] == 1} { - lappend console_thread_list $id - } - } - } - - # Now find the result string from MI - set mi_result "" - foreach line [split $mi_output \n] { - if {[string range $line 0 4] == "^done"} { - set mi_result $line - } - } - if {$mi_result == ""} { - fail "finding MI result string ($name)" - } else { - pass "finding MI result string ($name)" - } - - # Finally, extract the thread ids and compare them to the console - set num_mi_threads_str "" - if {![regexp {number-of-threads="[0-9]+"} $mi_result num_mi_threads_str]} { - fail "finding number of threads in MI output ($name)" - } else { - pass "finding number of threads in MI output ($name)" - - # Extract the number of threads from the MI result - if {![scan $num_mi_threads_str {number-of-threads="%d"} num_mi_threads]} { - fail "got number of threads from MI ($name)" - } else { - pass "got number of threads from MI ($name)" - - # Check if MI and console have same number of threads - if {$num_mi_threads != [llength $console_thread_list]} { - fail "console and MI have same number of threads ($name)" - } else { - pass "console and MI have same number of threads ($name)" - - # Get MI thread list - set mi_thread_list [get_mi_thread_list $name] - - # Check if MI and console have the same threads - set fails 0 - foreach ct [lsort $console_thread_list] mt [lsort $mi_thread_list] { - if {$ct != $mt} { - incr fails - } - } - if {$fails > 0} { - fail "MI and console have same threads ($name)" - - # Send a list of failures to the log - send_log "Console has thread ids: $console_thread_list\n" - send_log "MI has thread ids: $mi_thread_list\n" - } else { - pass "MI and console have same threads ($name)" - } - } - } - } -} - -# This procedure tests the various thread commands in MI. -proc check_mi_thread_command_set {} { - - mi_runto done_making_threads - - set thread_list [get_mi_thread_list "in check_mi_thread_command_set"] - - mi_gdb_test "-thread-select" \ - {\^error,msg="mi_cmd_thread_select: USAGE: threadnum."} \ - "check_mi_thread_command_set: -thread-select" - - mi_gdb_test "-thread-select 123456789" \ - {\^error,msg="Thread ID 123456789 not known\."} \ - "check_mi_thread_command_set: -thread-select 123456789" - - foreach thread $thread_list { - mi_gdb_test "-thread-select $thread" \ - "\\^done,new-thread-id=\"$thread\",frame={.*},line=\"(-)?\[0-9\]+\",file=\".*\"" \ - "check_mi_thread_command_set: -thread-select $thread" - } -} - -# -# Start here -# -set testfile "pthreads" -set srcfile "$testfile.c" -set binfile "$objdir/$subdir/$testfile" - -set options [list debug incdir=$subdir] -if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] - != "" } { - gdb_suppress_entire_file \ - "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load $binfile - -check_mi_thread_command_set - -mi_gdb_exit - diff --git a/gdb/testsuite/gdb.mi/mi1-read-memory.exp b/gdb/testsuite/gdb.mi/mi1-read-memory.exp deleted file mode 100644 index 27960783216..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-read-memory.exp +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 1999, 2000 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# -# test basic Machine interface (MI) operations -# -# Verify that, using the MI, we can load a program and do -# other basic things that are used by all test files through mi_gdb_exit, -# mi_gdb_start, mi_delete_breakpoints, mi_gdb_reinitialize_dir and -# mi_gdb_load, so we can safely use those. -# -# The goal is not to test gdb functionality, which is done by other tests, -# but the command syntax and correct output response to MI operations. -# - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "mi-read-memory" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - - -mi_run_to_main - -#mi_next "do initialization" -send_gdb "101-exec-next\n" -gdb_expect { - -re "101\\^running\r\n$mi_gdb_prompt" { - gdb_expect { - -re "\[\r\n\]*101\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*mi-read-memory.c\",line=\"20\"\}.*$mi_gdb_prompt$" \ - { pass "do initialization" } - -re ".*$mi_gdb_prompt$" {fail "do initialization (2)"} - timeout {fail "do initialization (timeout 2)"} - } - } - -re ".*$mi_gdb_prompt$" {fail "do initialization (1)"} - timeout {fail "do initialization (timeout 1)"} -} - -mi_gdb_test "1-data-read-memory" \ - "1\\^error,msg=\".*\"" \ - "no arguments" - - -mi_gdb_test "2-data-read-memory bytes x 1 3 2" \ - "2\\^done,addr=\"$hex\",nr-bytes=\"6\",total-bytes=\"6\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x00\",\"0x01\"\\\]},{addr=\"$hex\",data=\\\[\"0x02\",\"0x03\"\\\]},{addr=\"$hex\",data=\\\[\"0x04\",\"0x05\"\\\]}\\\]" \ - "3x2, one byte" - - -mi_gdb_test "9-data-read-memory -o -6 -- -0+bytes+6 x 1 3 2" \ - "9\\^done,addr=\"$hex\",nr-bytes=\"6\",total-bytes=\"6\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x00\",\"0x01\"\\\]},{addr=\"$hex\",data=\\\[\"0x02\",\"0x03\"\\\]},{addr=\"$hex\",data=\\\[\"0x04\",\"0x05\"\\\]}\\\]" \ - "3x2, one byte offset by -6" - - -mi_gdb_test "3-data-read-memory \"(shorts + 128)\" x 2 1 2" \ - "3\\^done,addr=\"$hex\",nr-bytes=\"4\",total-bytes=\"4\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x0100\",\"0x0102\"\\\]}\\\]" \ - "expression in quotes" - - -mi_gdb_test "4-data-read-memory bytes+16 x 1 8 4 x" \ - "4\\^done,addr=\"$hex\",nr-bytes=\"32\",total-bytes=\"32\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0x10\",\"0x11\",\"0x12\",\"0x13\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x14\",\"0x15\",\"0x16\",\"0x17\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x18\",\"0x19\",\"0x1a\",\"0x1b\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x1c\",\"0x1d\",\"0x1e\",\"0x1f\"\\\],ascii=\"xxxx\"},{addr=\"$hex\",data=\\\[\"0x20\",\"0x21\",\"0x22\",\"0x23\"\\\],ascii=\" !\\\\\"#\"},{addr=\"$hex\",data=\\\[\"0x24\",\"0x25\",\"0x26\",\"0x27\"\\\],ascii=\"\\$%&'\"},{addr=\"$hex\",data=\\\[\"0x28\",\"0x29\",\"0x2a\",\"0x2b\"\\\],ascii=\"().+\"},{addr=\"$hex\",data=\\\[\"0x2c\",\"0x2d\",\"0x2e\",\"0x2f\"\\\],ascii=\",-\./\"}\\\]" \ - "ascii and data" - - -mi_gdb_test "5-data-read-memory shorts+64 d 2 1 1" \ - "5\\^done,addr=\"$hex\",nr-bytes=\"2\",total-bytes=\"2\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"128\"\\\]}\\\]" \ - "decimal" - -mi_gdb_test "6-data-read-memory shorts+64 o 2 1 1" \ - "6\\^done,addr=\"$hex\",nr-bytes=\"2\",total-bytes=\"2\",next-row=\"$hex\",prev-row=\"$hex\",next-page=\"$hex\",prev-page=\"$hex\",memory=\\\[{addr=\"$hex\",data=\\\[\"0200\"\\\]}\\\]" \ - "octal" - - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-regs.exp b/gdb/testsuite/gdb.mi/mi1-regs.exp deleted file mode 100644 index b4baa18b3b0..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-regs.exp +++ /dev/null @@ -1,175 +0,0 @@ -# Copyright 1999, 2000 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu -# -# Test essential Machine interface (MI) operations -# -# Verify that, using the MI, we can run a simple program and look at registers. -# -# The goal is not to test gdb functionality, which is done by other tests, -# but to verify the correct output response to MI operations. -# - - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} - -proc test_breakpoints_creation_and_listing {} { - global mi_gdb_prompt - global srcfile - global hex - - # Insert some breakpoints and list them - # Also, disable some so they do not interfere with other tests - # Tests: - # -break-insert - # -break-list - # -break-disable - # -break-info - - mi_gdb_test "200-break-insert main" \ - "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \ - "break-insert operation" - - mi_gdb_test "204-break-list" \ - "204\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\\\]\}" \ - "list of breakpoints" -} - -proc test_running_the_program {} { - global mi_gdb_prompt - global hex - - # Run the program without args - # Tests: - # -exec-run - - # mi_gdb_test cannot be used for asynchronous commands because there are - # two prompts involved and this can lead to a race condition. - # FIXME: We are accepting a duplicate file and line info temporarely. - # The following is equivalent to a send_gdb "000-exec-run\n" - mi_run_cmd - # The running part has been checked already by mi_run_cmd - gdb_expect { - -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" { - pass "run to main" - } - -re ".*$mi_gdb_prompt$" {fail "run to main (2)"} - timeout {fail "run to main (timeout 2)"} - } -} - -proc sparc_register_tests_no_exec { } { - # Test the generic IDT chip. - mi_gdb_test "111-data-list-register-values" \ - ".*111\\^error,msg=\"mi_cmd_data_list_register_values: Usage: -data-list-register-values \\\[...\\\]\"" \ - "wrong arguments" - - mi_gdb_test "111-data-list-register-values x" \ - ".*111\\^error,msg=\"mi_cmd_data_list_register_values: No registers\.\"" \ - "no executable" -} - -# These tests exercise IDT-specific MIPS registers for several -# different processor models. - -# This should detect the actual processor in use and change -# the expected results appropriately. FIXME - -proc sparc_register_tests { } { - global hex - global decimal - set octal "\[0-7\]+" - set binary "\[0-1\]+" - set float "\\-?((\[0-9\]+(\\.\[0-9\]+)?(e\[-+\]\[0-9\]+)?)|(nan\\($hex\\)))" - set float2 "\\-?\[0-9\]+" - - mi_gdb_test "111-data-list-register-names" \ - "111\\^done,register-names=\\\[\"g0\",\"g1\",\"g2\",\"g3\",\"g4\",\"g5\",\"g6\",\"g7\",\"o0\",\"o1\",\"o2\",\"o3\",\"o4\",\"o5\",\"sp\",\"o7\",\"l0\",\"l1\",\"l2\",\"l3\",\"l4\",\"l5\",\"l6\",\"l7\",\"i0\",\"i1\",\"i2\",\"i3\",\"i4\",\"i5\",\"fp\",\"i7\",\"f0\",\"f1\",\"f2\",\"f3\",\"f4\",\"f5\",\"f6\",\"f7\",\"f8\",\"f9\",\"f10\",\"f11\",\"f12\",\"f13\",\"f14\",\"f15\",\"f16\",\"f17\",\"f18\",\"f19\",\"f20\",\"f21\",\"f22\",\"f23\",\"f24\",\"f25\",\"f26\",\"f27\",\"f28\",\"f29\",\"f30\",\"f31\",\"y\",\"psr\",\"wim\",\"tbr\",\"pc\",\"npc\",\"fpsr\",\"cpsr\"\\\]" \ - "list register names" - - mi_gdb_test "222-data-list-register-values x" \ - "222\\^done,register-values=\\\[\{number=\"0\",value=\"$hex\"\}.*\{number=\"71\",value=\"$hex\"\}\\\]" \ - "register values x" - - mi_gdb_test "333-data-list-register-values f" \ - "333\\^done,register-values=\\\[\{number=\"0\",value=\"$float\"\},\{number=\"1\",value=\"$float\"\},.*\{number=\"71\",value=\"$float\"\}\\\]" \ - "register values f" - - mi_gdb_test "444-data-list-register-values d" \ - "444\\^done,register-values=\\\[\{number=\"0\",value=\"$decimal\"\}.*\{number=\"71\",value=\"$decimal\"\}\\\]" \ - "register values d" - - mi_gdb_test "555-data-list-register-values o" \ - "555\\^done,register-values=\\\[\{number=\"0\",value=\"$octal\"\}.*\{number=\"71\",value=\"$octal\"\}\\\]" \ - "register values o" - - mi_gdb_test "666-data-list-register-values t" \ - "666\\^done,register-values=\\\[\{number=\"0\",value=\"$binary\"\}.*\{number=\"71\",value=\"$binary\"\}\\\]" \ - "register values t" - - # On the sparc, registers 0-31 are int, 32-63 float, 64-71 int - - mi_gdb_test "777-data-list-register-values N" \ - "777\\^done,register-values=\\\[\{number=\"0\",value=\"$decimal\"\}.*\{number=\"31\",value=\"$decimal\"\},\{number=\"32\",value=\"$float\"\}.*\{number=\"63\",value=\"$float\"\},\{number=\"64\",value=\"$decimal\"\}.*\{number=\"71\",value=\"$decimal\"\}\\\]" \ - "register values N" - - mi_gdb_test "888-data-list-register-values r" \ - "888\\^done,register-values=\\\[\{number=\"0\",value=\"$hex\"\}.*\{number=\"71\",value=\"$hex\"\}\\\]" \ - "register values r" - - mi_gdb_test "999-data-list-register-names 68 69 70 71" \ - "999\\^done,register-names=\\\[\"pc\",\"npc\",\"fpsr\",\"cpsr\"\\\]" \ - "list names of some regs" - - mi_gdb_test "001-data-list-register-values x 68 69 70 71" \ - "001\\^done,register-values=\\\[\{number=\"68\",value=\"$hex\"\},\{number=\"69\",value=\"$hex\"\},\{number=\"70\",value=\"$hex\"\},\{number=\"71\",value=\"$hex\"\}\\\]" \ - "list values of some regs" - - mi_gdb_test "002-data-list-changed-registers" \ - "002\\^done,changed-registers=\\\[(\"${decimal}\"(,\"${decimal}\")*)?\\\]" \ - "list changed registers" -} - -if [istarget "sparc-*-*"] then { - sparc_register_tests_no_exec - test_breakpoints_creation_and_listing - test_running_the_program - sparc_register_tests -} else { - verbose "mi-regs.exp tests ignored for this target" -} - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-return.exp b/gdb/testsuite/gdb.mi/mi1-return.exp deleted file mode 100644 index 0fcbbfe62f4..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-return.exp +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright 1999, 2000 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# Test Machine interface (MI) operations -# Verify that, using the MI, we can run a simple program and perform -# exec-return. - -# The goal is not to -# test gdb functionality, which is done by other tests, but to verify -# the correct output response to MI operations. -# - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} - -proc test_running_to_callee4 {} { - global mi_gdb_prompt - global hex - - mi_gdb_test "200-break-insert callee4" \ - "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \ - "break-insert operation" - - mi_run_cmd - - gdb_expect { - -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" { - pass "run to callee4" - } - -re ".*$mi_gdb_prompt$" { - fail "run to callee4 (2)" - } - timeout { - fail "run to callee4 (timeout)" - } - } - - mi_gdb_test "205-break-delete" \ - "205\\^done.*" \ - "delete all breakpoints" - -} - -proc test_return_simple {} { - global mi_gdb_prompt - global hex - - send_gdb "111-exec-return\n" - gdb_expect { - -re "111\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {pass "return from callee4 now"} - -re ".*\r\n$mi_gdb_prompt$" { fail "return from callee4 now" } - timeout { fail "return from callee4 now (timeout)" - } - } -} - -test_running_to_callee4 -test_return_simple - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-simplerun.exp b/gdb/testsuite/gdb.mi/mi1-simplerun.exp deleted file mode 100644 index 839903a02cc..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-simplerun.exp +++ /dev/null @@ -1,199 +0,0 @@ -# Copyright 1999, 2000 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# -# Test essential Machine interface (MI) operations -# -# Verify that, using the MI, we can run a simple program and perform basic -# debugging activities like: insert breakpoints, run the program, -# step, next, continue until it ends and, last but not least, quit. -# -# The goal is not to test gdb functionality, which is done by other tests, -# but to verify the correct output response to MI operations. -# - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} - -proc test_breakpoints_creation_and_listing {} { - global mi_gdb_prompt - global srcfile - global hex - - # Insert some breakpoints and list them - # Also, disable some so they do not interfere with other tests - # Tests: - # -break-insert - # -break-list - # -break-disable - # -break-info - - mi_gdb_test "200-break-insert main" \ - "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \ - "break-insert operation" - - mi_gdb_test "201-break-insert basics.c:callee2" \ - "201\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"22\",times=\"0\"\}" \ - "insert breakpoint at basics.c:callee2" - - mi_gdb_test "202-break-insert basics.c:15" \ - "202\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"15\",times=\"0\"\}" \ - "insert breakpoint at basics.c:15 (callee3)" - - mi_gdb_test "203-break-insert \"\\\"${srcfile}\\\":6\"" \ - "203\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"6\",times=\"0\"\}" \ - "insert breakpoint at \"\":6 (callee4)" - - mi_gdb_test "204-break-list" \ - "204\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \ - "list of breakpoints" - - mi_gdb_test "205-break-disable 2 3 4" \ - "205\\^done.*" \ - "disabling of breakpoints" - - mi_gdb_test "206-break-info 2" \ - "206\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"2\",.*,enabled=\"n\",.*\}\\\]\}" \ - "list of breakpoints, 16 disabled" -} - -proc test_running_the_program {} { - global mi_gdb_prompt - global hex - - # Run the program without args, then specify srgs and rerun the program - # Tests: - # -exec-run - # -gdb-set - - # mi_gdb_test cannot be used for asynchronous commands because there are - # two prompts involved and this can lead to a race condition. - # The following is equivalent to a send_gdb "000-exec-run\n" - mi_run_cmd - gdb_expect { - -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" { - pass "run to main" - } - -re ".*$mi_gdb_prompt$" { - fail "run to main (2)" - } - timeout { - fail "run to main (timeout)" - } - } -} - -proc test_controlled_execution {} { - global mi_gdb_prompt - global hex - - # Continue execution until a breakpoint is reached, step into calls, verifying - # if the arguments are correctly shown, continue to the end of a called - # function, step over a call (next). - # Tests: - # -exec-continue - # -exec-next - # -exec-step - # -exec-finish - - mi_next_to "main" "" "basics.c" "33" "next at main" - - # FIXME: A string argument is not printed right; should be fixed and - # we should look for the right thing here. - # NOTE: The ``\\\\\"'' is for \". - mi_step_to "callee1" \ - "\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument\.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}" \ - "basics.c" "27" "step at main" - - # FIXME: A string argument is not printed right; should be fixed and - # we should look for the right thing here. - mi_execute_to "exec-step 3" "end-stepping-range" "callee4" "" \ - "basics.c" "8" "" "step to callee4" - - # FIXME: A string argument is not printed right; should be fixed and - # we should look for the right thing here. - # NOTE: The ``.'' is part of ``gdb-result-var="$1"'' - mi_finish_to "callee3" ".*" "basics.c" "18" ".1" "0" "exec-finish" -} - -proc test_controlling_breakpoints {} { - global mi_gdb_prompt - - # Enable, delete, set ignore counts in breakpoints - # (disable was already tested above) - # Tests: - # -break-delete - # -break-enable - # -break-after - # -break-condition - -} - -proc test_program_termination {} { - global mi_gdb_prompt - - # Run to completion: normal and forced - # Tests: - # -exec-abort - # (normal termination of inferior) - - # FIXME: "stopped" doesn't seem appropriate. - # mi_gdb_test cannot be used for asynchronous commands because there are - # two prompts involved and this can lead to a race condition. - send_gdb "999-exec-continue\n" - gdb_expect { - -re "999\\^running\r\n$mi_gdb_prompt" { - gdb_expect { - -re "999\\*stopped,reason=\"exited-normally\"\r\n$mi_gdb_prompt$" { - pass "continue to end" - } - -re ".*$mi_gdb_prompt$" {fail "continue to end (2)"} - timeout {fail "continue to end (timeout 2)"} - } - } - -re ".*$mi_gdb_prompt$" {fail "continue to end (1)"} - timeout {fail "continue to end (timeout 1)"} - } -} - -test_breakpoints_creation_and_listing -test_running_the_program -test_controlled_execution -test_controlling_breakpoints -test_program_termination - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-stack.exp b/gdb/testsuite/gdb.mi/mi1-stack.exp deleted file mode 100644 index 45b8b83a367..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-stack.exp +++ /dev/null @@ -1,218 +0,0 @@ -# Copyright 2000 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# -# Test essential Machine interface (MI) operations -# -# Verify that stack commands work. - -# The goal is not to test gdb functionality, which is done by other tests, -# but to verify the correct output response to MI operations. -# - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} - - -mi_gdb_test "200-break-insert callee4" \ - "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \ - "break-insert operation" - -mi_run_cmd -# The running part has been checked already by mi_run_cmd -gdb_expect { - -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" { - pass "run to callee4" - } - -re ".*$mi_gdb_prompt$" {fail "run to callee4 (2)"} - timeout {fail "run to callee4 (timeout 2)"} -} - - -proc test_stack_frame_listing {} { - global mi_gdb_prompt - global hex - - # Obtain a stack trace - # Tests: - # -stack-list-frames - # -stack-list-frames 1 1 - # -stack-list-frames 1 3 - - mi_gdb_test "231-stack-list-frames" \ - "231\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4\",addr=\"$hex\",func=\"main\",.*\}\\\]" \ - "stack frame listing" - mi_gdb_test "232-stack-list-frames 1 1" \ - "232\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \ - "stack frame listing 1 1" - mi_gdb_test "233-stack-list-frames 1 3" \ - "233\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\}\\\]" \ - "stack frame listing 1 3" - - mi_gdb_test "234-stack-list-frames 1" \ - "234\\^error,msg=\"mi_cmd_stack_list_frames: Usage.*FRAME_LOW FRAME_HIGH.*\"" \ - "stack frame listing wrong" -} - -proc test_stack_args_listing {} { - global mi_gdb_prompt - global hex - - # Obtain lists for args for the stack frames - # Tests: - # -stack-list-arguments 0 - # -stack-list-arguments 0 1 1 - # -stack-list-arguments 0 1 3 - # -stack-list-arguments 1 - # -stack-list-arguments 1 1 1 - # -stack-list-arguments 1 1 3 - # -stack-list-arguments - - mi_gdb_test "231-stack-list-arguments 0" \ - "231\\^done,stack-args=\\\[frame=\{level=\"0\",args=\\\[\\\]\},frame=\{level=\"1\",args=\\\[name=\"strarg\"\\\]\},frame=\{level=\"2\",args=\\\[name=\"intarg\",name=\"strarg\"\\\]\},frame=\{level=\"3\",args=\\\[name=\"intarg\",name=\"strarg\",name=\"fltarg\"\\\]\},frame=\{level=\"4\",args=\\\[\\\]\}\\\]" \ - "stack args listing 0" - - mi_gdb_test "232-stack-list-arguments 0 1 1" \ - "232\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[name=\"strarg\"\\\]\}\\\]" \ - "stack args listing 0 1 1" - - mi_gdb_test "233-stack-list-arguments 0 1 3" \ - "233\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[name=\"strarg\"\\\]\},frame=\{level=\"2\",args=\\\[name=\"intarg\",name=\"strarg\"\\\]\},frame=\{level=\"3\",args=\\\[name=\"intarg\",name=\"strarg\",name=\"fltarg\"\\\]\}\\\]" \ - "stack args listing 0 1 3" - - mi_gdb_test "231-stack-list-arguments 1" \ - "231\\^done,stack-args=\\\[frame=\{level=\"0\",args=\\\[\\\]\},frame=\{level=\"1\",args=\\\[\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"2\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"3\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\\\]\},frame=\{level=\"4\",args=\\\[\\\]\}\\\]" \ - "stack args listing 1" - - mi_gdb_test "232-stack-list-arguments 1 1 1" \ - "232\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\}\\\]" \ - "stack args listing 1 1 1" - - mi_gdb_test "233-stack-list-arguments 1 1 3" \ - "233\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"2\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"3\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\\\]\}\\\]" \ - "stack args listing 1 1 3" - - mi_gdb_test "234-stack-list-arguments" \ - "234\\^error,msg=\"mi_cmd_stack_list_args: Usage.*PRINT_VALUES.*FRAME_LOW FRAME_HIGH.*\"" \ - "stack args listing wrong" -} - -proc test_stack_info_depth {} { - global mi_gdb_prompt - global hex - - # Obtain depth of stack - # Tests: - # -stack-info-depth - # -stack-info-depth 3 - # -stack-info-depth 99 - - mi_gdb_test "231-stack-info-depth" \ - "231\\^done,depth=\"5\"" \ - "stack info-depth" - - mi_gdb_test "231-stack-info-depth 3" \ - "231\\^done,depth=\"3\"" \ - "stack info-depth 3" - - mi_gdb_test "231-stack-info-depth 99" \ - "231\\^done,depth=\"5\"" \ - "stack info-depth 99" - - mi_gdb_test "231-stack-info-depth 99 99" \ - "231\\^error,msg=\"mi_cmd_stack_info_depth: Usage: .MAX_DEPTH.\"" \ - "stack info-depth wrong usage" -} - -proc test_stack_locals_listing {} { - global mi_gdb_prompt - global hex - - # Obtain lists for locals for the stack frames - # Tests: - # -stack-list-locals 0 - # -stack-list-locals 1 - # -stack-list-arguments - - mi_gdb_test "232-stack-list-locals 0" \ - "232\\^done,locals=\\\[name=\"A\",name=\"B\",name=\"C\"\\\]" \ - "stack locals listing 0" - -# step until A, B, C, have some reasonable values. -send_gdb "-exec-next 3\n" -gdb_expect { - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" { - pass "next's in callee4" - } - timeout { fail "next in callee4 (timeout)" } -} - - mi_gdb_test "232-stack-list-locals 1" \ - "232\\^done,locals=\\\[\{name=\"A\",value=\"1\"\},\{name=\"B\",value=\"2\"\},\{name=\"C\",value=\"3\"\}\\\]" \ - "stack locals listing 1" - - mi_gdb_test "234-stack-list-locals" \ - "234\\^error,msg=\"mi_cmd_stack_list_locals: Usage.*PRINT_VALUES.*\"" \ - "stack locals listing wrong" - - mi_gdb_test "232-stack-select-frame 1" \ - "232\\^done" \ - "stack select frame 1" - - mi_gdb_test "232-stack-list-locals 1" \ - "232\\^done,locals=\\\[\\\]" \ - "stack locals listing for new frame" - -# this should be a no-op - - mi_gdb_test "232-stack-select-frame" \ - "232\\^done" \ - "stack select same frame" - - mi_gdb_test "232-stack-list-locals 1" \ - "232\\^done,locals=\\\[\\\]" \ - "stack locals for same frame (level 1)" - -} - -test_stack_frame_listing -test_stack_args_listing -test_stack_locals_listing -test_stack_info_depth - - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-stepi.exp b/gdb/testsuite/gdb.mi/mi1-stepi.exp deleted file mode 100644 index 56344798038..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-stepi.exp +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 1999, 2000 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# Test Machine interface (MI) operations -# Verify that, using the MI, we can run a simple program and perform -# exec-step-instruction and exec-next-instruction. - -# The goal is not to -# test gdb functionality, which is done by other tests, but to verify -# the correct output response to MI operations. -# - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} - -proc test_running_to_main {} { - global mi_gdb_prompt - global hex - - mi_gdb_test "200-break-insert main" \ - "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \ - "break-insert operation" - - mi_run_cmd - - gdb_expect { - -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" { - pass "run to main" - } - -re ".*$mi_gdb_prompt$" { - fail "run to main (2)" - } - timeout { - fail "run to main (timeout)" - } - } -} - -proc test_stepi_nexti {} { - global mi_gdb_prompt - global hex - - send_gdb "111-exec-step-instruction\n" - gdb_expect { - -re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" { - pass "step-instruction at main" - } - timeout { - fail "step-instruction at main (timeout)" - } - } - send_gdb "222-exec-next-instruction\n" - gdb_expect { - -re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" { - pass "next-instruction at main" - } - timeout { - fail "next-instruction at main (timeout)" - } - } - send_gdb "333-exec-next-instruction\n" - gdb_expect { - -re "333\\^running\r\n${mi_gdb_prompt}333\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"3.\"\}\r\n$mi_gdb_prompt$" { - pass "next-instruction at main" - } - timeout { - fail "next-instruction at main (timeout)" - } - } -} - -test_running_to_main -test_stepi_nexti - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-until.exp b/gdb/testsuite/gdb.mi/mi1-until.exp deleted file mode 100644 index a036b937c68..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-until.exp +++ /dev/null @@ -1,127 +0,0 @@ -# Copyright 1999, 2000 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# Test Machine interface (MI) operations -# Verify that, using the MI, we can run a simple program and perform -# exec-until. - -# The goal is not to -# test gdb functionality, which is done by other tests, but to verify -# the correct output response to MI operations. -# - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "until" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} - -proc test_running_to_foo {} { - global mi_gdb_prompt - global hex - - mi_gdb_test "200-break-insert 10" \ - "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*until.c\",line=\"10\",times=\"0\"\}" \ - "break-insert operation" - - mi_run_cmd - - gdb_expect { - -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"10\"\}\r\n$mi_gdb_prompt$" { - pass "run to main" - } - -re ".*$mi_gdb_prompt$" { - fail "run to main (2)" - } - timeout { - fail "run to main (timeout)" - } - } - - mi_gdb_test "100-break-delete 1" "100\\^done" "break-delete 1" - -} - -proc test_until {} { - global mi_gdb_prompt - global hex - - send_gdb "111-exec-until\n" - gdb_expect { - -re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"12\"\}\r\n$mi_gdb_prompt$" { - pass "until after while loop" - } - timeout { - fail "until after while loop (timeout)" - } - } - - send_gdb "222-exec-until 15\n" - gdb_expect { - -re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"location-reached\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"15\"\}\r\n$mi_gdb_prompt$" { - pass "until line number" - } - timeout { - fail "until line number (timeout)" - } - } - - send_gdb "333-exec-until until.c:17\n" - gdb_expect { - -re "333\\^running\r\n${mi_gdb_prompt}333\\*stopped,reason=\"location-reached\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"17\"\}\r\n$mi_gdb_prompt$" { - pass "until line number:file" - } - timeout { - fail "until line number:file (timeout)" - } - } - - # This is supposed to NOT stop at line 25. It stops right after foo is over. - - send_gdb "444-exec-until until.c:25\n" - gdb_expect { - -re "444\\^running\r\n${mi_gdb_prompt}444\\*stopped,reason=\"location-reached\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*until.c\",line=\"24\"\}\r\n$mi_gdb_prompt$" { - pass "until after current function" - } - timeout { - fail "until after current function (timeout)" - } - } - -} - -test_running_to_foo -test_until - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-var-block.exp b/gdb/testsuite/gdb.mi/mi1-var-block.exp deleted file mode 100644 index 1478280334b..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-var-block.exp +++ /dev/null @@ -1,228 +0,0 @@ -# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. -# -# This Program Is Free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# Test essential Machine interface (MI) operations -# -# Verify that, using the MI, we can create, update, delete variables. -# - - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "var-cmd" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} - -mi_gdb_test "200-break-insert do_block_tests" \ - "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_block_tests\",file=\".*var-cmd.c\",line=\"154\",times=\"0\"\}" \ - "break-insert operation" - -mi_run_cmd -# The running part has been checked already by mi_run_cmd -gdb_expect { - -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"154\"\}\r\n$mi_gdb_prompt$" { - pass "run to do_block_tests" - } - -re ".*$mi_gdb_prompt$" {fail "run to do_block_tests (2)"} - timeout {fail "run to do_block_tests (timeout 2)"} -} - -# Test: c_variable-3.2 -# Desc: create cb and foo -mi_gdb_test "-var-create cb * cb" \ - "\\^done,name=\"cb\",numchild=\"0\",type=\"int\"" \ - "create local variable cb" - -mi_gdb_test "-var-create foo * foo" \ - "&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \ - "create local variable foo" - -# step to "foo = 123;" -send_gdb "-exec-step\n" -gdb_expect { - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"158\"\}\r\n$mi_gdb_prompt$" { - pass "step at do_block_tests" - } - timeout { - fail "step at do_block_tests (timeout)" - } -} - - -# Be paranoid and assume 3.2 created foo -mi_gdb_test "-var-delete foo" \ - "&\"Variable object not found\\\\n\".*\\^error,msg=\"Variable object not found\"" \ - "delete var foo" - - -# Test: c_variable-3.3 -# Desc: create foo -mi_gdb_test "-var-create foo * foo" \ - "\\^done,name=\"foo\",numchild=\"0\",type=\"int\"" \ - "create local variable foo" - -# step to "foo2 = 123;" -send_gdb "-exec-step\n" -gdb_expect { - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"161\"\}\r\n$mi_gdb_prompt$" { - pass "step at do_block_tests" - } - timeout { - fail "step at do_block_tests (timeout)" - } -} - -# Test: c_variable-3.4 -# Desc: check foo, cb changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"foo\",in_scope=\"true\",type_changed=\"false\",name=\"cb\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars: cb foo changed" - -# step to "foo = 321;" -send_gdb "-exec-step\n" -gdb_expect { - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"164\"\}\r\n$mi_gdb_prompt$" { - pass "step at do_block_tests" - } - timeout { - fail "step at do_block_tests (timeout)" - } -} - -# Test: c_variable-3.5 -# Desc: create inner block foo -mi_gdb_test "-var-create inner_foo * foo" \ - "\\^done,name=\"inner_foo\",numchild=\"0\",type=\"int\"" \ - "create local variable inner_foo" - -# step to "foo2 = 0;" -send_gdb "-exec-step\n" -gdb_expect { - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"166\"\}\r\n$mi_gdb_prompt$" { - pass "step at do_block_tests" - } - timeout { fail "step at do_block_tests (timeout)" } -} - -# Test: c_variable-3.6 -# Desc: create foo2 -mi_gdb_test "-var-create foo2 * foo2" \ - "\\^done,name=\"foo2\",numchild=\"0\",type=\"int\"" \ - "create local variable foo2" - -# Test: c_variable-3.7 -# Desc: check that outer foo in scope and inner foo out of scope -# Note: also a known gdb problem -setup_xfail *-*-* -mi_gdb_test "-var-update inner_foo" \ - "\\^done,changelist=\{FIXME\}" \ - "update inner_foo: should be out of scope: KNOWN PROBLEM" -clear_xfail *-*-* - -setup_xfail *-*-* -mi_gdb_test "-var-evaluate-expression inner_foo" \ - "\\^done,value=\{FIXME\}" \ - "evaluate inner_foo: should be out of scope: KNOWN PROBLEM" -clear_xfail *-*-* - -mi_gdb_test "-var-update foo" \ - "\\^done,changelist=\{\}" \ - "update foo: did not change" - -mi_gdb_test "-var-delete inner_foo" \ - "\\^done,ndeleted=\"1\"" \ - "delete var inner_foo" - -# step to "foo = 0;" -send_gdb "-exec-step\n" -gdb_expect { - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"168\"\}\r\n$mi_gdb_prompt$" { - pass "step at do_block_tests" - } - timeout { fail "step at do_block_tests (timeout)" } -} - -# Test: c_variable-3.8 -# Desc: check that foo2 out of scope (known gdb problem) -setup_xfail *-*-* -mi_gdb_test "-var-update foo2" \ - "\\^done,changelist=\{FIXME\}" \ - "update foo2: should be out of scope: KNOWN PROBLEM" -clear_xfail *-*-* - -# step to "cb = 21;" -send_gdb "-exec-step\n" -gdb_expect { - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"171\"\}\r\n$mi_gdb_prompt$" { - pass "step at do_block_tests" - } - timeout { fail "step at do_block_tests (timeout)" } -} - - -# Test: c_variable-3.9 -# Desc: check that only cb is in scope (known gdb problem) -setup_xfail *-*-* -mi_gdb_test "-var-update foo2" \ - "\\^done,changelist=\{FIXME\}" \ - "update foo2 should be out of scope: KNOWN PROBLEM" -clear_xfail *-*-* -setup_xfail *-*-* -mi_gdb_test "-var-update foo" \ - "\\^done,changelist=\{FIXME\}" \ - "update foo should be out of scope: KNOWN PROBLEM" -clear_xfail *-*-* -mi_gdb_test "-var-update cb" \ - "\\^done,changelist=\{\}" \ - "update cb" - -# Test: c_variable-3.10 -# Desc: names of editable variables -#gdbtk_test c_variable-3.10 {names of editable variables} { -# editable_variables -#} {{foo cb foo2} {}} - -# Done with block tests -mi_gdb_test "-var-delete foo" \ - "\\^done,ndeleted=\"1\"" \ - "delete var foo" - -mi_gdb_test "-var-delete foo2" \ - "\\^done,ndeleted=\"1\"" \ - "delete var foo2" - -mi_gdb_test "-var-delete cb" \ - "\\^done,ndeleted=\"1\"" \ - "delete var cb" - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-var-child.exp b/gdb/testsuite/gdb.mi/mi1-var-child.exp deleted file mode 100644 index 92ae3819277..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-var-child.exp +++ /dev/null @@ -1,1203 +0,0 @@ -# Copyright (C) 1999, 2000, 2002 Free Software Foundation - -# This Program Is Free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# Test essential Machine interface (MI) operations -# -# Verify that, using the MI, we can create, update, delete variables. -# - - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "var-cmd" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} - -mi_runto do_children_tests - -##### ##### -# # -# children tests # -# # -##### ##### - - -# Test: c_variable-4.2 -# Desc: create variable "struct_declarations" -mi_gdb_test "-var-create struct_declarations * struct_declarations" \ - "\\^done,name=\"struct_declarations\",numchild=\"11\",type=\"struct _struct_decl\"" \ - "create local variable struct_declarations" - -# Test: c_variable-4.3 -# Desc: children of struct_declarations -# STABS doesn't give us argument types for the func ptr structs, but -# Dwarf 2 does. -mi_gdb_test "-var-list-children struct_declarations" \ - "\\^done,numchild=\"11\",children=\{child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \ - "get children of struct_declarations" - -#gdbtk_test c_variable-4.3 {children of struct_declarations} { -# get_children struct_declarations -#} {integer character char_ptr long_int int_ptr_ptr long_array func_ptr func_ptr_struct func_ptr_ptr u1 s2} - -# Test: c_variable-4.4 -# Desc: number of children of struct_declarations -mi_gdb_test "-var-info-num-children struct_declarations" \ - "\\^done,numchild=\"11\"" \ - "get number of children of struct_declarations" - -# Test: c_variable-4.5 -# Desc: children of struct_declarations.integer -mi_gdb_test "-var-list-children struct_declarations.integer" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.integer" - -# Test: c_variable-4.6 -# Desc: number of children of struct_declarations.integer -mi_gdb_test "-var-info-num-children struct_declarations.integer" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.integer" - -# Test: c_variable-4.7 -# Desc: children of struct_declarations.character -mi_gdb_test "-var-list-children struct_declarations.character" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.character" - -# Test: c_variable-4.8 -# Desc: number of children of struct_declarations.character -mi_gdb_test "-var-info-num-children struct_declarations.character" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.character" - -# Test: c_variable-4.9 -# Desc: children of struct_declarations.char_ptr -mi_gdb_test "-var-list-children struct_declarations.char_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"0\",type=\"char\"\}\}" \ - "get children of struct_declarations.char_ptr" - -# Test: c_variable-4.10 -# Desc: number of children of struct_declarations.char_ptr -mi_gdb_test "-var-info-num-children struct_declarations.char_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of struct_declarations.char_ptr" - -# Test: c_variable-4.11 -# Desc: children of struct_declarations.long_int -mi_gdb_test "-var-list-children struct_declarations.long_int" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_int" - -# Test: c_variable-4.12 -# Desc: number of children of struct_declarations.long_int -mi_gdb_test "-var-info-num-children struct_declarations.long_int" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_int" - -# Test: c_variable-4.13 -# Desc: children of int_ptr_ptr -mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \ - "get children of struct_declarations.int_ptr_ptr" - -#gdbtk_test c_variable-4.13 {children of int_ptr_ptr} { -# get_children struct_declarations.int_ptr_ptr -#} {*int_ptr_ptr} - -# Test: c_variable-4.14 -# Desc: number of children of int_ptr_ptr -mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of struct_declarations.int_ptr_ptr" - - -# Test: c_variable-4.15 -# Desc: children of struct_declarations.long_array -mi_gdb_test "-var-list-children struct_declarations.long_array" \ - "\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \ - "get children of struct_declarations.long_array" - -# Test: c_variable-4.16 -# Desc: number of children of struct_declarations.long_array -mi_gdb_test "-var-info-num-children struct_declarations.long_array" \ - "\\^done,numchild=\"10\"" \ - "get number of children of struct_declarations.long_array" - -# Test: c_variable-4.17 -# Desc: children of struct_declarations.func_ptr -mi_gdb_test "-var-list-children struct_declarations.func_ptr" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.func_ptr" - - -# Test: c_variable-4.18 -# Desc: number of children of struct_declarations.func_ptr -mi_gdb_test "-var-info-num-children struct_declarations.func_ptr" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.func_ptr" - - -# Test: c_variable-4.19 -# Desc: children of struct_declarations.func_ptr_struct -mi_gdb_test "-var-list-children struct_declarations.func_ptr_struct" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.func_ptr_struct" - -# Test: c_variable-4.20 -# Desc: number of children of struct_declarations.func_ptr_struct -mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_struct" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.func_ptr_struct" - - -# Test: c_variable-4.21 -# Desc: children of struct_declarations.func_ptr_ptr -mi_gdb_test "-var-list-children struct_declarations.func_ptr_ptr" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.func_ptr_ptr" - -# Test: c_variable-4.22 -# Desc: number of children of struct_declarations.func_ptr_ptr -mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_ptr" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.func_ptr_ptr" - - -# Test: c_variable-4.23 -# Desc: children of struct_declarations.u1 -mi_gdb_test "-var-list-children struct_declarations.u1" \ - "\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.u1.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.u1.b\",exp=\"b\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.u1.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.u1.d\",exp=\"d\",numchild=\"0\",type=\"enum foo\"\}\}" \ - "get children of struct_declarations.u1" - -# Test: c_variable-4.24 -# Desc: number of children of struct_declarations.u1 -mi_gdb_test "-var-info-num-children struct_declarations.u1" \ - "\\^done,numchild=\"4\"" \ - "get number of children of struct_declarations.u1" - -# Test: c_variable-4.25 -# Desc: children of struct_declarations.s2 -mi_gdb_test "-var-list-children struct_declarations.s2" \ - "\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.s2.u2\",exp=\"u2\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.g\",exp=\"g\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.h\",exp=\"h\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.i\",exp=\"i\",numchild=\"10\",type=\"long int \\\[10\\\]\"\}\}" \ - "get children of struct_declarations.s2" -#gdbtk_test c_variable-4.25 {children of struct_declarations.s2} { -# get_children struct_declarations.s2 -#} {u2 g h i} - -# Test: c_variable-4.26 -# Desc: number of children of struct_declarations.s2 -mi_gdb_test "-var-info-num-children struct_declarations.s2" \ - "\\^done,numchild=\"4\"" \ - "get number of children of struct_declarations.s2" - - -# Test: c_variable-4.27 -# Desc: children of struct_declarations.long_array.1 -mi_gdb_test "-var-list-children struct_declarations.long_array.1" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.1" - -# Test: c_variable-4.28 -# Desc: number of children of struct_declarations.long_array.1 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.1" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.1" - -# Test: c_variable-4.29 -# Desc: children of struct_declarations.long_array.2 -mi_gdb_test "-var-list-children struct_declarations.long_array.2" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.2" - -# Test: c_variable-4.30 -# Desc: number of children of struct_declarations.long_array.2 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.2" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.2" - -# Test: c_variable-4.31 -# Desc: children of struct_declarations.long_array.3 -mi_gdb_test "-var-list-children struct_declarations.long_array.3" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.3" - -# Test: c_variable-4.32 -# Desc: number of children of struct_declarations.long_array.3 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.3" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.3" - -# Test: c_variable-4.33 -# Desc: children of struct_declarations.long_array.4 -mi_gdb_test "-var-list-children struct_declarations.long_array.4" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.4" - -# Test: c_variable-4.34 -# Desc: number of children of struct_declarations.long_array.4 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.4" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.4" - -# Test: c_variable-4.35 -# Desc: children of struct_declarations.long_array.5 -mi_gdb_test "-var-list-children struct_declarations.long_array.5" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.5" - -# Test: c_variable-4.36 -# Desc: number of children of struct_declarations.long_array.5 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.5" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.5" - -# Test: c_variable-4.37 -# Desc: children of struct_declarations.long_array.6 -mi_gdb_test "-var-list-children struct_declarations.long_array.6" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.6" - -# Test: c_variable-4.38 -# Desc: number of children of struct_declarations.long_array.6 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.6" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.6" - -# Test: c_variable-4.39 -# Desc: children of struct_declarations.long_array.7 -mi_gdb_test "-var-list-children struct_declarations.long_array.7" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.7" - -# Test: c_variable-4.40 -# Desc: number of children of struct_declarations.long_array.7 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.7" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.7" - -# Test: c_variable-4.41 -# Desc: children of struct_declarations.long_array.8 -mi_gdb_test "-var-list-children struct_declarations.long_array.8" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.8" - -# Test: c_variable-4.42 -# Desc: number of children of struct_declarations.long_array.8 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.8" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.8" - - -# Test: c_variable-4.43 -# Desc: children of struct_declarations.long_array.9 -mi_gdb_test "-var-list-children struct_declarations.long_array.9" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.9" - -# Test: c_variable-4.44 -# Desc: number of children of struct_declarations.long_array.9 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.9" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.9" - -# Test: c_variable-4.45 -# Desc: children of struct_declarations.u1.a -mi_gdb_test "-var-list-children struct_declarations.u1.a" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.u1.a" - -# Test: c_variable-4.46 -# Desc: number of children of struct_declarations.u1.a -mi_gdb_test "-var-info-num-children struct_declarations.u1.a" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.u1.a" - -# Test: c_variable-4.47 -# Desc: children of struct_declarations.u1.b -mi_gdb_test "-var-list-children struct_declarations.u1.b" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.u1.b.\\*b\",exp=\"\\*b\",numchild=\"0\",type=\"char\"\}\}" \ - "get children of struct_declarations.u1.b" - -# Test: c_variable-4.48 -# Desc: number of children of struct_declarations.u1.b -mi_gdb_test "-var-info-num-children struct_declarations.u1.b" \ - "\\^done,numchild=\"1\"" \ - "get number of children of struct_declarations.u1.b" - -# Test: c_variable-4.49 -# Desc: children of struct_declarations.u1.c -mi_gdb_test "-var-list-children struct_declarations.u1.c" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.u1.c" - -# Test: c_variable-4.50 -# Desc: number of children of struct_declarations.u1.c -mi_gdb_test "-var-info-num-children struct_declarations.u1.c" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.u1.c" - -# Test: c_variable-4.51 -# Desc: children of struct_declarations.u1.d -mi_gdb_test "-var-list-children struct_declarations.u1.d" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.u1.d" - - -# Test: c_variable-4.52 -# Desc: number of children of struct_declarations.u1.d -mi_gdb_test "-var-info-num-children struct_declarations.u1.d" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.u1.d" - - -# Test: c_variable-4.53 -# Desc: children of struct_declarations.s2.u2 -mi_gdb_test "-var-list-children struct_declarations.s2.u2" \ - "\\^done,numchild=\"3\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1\",exp=\"u1s1\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.u2.f\",exp=\"f\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.u2.u1s2\",exp=\"u1s2\",numchild=\"2\",type=\"struct \{\\.\\.\\.\}\"\}\}" \ - "get children of struct_declarations.s2.u2" - -# Test: c_variable-4.54 -# Desc: number of children of struct_declarations.s2.u2 -mi_gdb_test "-var-info-num-children struct_declarations.s2.u2" \ - "\\^done,numchild=\"3\"" \ - "get number of children of struct_declarations.s2.u2" - -# Test: c_variable-4.55 -# Desc: children of struct_declarations.s2.g -mi_gdb_test "-var-list-children struct_declarations.s2.g" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.s2.g" - -# Test: c_variable-4.56 -# Desc: number of children of struct_declarations.s2.g -mi_gdb_test "-var-info-num-children struct_declarations.s2.g" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.s2.g" - - -# Test: c_variable-4.57 -# Desc: children of struct_declarations.s2.h -mi_gdb_test "-var-list-children struct_declarations.s2.h" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.s2.h" - -# Test: c_variable-4.58 -# Desc: number of children of struct_declarations.s2.h -mi_gdb_test "-var-info-num-children struct_declarations.s2.h" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.s2.h" - - -# Test: c_variable-4.59 -# Desc: children of struct_declarations.s2.i -mi_gdb_test "-var-list-children struct_declarations.s2.i" \ - "\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.s2.i.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \ - "get children of struct_declarations.s2.i" - -# Test: c_variable-4.60 -# Desc: number of children of struct_declarations.s2.i -mi_gdb_test "-var-info-num-children struct_declarations.s2.i" \ - "\\^done,numchild=\"10\"" \ - "get number of children of struct_declarations.s2.i" - -# Test: c_variable-4.61 -# Desc: children of struct_declarations.s2.u2.u1s1 -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1" \ - "\\^done,numchild=\"4\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1.d\",exp=\"d\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e\",exp=\"e\",numchild=\"10\",type=\"char \\\[10\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.func\",exp=\"func\",numchild=\"0\",type=\"int \\*\\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.foo\",exp=\"foo\",numchild=\"0\",type=\"efoo\"\}\}" \ - "get children of struct_declarations.s2.u2.u1s1" - -# Test: c_variable-4.62 -# Desc: number of children of struct_declarations.s2.u2.u1s1 -mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1" \ - "\\^done,numchild=\"4\"" \ - "get number of children of struct_declarations.s2.u2.u1s1" - -# Test: c_variable-4.63 -# Desc: children of struct_declarations.s2.u2.f -mi_gdb_test "-var-list-children struct_declarations.s2.u2.f" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.s2.u2.f" - -# Test: c_variable-4.64 -# Desc: number of children of struct_declarations.s2.u2.f -mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.f" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.s2.u2.f" - -# Test: c_variable-4.65 -# Desc: children of struct_declarations.s2.u2.u1s2 -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2" \ - "\\^done,numchild=\"2\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr\",exp=\"array_ptr\",numchild=\"2\",type=\"char \\\[2\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s2.func\",exp=\"func\",numchild=\"0\",type=\"int \\(\\*\\)\\((int, char \\*)?\\)\"\}\}" \ - "get children of struct_declarations.s2.u2.u1s2" - -# Test: c_variable-4.66 -# Desc: number of children of struct_declarations.s2.u2.u1s2 -mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2" \ - "\\^done,numchild=\"2\"" \ - "get number of children of struct_declarations.s2.u2.u1s2" - -# Test: c_variable-4.67 -# Desc: children of struct_declarations.s2.u2.u1s1.d -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.d" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.s2.u2.u1s1.d" - -# Test: c_variable-4.68 -# Desc: number of children of struct_declarations.s2.u2.u1s1.d -mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.d" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.s2.u2.u1s1.d" - -# Test: c_variable-4.69 -# Desc: children of struct_declarations.s2.u2.u1s1.e -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.e" \ - "\\^done,numchild=\"10\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s1.e.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.1\",exp=\"1\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.2\",exp=\"2\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s1.e.3\",exp=\"3\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.4\",exp=\"4\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.5\",exp=\"5\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.6\",exp=\"6\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.7\",exp=\"7\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.8\",exp=\"8\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.9\",exp=\"9\",numchild=\"0\",type=\"char\"\}\}" \ - "get children of struct_declarations.s2.u2.u1s1.e" - -# Test: c_variable-4.70 -# Desc: number of children of struct_declarations.s2.u2.u1s1.e -mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.e" \ - "\\^done,numchild=\"10\"" \ - "get number of children of struct_declarations.s2.u2.u1s1.e" - - -# Test: c_variable-4.71 -# Desc: children of struct_declarations.s2.u2.u1s1.func -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.func" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.s2.u2.u1s1.func" - -# Test: c_variable-4.72 -# Desc: number of children of struct_declarations.s2.u2.u1s1.func -mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.func" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.s2.u2.u1s1.func" - - -# Test: c_variable-4.73 -# Desc: children of struct_declarations.s2.u2.u1s1.foo -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.foo" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.s2.u2.u1s1.foo" - -# Test: c_variable-4.74 -# Desc: number of children of struct_declarations.s2.u2.u1s1.foo -mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.foo" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.s2.u2.u1s1.foo" - - -# Test: c_variable-4.75 -# Desc: children of struct_declarations.s2.u2.u1s2.array_ptr -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.array_ptr" \ - "\\^done,numchild=\"2\",children=\{child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s2.array_ptr.1\",exp=\"1\",numchild=\"0\",type=\"char\"\}\}" \ - "get children of struct_declarations.s2.u2.u1s2.array_ptr" - -# Test: c_variable-4.76 -# Desc: number of children of struct_declarations.s2.u2.u1s2.array_ptr -mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.array_ptr" \ - "\\^done,numchild=\"2\"" \ - "get number of children of struct_declarations.s2.u2.u1s2.array_ptr" - -# Test: c_variable-4.77 -# Desc: children of struct_declarations.s2.u2.u1s2.func -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.func" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.s2.u2.u1s2.func" - -# Test: c_variable-4.78 -# Desc: number of children of struct_declarations.s2.u2.u1s2.func -mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.func" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.s2.u2.u1s2.func" - -# Test: c_variable-4.79 -# Desc: children of struct_declarations.int_ptr_ptr.*int_ptr_ptr -mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \ - "get children of struct_declarations.int_ptr_ptr.*int_ptr_ptr" -#} {**int_ptr_ptr} - -# Test: c_variable-4.80 -# Desc: Number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr -mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr" - - -# Step to "struct_declarations.integer = 123;" -set line 192 -mi_step_to do_children_tests {} {.*var-cmd.c} $line "step to line $line" - -# Test: c_variable-4.81 -# Desc: create local variable "weird" -mi_gdb_test "-var-create weird * weird" \ - "\\^done,name=\"weird\",numchild=\"11\",type=\"weird_struct \\*\"" \ - "create local variable weird" - -# Test: c_variable-4.82 -# Desc: children of weird -mi_gdb_test "-var-list-children weird" \ - "\\^done,numchild=\"11\",children=\{child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \ - "get children of weird" - -# Test: c_variable-4.83 -# Desc: number of children of weird -mi_gdb_test "-var-info-num-children weird" \ - "\\^done,numchild=\"11\"" \ - "get number of children of weird" - - -# Test: c_variable-4.84 -# Desc: children of weird->long_array -mi_gdb_test "-var-list-children weird.long_array" \ - "\\^done,numchild=\"10\",children=\{child=\{name=\"weird.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\}" \ - "get children of weird.long_array" -#gdbtk_test c_variable-4.84 {children of weird->long_array} { -# get_children weird.long_array -#} {0 1 2 3 4 5 6 7 8 9} - -# Test: c_variable-4.85 -# Desc: number of children of weird.long_array -mi_gdb_test "-var-info-num-children weird.long_array" \ - "\\^done,numchild=\"10\"" \ - "get number of children of weird.long_array" - -# Test: c_variable-4.86 -# Desc: children of weird.int_ptr_ptr -mi_gdb_test "-var-list-children weird.int_ptr_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \ - "get children of weird.int_ptr_ptr" -#gdbtk_test c_variable-4.86 {children of weird->int_ptr_ptr} { -# get_children weird.int_ptr_ptr -#} {*int_ptr_ptr} - -# Test: c_variable-4.87 -# Desc: number of children of weird.int_ptr_ptr -mi_gdb_test "-var-info-num-children weird.int_ptr_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of weird.int_ptr_ptr" - -# Test: c_variable-4.88 -# Desc: children of *weird->int_ptr_ptr -mi_gdb_test "-var-list-children weird.int_ptr_ptr.*int_ptr_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \ - "get children of weird.int_ptr_ptr.*int_ptr_ptr" -#gdbtk_test c_variable-4.88 {children of *weird->int_ptr_ptr} { -# get_children weird.int_ptr_ptr.*int_ptr_ptr -#} {**int_ptr_ptr} - -# Test: c_variable-4.89 -# Desc: number of children *weird->int_ptr_ptr -mi_gdb_test "-var-info-num-children weird.int_ptr_ptr.*int_ptr_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of weird.int_ptr_ptr.*int_ptr_ptr" - -# Test: c_variable-4.90 -# Desc: create weird->int_ptr_ptr -mi_gdb_test "-var-create weird->int_ptr_ptr * weird->int_ptr_ptr" \ - "\\^done,name=\"weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"" \ - "create local variable weird->int_ptr_ptr" - -# Test: c_variable-4.91 -# Desc: children of weird->int_ptr_ptr -mi_gdb_test "-var-list-children weird->int_ptr_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",exp=\"\\*weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\}" \ - "get children of weird->int_ptr_ptr" - - -# Test: c_variable-4.92 -# Desc: number of children of (weird->int_ptr_ptr) -mi_gdb_test "-var-info-num-children weird->int_ptr_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of weird->int_ptr_ptr" - -# Test: c_variable-4.93 -# Desc: children of *(weird->int_ptr_ptr) -mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",exp=\"\\*\\*weird->int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\}" \ - "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr" - -# Test: c_variable-4.94 -# Desc: number of children of *(weird->int_ptr_ptr) -mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr" - -# Test: c_variable-4.95 -# Desc: children of *(*(weird->int_ptr_ptr)) -mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \ - "\\^done,numchild=\"0\"" \ - "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" - -# Test: c_variable-4.96 -# Desc: number of children of *(*(weird->int_ptr_ptr)) -mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \ - "\\^done,numchild=\"0\"" \ - "get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" - -# Test: c_variable-4.97 -# Desc: is weird editable -mi_gdb_test "-var-show-attributes weird" \ - "\\^done,attr=\"editable\"" \ - "is weird editable" - -# Test: c_variable-4.98 -# Desc: is weird->int_ptr_ptr editable -mi_gdb_test "-var-show-attributes weird->int_ptr_ptr" \ - "\\^done,attr=\"editable\"" \ - "is weird->int_ptr_ptr editable" - -# Test: c_variable-4.99 -# Desc: is *(weird->int_ptr_ptr) editable -mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr" \ - "\\^done,attr=\"editable\"" \ - "is weird.int_ptr_ptr.*int_ptr_ptr editable" - -# Test: c_variable-4.100 -# Desc: is *(*(weird->int_ptr_ptr)) editable -mi_gdb_test "-var-show-attributes weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr" \ - "\\^done,attr=\"editable\"" \ - "is weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr editable" - -# Test: c_variable-4.101 -# Desc: is weird->u1 editable -mi_gdb_test "-var-show-attributes weird.u1" \ - "\\^done,attr=\"noneditable\"" \ - "is weird.u1 editable" - -# Test: c_variable-4.102 -# Desc: is weird->s2 editable -mi_gdb_test "-var-show-attributes weird.s2" \ - "\\^done,attr=\"noneditable\"" \ - "is weird.s2 editable" - -# Test: c_variable-4.103 -# Desc: is struct_declarations.u1.a editable -mi_gdb_test "-var-show-attributes struct_declarations.u1.a" \ - "\\^done,attr=\"editable\"" \ - "is struct_declarations.u1.a editable" - -# Test: c_variable-4.104 -# Desc: is struct_declarations.u1.b editable -mi_gdb_test "-var-show-attributes struct_declarations.u1.b" \ - "\\^done,attr=\"editable\"" \ - "is struct_declarations.u1.b editable" - -# Test: c_variable-4.105 -# Desc: is struct_declarations.u1.c editable -mi_gdb_test "-var-show-attributes struct_declarations.u1.c" \ - "\\^done,attr=\"editable\"" \ - "is struct_declarations.u1.c editable" - -# Test: c_variable-4.106 -# Desc: is struct_declarations.long_array editable -mi_gdb_test "-var-show-attributes struct_declarations.long_array" \ - "\\^done,attr=\"noneditable\"" \ - "is struct_declarations.long_array editable" - -# Test: c_variable-4.107 -# Desc: is struct_declarations.long_array[0] editable -mi_gdb_test "-var-show-attributes struct_declarations.long_array.0" \ - "\\^done,attr=\"editable\"" \ - "is struct_declarations.long_array.0 editable" - -# Test: c_variable-4.108 -# Desc: is struct_declarations editable -mi_gdb_test "-var-show-attributes struct_declarations" \ - "\\^done,attr=\"noneditable\"" \ - "is struct_declarations editable" - -mi_gdb_test "-var-delete weird" \ - "\\^done,ndeleted=\"24\"" \ - "delete var weird" - -##### ##### -# # -# children and update tests # -# # -##### ##### - -# Test: c_variable-5.1 -# Desc: check that nothing changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{\}" \ - "update all vars. None changed" - -# Step over "struct_declarations.integer = 123;" -set line 193 -mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" - -# Test: c_variable-5.2 -# Desc: check that integer changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"struct_declarations.integer\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars struct_declarations.integer" - -# Step over: -# weird->char_ptr = "hello"; -# bar = 2121; -# foo = &bar; -set line 196 -mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line" - -# Test: c_variable-5.3 -# Desc: check that char_ptr changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars struct_declarations.char_ptr" - -# Step over "struct_declarations.int_ptr_ptr = &foo;" -set line 197 -mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" - -# Test: c_variable-5.4 -# Desc: check that int_ptr_ptr and children changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars int_ptr_ptr and children changed" - -# Step over "weird->long_array[0] = 1234;" -set line 198 -mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" - -# Test: c_variable-5.5 -# Desc: check that long_array[0] changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"struct_declarations.long_array.0\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars struct_declarations.long_array.0 changed" - -# Step over "struct_declarations.long_array[1] = 2345;" -set line 199 -mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" - -# Test: c_variable-5.6 -# Desc: check that long_array[1] changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"struct_declarations.long_array.1\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars struct_declarations.long_array.1 changed" - -# Step over "weird->long_array[2] = 3456;" -set line 200 -mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" - -# Test: c_variable-5.7 -# Desc: check that long_array[2] changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"struct_declarations.long_array.2\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars struct_declarations.long_array.2 changed" - -# Step over: -# struct_declarations.long_array[3] = 4567; -# weird->long_array[4] = 5678; -# struct_declarations.long_array[5] = 6789; -# weird->long_array[6] = 7890; -# struct_declarations.long_array[7] = 8901; -# weird->long_array[8] = 9012; -# struct_declarations.long_array[9] = 1234; -set line 208 -mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line" - -# Test: c_variable-5.8 -# Desc: check that long_array[3-9] changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"struct_declarations.long_array.3\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.4\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.5\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.6\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.7\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.8\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.9\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars struct_declarations.long_array.3-9 changed" - - -# Step over "weird->func_ptr = nothing;" -set line 211 -mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" - -# Test: c_variable-5.9 -# Desc: check that func_ptr changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"struct_declarations.func_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars struct_declarations.func_ptr changed" - -# Delete all variables -mi_gdb_test "-var-delete struct_declarations" \ - "\\^done,ndeleted=\"65\"" \ - "delete var struct_declarations" - -mi_gdb_test "-var-delete weird->int_ptr_ptr" \ - "\\^done,ndeleted=\"3\"" \ - "delete var weird->int_ptr_ptr" - -# Step over all lines: -# ... -# psnp = &snp0; -set line 254 -mi_execute_to "exec-step 43" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line" - -# Test: c_variable-5.10 -# Desc: create psnp->char_ptr -mi_gdb_test "-var-create psnp->char_ptr * psnp->char_ptr" \ - "\\^done,name=\"psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"" \ - "create local variable psnp->char_ptr" - -# Test: c_variable-5.11 -# Desc: children of psnp->char_ptr -mi_gdb_test "-var-list-children psnp->char_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr\",exp=\"\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\}" \ - "get children of psnp->char_ptr" - -# Test: c_variable-5.12 -# Desc: number of children of psnp->char_ptr -mi_gdb_test "-var-info-num-children psnp->char_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of psnp->char_ptr" - -# Test: c_variable-5.13 -# Desc: children of *(psnp->char_ptr) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",exp=\"\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\}" \ - "get children of psnp->char_ptr.*psnp->char_ptr" - -# Test: c_variable-5.14 -# Desc: number of children of *(psnp->char_ptr) -mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of psnp->char_ptr.*psnp->char_ptr" - -# Test: c_variable-5.15 -# Desc: children of *(*(psnp->char_ptr)) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\"\}\}" \ - "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" - -# Test: c_variable-5.15B -# Desc: children of *(*(*(psnp->char_ptr))) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\}" \ - "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" - -# Test: c_variable-5.16 -# Desc: number of children of *(*(psnp->char_ptr)) -mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" - -# Test: c_variable-5.17 -# Desc: children of *(*(*(psnp->char_ptr))) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\}" \ - "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" - -# Test: c_variable-5.18 -# Desc: number of children of *(*(*(psnp->char_ptr))) -mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" - -# Test: c_variable-5.17B -# Desc: children of *(*(*(*(psnp->char_ptr)))) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" \ - "\\^done,numchild=\"0\"" \ - "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" - -# Test: c_variable-5.18B -# Desc: number of children of *(*(*(*(psnp->char_ptr)))) -mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" \ - "\\^done,numchild=\"0\"" \ - "get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" - - -# Test: c_variable-5.19 -# Desc: create psnp->long_ptr -mi_gdb_test "-var-create psnp->long_ptr * psnp->long_ptr" \ - "\\^done,name=\"psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"" \ - "create local variable psnp->long_ptr" - -# Test: c_variable-5.20 -# Desc: children of psnp->long_ptr -mi_gdb_test "-var-list-children psnp->long_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",exp=\"\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\"\}\}" \ - "get children of psnp->long_ptr" - -# Test: c_variable-5.21 -# Desc: number of children of psnp->long_ptr -mi_gdb_test "-var-info-num-children psnp->long_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of psnp->long_ptr" - -# Test: c_variable-5.22 -# Desc: children of *(psnp->long_ptr) -mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",exp=\"\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\"\}\}" \ - "get children of psnp->long_ptr.*psnp->long_ptr" - - -# Test: c_variable-5.23 -# Desc: number of children of *(psnp->long_ptr) -mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of psnp->long_ptr.*psnp->long_ptr" - -# Test: c_variable-5.24 -# Desc: children of *(*(psnp->long_ptr)) -mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\"\}\}" \ - "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" - -# Test: c_variable-5.25 -# Desc: number of children of *(*(psnp->long_ptr)) -mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" - -# Test: c_variable-5.26 -# Desc: children of *(*(*(psnp->long_ptr))) -mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*\\*psnp->long_ptr\",numchild=\"0\",type=\"long int\"\}\}" \ - "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" - -# Test: c_variable-5.27 -# Desc: number of children of *(*(*(psnp->long_ptr))) -mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" - -# Test: c_variable-5.28 -# Desc: children of *(*(*(*(psnp->long_ptr)))) -mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" \ - "\\^done,numchild=\"0\"" \ - "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" - -# Test: c_variable-5.29 -# Desc: number of children of *(*(*(*(psnp->long_ptr)))) -mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" \ - "\\^done,numchild=\"0\"" \ - "get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" - -# Test: c_variable-5.30 -# Desc: create psnp->ptrs -mi_gdb_test "-var-create psnp->ptrs * psnp->ptrs" \ - "\\^done,name=\"psnp->ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"" \ - "create local variable psnp->ptrs" - -# Test: c_variable-5.31 -# Desc: children of psnp->ptrs -mi_gdb_test "-var-list-children psnp->ptrs" \ - "\\^done,numchild=\"3\",children=\{child=\{name=\"psnp->ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \ - "get children of psnp->ptrs" - -# Test: c_variable-5.32 -# Desc: number of children of psnp->ptrs -mi_gdb_test "-var-info-num-children psnp->ptrs" \ - "\\^done,numchild=\"3\"" \ - "get number of children of psnp->ptrs" - -# Test: c_variable-5.33 -# Desc: children of psnp->ptrs[0] -mi_gdb_test "-var-list-children psnp->ptrs.0" \ - "\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \ - "get children of psnp->ptrs.0" - -# Test: c_variable-5.34 -# Desc: number of children of psnp->ptrs[0] -mi_gdb_test "-var-info-num-children psnp->ptrs.0" \ - "\\^done,numchild=\"4\"" \ - "get number of children of psnp->ptrs.0" - -# Test: c_variable-5.35 -# Desc: children of psnp->ptrs[0]->next -mi_gdb_test "-var-list-children psnp->ptrs.0.next" \ - "\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \ - "get children of psnp->ptrs.0.next" - -#} {char_ptr long_ptr ptrs next} - -# Test: c_variable-5.36 -# Desc: number of children of psnp->ptrs[0]->next -mi_gdb_test "-var-info-num-children psnp->ptrs.0.next" \ - "\\^done,numchild=\"4\"" \ - "get number of children of psnp->ptrs.0.next" - - -# Test: c_variable-5.37 -# Desc: children of psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\}" \ - "get children of psnp->ptrs.0.next.char_ptr" - -#gdbtk_test c_variable-5.37 {children of psnp->ptrs[0]->next->char_ptr} { -# get_children psnp->ptrs.0.next.char_ptr -#} {*char_ptr} - -# Test: c_variable-5.38 -# Desc: number of children of psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of psnp->ptrs.0.next.char_ptr" - -# Test: c_variable-5.39 -# Desc: children of *psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",exp=\"\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\}" \ - "get children of psnp->ptrs.0.next.char_ptr.*char_ptr" - -# Test: c_variable-5.40 -# Desc: number of children of *psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr" - -# Test: c_variable-5.41 -# Desc: children of **psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\"\}\}" \ - "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" - -# Test: c_variable-5.41B -# Desc: children of ***psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\}" \ - "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" - -# Test: c_variable-5.42 -# Desc: number of children of **psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" - -# Test: c_variable-5.43 -# Desc: children of ***psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \ - "\\^done,numchild=\"1\",children=\{child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\}" \ - "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" - -# Test: c_variable-5.44 -# Desc: number of children of ***psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \ - "\\^done,numchild=\"1\"" \ - "get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" - -# Test: c_variable-5.43B -# Desc: children of ****psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \ - "\\^done,numchild=\"0\"" \ - "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" - -# Test: c_variable-5.44B -# Desc: number of children of ****psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \ - "\\^done,numchild=\"0\"" \ - "get number of children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" - -# Test: c_variable-5.45 -# Desc: children of psnp->ptrs[0]->next->next -mi_gdb_test "-var-list-children psnp->ptrs.0.next.next" \ - "\\^done,numchild=\"4\",children=\{child=\{name=\"psnp->ptrs.0.next.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \ - "get children of psnp->ptrs.0.next.next" - -# Test: c_variable-5.46 -# Desc: children of psnp->ptrs[0]->next->next->ptrs -mi_gdb_test "-var-list-children psnp->ptrs.0.next.next.ptrs" \ - "\\^done,numchild=\"3\",children=\{child=\{name=\"psnp->ptrs.0.next.next.ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\}" \ - "get children of psnp->ptrs.0.next.next.ptrs" - -# Step over "snp0.char_ptr = &b3;" -set line 255 -mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" - -# Test: c_variable-5.47 -# Desc: check that psnp->char_ptr (and [0].char_ptr) changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars psnp->char_ptr (and 0.char_ptr) changed" - -# Step over "snp1.char_ptr = &c3;" -set line 256 -mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" - -# Test: c_variable-5.48 -# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars psnp->next->char_ptr (and 1.char_ptr) changed" - - -# Step over "snp2.char_ptr = &a3;" -set line 257 -mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" - -# Test: c_variable-5.49 -# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars psnp->next->next->char_ptr (and 2.char_ptr) changed" - - -# Step over "snp0.long_ptr = &y3;" -set line 258 -mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" - -# Test: c_variable-5.50 -# Desc: check that psnp->long_ptr (and [0].long_ptr) changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"psnp->ptrs.0.long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars psnp->long_ptr (and 0.long_ptr) changed" - - -# Step over "snp1.long_ptr = &x3;" -set line 259 -mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" - -# Test: c_variable-5.51 -# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed -# Why does this have a FIXME? -setup_xfail *-*-* -mi_gdb_test "-var-update *" \ - "FIXME\\^done,changelist=\{name=\"psnp->ptrs.0.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars psnp->next->long_ptr (and 1.long_ptr) changed" -clear_xfail *-*-* - -# This command produces this error message: -# &"warning: varobj_list: assertion failed - mycount <> 0\n" -# - -# Step over "snp2.long_ptr = &z3;" -set line 260 -mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" - -# Test: c_variable-5.52 -# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars psnp->next->next->long_ptr (and 2.long_ptr) changed" - - - - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-var-cmd.exp b/gdb/testsuite/gdb.mi/mi1-var-cmd.exp deleted file mode 100644 index 4ca8d16d5f8..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-var-cmd.exp +++ /dev/null @@ -1,552 +0,0 @@ -# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. -# -# This Program Is Free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# Test essential Machine interface (MI) operations -# -# Verify that, using the MI, we can create, update, delete variables. -# - - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "var-cmd" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} - - -##### ##### -# # -# Variable Creation tests # -# # -##### ##### - -# Test: c_variable-1.1 -# Desc: Create global variable - -mi_gdb_test "111-var-create global_simple * global_simple" \ - "111\\^done,name=\"global_simple\",numchild=\"6\",type=\"simpleton\"" \ - "create global variable" - -# Test: c_variable-1.2 -# Desc: Create non-existent variable - -mi_gdb_test "112-var-create bogus_unknown_variable * bogus_unknown_variable" \ - "&\"mi_cmd_var_create: unable to create variable object\\\\n\".*112\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \ - "create non-existent variable" - -# Test: c_variable-1.3 -# Desc: Create out of scope variable - -mi_gdb_test "113-var-create argc * argc" \ - "&\"mi_cmd_var_create: unable to create variable object\\\\n\".*113\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \ - "create out of scope variable" - -mi_gdb_test "200-break-insert do_locals_tests" \ - "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_locals_tests\",file=\".*var-cmd.c\",line=\"106\",times=\"0\"\}" \ - "break-insert operation" - -mi_run_cmd -# The running part has been checked already by mi_run_cmd -gdb_expect { - -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"106\"\}\r\n$mi_gdb_prompt$" { - pass "run to do_locals_tests" - } - -re ".*$mi_gdb_prompt$" {fail "run to do_locals_tests (2)"} - timeout {fail "run to do_locals_tests (timeout 2)"} -} - -# Test: c_variable-1.4 -# Desc: create local variables - -mi_gdb_test "-var-create linteger * linteger" \ - "\\^done,name=\"linteger\",numchild=\"0\",type=\"int\"" \ - "create local variable linteger" - -mi_gdb_test "-var-create lpinteger * lpinteger" \ - "\\^done,name=\"lpinteger\",numchild=\"1\",type=\"int \\*\"" \ - "create local variable lpinteger" - -mi_gdb_test "-var-create lcharacter * lcharacter" \ - "\\^done,name=\"lcharacter\",numchild=\"0\",type=\"char\"" \ - "create local variablelcharacter " - -mi_gdb_test "-var-create lpcharacter * lpcharacter" \ - "\\^done,name=\"lpcharacter\",numchild=\"1\",type=\"char \\*\"" \ - "create local variable lpcharacter" - -mi_gdb_test "-var-create llong * llong" \ - "\\^done,name=\"llong\",numchild=\"0\",type=\"long int\"" \ - "create local variable llong" - -mi_gdb_test "-var-create lplong * lplong" \ - "\\^done,name=\"lplong\",numchild=\"1\",type=\"long int \\*\"" \ - "create local variable lplong" - -mi_gdb_test "-var-create lfloat * lfloat" \ - "\\^done,name=\"lfloat\",numchild=\"0\",type=\"float\"" \ - "create local variable lfloat" - -mi_gdb_test "-var-create lpfloat * lpfloat" \ - "\\^done,name=\"lpfloat\",numchild=\"1\",type=\"float \\*\"" \ - "create local variable lpfloat" - -mi_gdb_test "-var-create ldouble * ldouble" \ - "\\^done,name=\"ldouble\",numchild=\"0\",type=\"double\"" \ - "create local variable ldouble" - -mi_gdb_test "-var-create lpdouble * lpdouble" \ - "\\^done,name=\"lpdouble\",numchild=\"1\",type=\"double \\*\"" \ - "create local variable lpdouble" - -mi_gdb_test "-var-create lsimple * lsimple" \ - "\\^done,name=\"lsimple\",numchild=\"6\",type=\"struct _simple_struct\"" \ - "create local variable lsimple" - -mi_gdb_test "-var-create lpsimple * lpsimple" \ - "\\^done,name=\"lpsimple\",numchild=\"6\",type=\"struct _simple_struct \\*\"" \ - "create local variable lpsimple" - -mi_gdb_test "-var-create func * func" \ - "\\^done,name=\"func\",numchild=\"0\",type=\"void \\(\\*\\)\\((void|)\\)\"" \ - "create local variable func" - -# Test: c_variable-1.5 -# Desc: create lsimple.character -mi_gdb_test "-var-create lsimple.character * lsimple.character" \ - "\\^done,name=\"lsimple.character\",numchild=\"0\",type=\"char\"" \ - "create lsimple.character" - -# Test: c_variable-1.6 -# Desc: create lpsimple->integer -mi_gdb_test "-var-create lsimple->integer * lsimple->integer" \ - "\\^done,name=\"lsimple->integer\",numchild=\"0\",type=\"int\"" \ - "create lsimple->integer" - -# Test: c_variable-1.7 -# Desc: ceate lsimple.integer -mi_gdb_test "-var-create lsimple.integer * lsimple.integer" \ - "\\^done,name=\"lsimple.integer\",numchild=\"0\",type=\"int\"" \ - "create lsimple->integer" - - -# Test: c_variable-1.9 -# Desc: create type name -# Type names (like int, long, etc..) are all proper expressions to gdb. -# make sure variable code does not allow users to create variables, though. -mi_gdb_test "-var-create int * int" \ - "&\"Attempt to use a type name as an expression.mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \ - "create int" - - -##### ##### -# # -# Value changed tests # -# # -##### ##### - -# Test: c_variable-2.1 -# Desc: check whether values changed at do_block_tests -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{\}" \ - "update all vars" - -# Step over "linteger = 1234;" -mi_step_to "do_locals_tests" "" "var-cmd.c" "107" "step at do_locals_test" - -# Test: c_variable-2.2 -# Desc: check whether only linteger changed values -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars: linteger changed" - -# Step over "lpinteger = &linteger;" -mi_step_to "do_locals_tests" "" "var-cmd.c" 108 "step at do_locals_tests (2)" - -# Test: c_variable-2.3 -# Desc: check whether only lpinteger changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars: lpinteger changed" - -# Step over "lcharacter = 'a';" -mi_step_to "do_locals_tests" "" "var-cmd.c" "109" "step at do_locals_tests (3)" - -# Test: c_variable-2.4 -# Desc: check whether only lcharacter changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars: lcharacter changed" - -# Step over "lpcharacter = &lcharacter;" -mi_step_to "do_locals_tests" "" "var-cmd.c" "110" "step at do_locals_tests (4)" - -# Test: c_variable-2.5 -# Desc: check whether only lpcharacter changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"lpcharacter\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars: lpcharacter changed" - - -# Step over: -# llong = 2121L; -# lplong = &llong; -# lfloat = 2.1; -# lpfloat = &lfloat; -# ldouble = 2.718281828459045; -# lpdouble = &ldouble; -# lsimple.integer = 1234; -# lsimple.unsigned_integer = 255; -# lsimple.character = 'a'; - -mi_execute_to "exec-step 9" "end-stepping-range" "do_locals_tests" "" \ - "var-cmd.c" "119" "" "step at do_locals_tests (5)" - -# Test: c_variable-2.6 -# Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer, -# lsimple.unsigned_character lsimple.integer lsimple.character changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\",name=\"lpdouble\",in_scope=\"true\",type_changed=\"false\",name=\"ldouble\",in_scope=\"true\",type_changed=\"false\",name=\"lpfloat\",in_scope=\"true\",type_changed=\"false\",name=\"lfloat\",in_scope=\"true\",type_changed=\"false\",name=\"lplong\",in_scope=\"true\",type_changed=\"false\",name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars: many changed" - -# Step over: -# lsimple.signed_character = 21; -# lsimple.char_ptr = &lcharacter; -# lpsimple = &lsimple; -# func = nothing; - -mi_execute_to "exec-step 4" "end-stepping-range" "do_locals_tests" "" \ - "var-cmd.c" "125" "" "step at do_locals_tests (6)" - -# Test: c_variable-2.7 -# Desc: check whether (lsimple.signed_character, lsimple.char_ptr) lpsimple, func changed -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"func\",in_scope=\"true\",type_changed=\"false\",name=\"lpsimple\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars: func and lpsimple changed" - -# Step over -# linteger = 4321; -# lcharacter = 'b'; -# llong = 1212L; -# lfloat = 1.2; -# ldouble = 5.498548281828172; -# lsimple.integer = 255; -# lsimple.unsigned_integer = 4321; -# lsimple.character = 'b'; - -mi_execute_to "exec-step 8" "end-stepping-range" "do_locals_tests" "" \ - "var-cmd.c" "133" "" "step at do_locals_tests (7)" - -# Test: c_variable-2.8 -# Desc: check whether linteger, lcharacter, llong, lfoat, ldouble, lsimple.integer, -# lpsimple.integer lsimple.character changed -# Note: this test also checks that lpsimple->integer and lsimple.integer have -# changed (they are the same) -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\",name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\",name=\"ldouble\",in_scope=\"true\",type_changed=\"false\",name=\"lfloat\",in_scope=\"true\",type_changed=\"false\",name=\"llong\",in_scope=\"true\",type_changed=\"false\",name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\",name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars: func and lpsimple changed" - - -### -# -# Test assignment to variables. More tests on assignment are in other files. -# -### -mi_gdb_test "-var-assign global_simple 0" \ - "&\"mi_cmd_var_assign: Variable object is not editable\\\\n\".*\\^error,msg=\"mi_cmd_var_assign: Variable object is not editable\"" \ - "assign to global_simple" - -mi_gdb_test "-var-assign linteger 3333" \ - "\\^done,value=\"3333\"" \ - "assign to linteger" - -mi_gdb_test "-var-evaluate-expression linteger" \ - "\\^done,value=\"3333\"" \ - "eval linteger" - -mi_gdb_test "-var-assign lpinteger \"&linteger + 3\"" \ - "\\^done,value=\"$hex\"" \ - "assign to lpinteger" - -mi_gdb_test "-var-evaluate-expression lpinteger" \ - "\\^done,value=\"$hex\"" \ - "eval lpinteger" - -# reset the values to the original ones so that the rest of the file doesn't suffer. - -mi_gdb_test "-var-assign linteger 4321" \ - "\\^done,value=\"4321\"" \ - "assign to linteger" - -mi_gdb_test "-var-assign lpinteger &linteger" \ - "\\^done,value=\"$hex\"" \ - "assign to lpinteger" - -mi_gdb_test "-var-assign lcharacter 'z'" \ - "\\^done,value=\"122 'z'\"" \ - "assign to lcharacter" - -mi_gdb_test "-var-evaluate-expression lcharacter" \ - "\\^done,value=\"122 'z'\"" \ - "eval lcharacter" - -mi_gdb_test "-var-assign llong 1313L" \ - "\\^done,value=\"1313\"" \ - "assign to llong" -mi_gdb_test "-var-evaluate-expression llong" \ - "\\^done,value=\"1313\"" \ - "eval llong" -mi_gdb_test "-var-assign llong 1212L" \ - "\\^done,value=\"1212\"" \ - "assign to llong" - -mi_gdb_test "-var-assign lplong &llong+4" \ - "\\^done,value=\"$hex\"" \ - "assign to lplong" -mi_gdb_test "-var-evaluate-expression lplong" \ - "\\^done,value=\"$hex\"" \ - "eval lplong" -mi_gdb_test "-var-assign lplong &llong" \ - "\\^done,value=\"$hex\"" \ - "assign to lplong" - -mi_gdb_test "-var-assign lfloat 3.4567" \ - "\\^done,value=\"3.45.*\"" \ - "assign to lfloat" -mi_gdb_test "-var-evaluate-expression lfloat" \ - "\\^done,value=\"3.45.*\"" \ - "eval lfloat" -mi_gdb_test "-var-assign lfloat 1.2345" \ - "\\^done,value=\"1.23.*\"" \ - "assign to lfloat" - -mi_gdb_test "-var-assign lpfloat &lfloat+4" \ - "\\^done,value=\"$hex\"" \ - "assign to lpfloat" - -mi_gdb_test "-var-assign ldouble 5.333318284590435" \ - "\\^done,value=\"5.333318284590435\"" \ - "assign to ldouble" - -mi_gdb_test "-var-assign func do_block_tests" \ - "\\^done,value=\"$hex \"" \ - "assign to func" - -mi_gdb_test "-var-assign lsimple.character 'd'" \ - "\\^done,value=\"100 'd'\"" \ - "assign to lsimple.character" - -mi_gdb_test "-var-assign lsimple->integer 222" \ - "\\^done,value=\"222\"" \ - "assign to lsimple->integer" - -mi_gdb_test "-var-assign lsimple.integer 333" \ - "\\^done,value=\"333\"" \ - "assign to lsimple.integer" - -###### -# End of assign tests -##### - -mi_gdb_test "-break-insert subroutine1" \ - "\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine1\",file=\".*var-cmd.c\",line=\"146\",times=\"0\"\}" \ - "break-insert subroutine1" -mi_continue_to "2" "subroutine1" \ - "\{name=\"i\",value=\"4321\"\},\{name=\"l\",value=\"$hex\"\}" \ - "var-cmd.c" "146" "continue to subroutine1" - -# Test: c_variable-2.10 -# Desc: create variable for locals i,l in subroutine1 -mi_gdb_test "-var-create i * i" \ - "\\^done,name=\"i\",numchild=\"0\",type=\"int\"" \ - "create i" - -mi_gdb_test "-var-create l * l" \ - "\\^done,name=\"l\",numchild=\"1\",type=\"long int \\*\"" \ - "create l" - -# Test: c_variable-2.11 -# Desc: create do_locals_tests local in subroutine1 -mi_gdb_test "-var-create linteger * linteger" \ - "&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \ - "create linteger" - -mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \ - "var-cmd.c" "147" "step at subroutine1" - -# Test: c_variable-2.12 -# Desc: change global_simple.integer -# Note: This also tests whether we are reporting changes in structs properly. -# gdb normally would say that global_simple has changed, but we -# special case that, since it is not what a human expects to -# see. - -setup_xfail *-*-* -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{FIXME: WHAT IS CORRECT HERE\}" \ - "update all vars: changed FIXME" -clear_xfail *-*-* - -mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \ - "var-cmd.c" "148" "step at subroutine1 (2)" - -# Test: c_variable-2.13 -# Desc: change subroutine1 local i -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"i\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars: i changed" - -mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \ - "var-cmd.c" "149" "step at subroutine1 (3)" - -# Test: c_variable-2.14 -# Desc: change do_locals_tests local llong -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}" \ - "update all vars: llong changed" - -mi_next_to "do_locals_tests" "" "var-cmd.c" "136" "next out of subroutine1" - -# Test: c_variable-2.15 -# Desc: check for out of scope subroutine1 locals -mi_gdb_test "-var-update *" \ - "\\^done,changelist=\{name=\"l\",in_scope=\"false\",name=\"i\",in_scope=\"false\"\}" \ - "update all vars: all now out of scope" - -# Done with locals/globals tests. Erase all variables -#delete_all_variables -mi_gdb_test "-var-delete global_simple" \ - "\\^done,ndeleted=\"1\"" \ - "delete var" - -mi_gdb_test "-var-delete linteger" \ - "\\^done,ndeleted=\"1\"" \ - "delete var linteger" - -mi_gdb_test "-var-delete lpinteger" \ - "\\^done,ndeleted=\"1\"" \ - "delete var lpinteger" - -mi_gdb_test "-var-delete lcharacter" \ - "\\^done,ndeleted=\"1\"" \ - "delete var lcharacter" - -mi_gdb_test "-var-delete lpcharacter" \ - "\\^done,ndeleted=\"1\"" \ - "delete var lpcharacter" - -mi_gdb_test "-var-delete llong" \ - "\\^done,ndeleted=\"1\"" \ - "delete var llong" - -mi_gdb_test "-var-delete lplong" \ - "\\^done,ndeleted=\"1\"" \ - "delete var lplong" - -mi_gdb_test "-var-delete lfloat" \ - "\\^done,ndeleted=\"1\"" \ - "delete var lfloat" - -mi_gdb_test "-var-delete lpfloat" \ - "\\^done,ndeleted=\"1\"" \ - "delete var lpfloat" - -mi_gdb_test "-var-delete ldouble" \ - "\\^done,ndeleted=\"1\"" \ - "delete var ldouble" - -mi_gdb_test "-var-delete lpdouble" \ - "\\^done,ndeleted=\"1\"" \ - "delete var lpdouble" - -mi_gdb_test "-var-delete lsimple" \ - "\\^done,ndeleted=\"1\"" \ - "delete var lsimple" - -mi_gdb_test "-var-delete lpsimple" \ - "\\^done,ndeleted=\"1\"" \ - "delete var lpsimple" - -mi_gdb_test "-var-delete func" \ - "\\^done,ndeleted=\"1\"" \ - "delete var func" - -mi_gdb_test "-var-delete lsimple.character" \ - "\\^done,ndeleted=\"1\"" \ - "delete var lsimple.character" - -mi_gdb_test "-var-delete lsimple->integer" \ - "\\^done,ndeleted=\"1\"" \ - "delete var lsimple->integer" - -mi_gdb_test "-var-delete lsimple.integer" \ - "\\^done,ndeleted=\"1\"" \ - "delete var lsimple.integer" - -mi_gdb_test "-var-delete i" \ - "\\^done,ndeleted=\"1\"" \ - "delete var i" - -mi_gdb_test "-var-delete l" \ - "\\^done,ndeleted=\"1\"" \ - "delete var l" - -# Test whether we can follow the name of a variable through multiple -# stack frames. -mi_gdb_test "-break-insert do_special_tests" \ - {\^done,bkpt=.*} \ - "set breakpoint at do_special_tests" - -mi_continue_to {.*} do_special_tests {.*} {.*var-cmd.c} {.*} {stop in do_special_tests} - -mi_gdb_test "-var-create selected_a @ a" \ - {\^done,name="selected_a",numchild="0",type="int"} \ - "create selected_a" - -mi_gdb_test "-break-insert incr_a" \ - {\^done,bkpt=.*} \ - "set breakpoint at incr_a" - -mi_continue_to {.*} incr_a {.*} {.*var-cmd.c} {.*} {stop in incr_a} - -mi_gdb_test "-var-update selected_a" \ - {\^done,changelist=\{name="selected_a",in_scope="true",new_type="char",new_num_children="0"\}} \ - "update selected_a in incr_a" - -mi_next "step a line in incr_a" -mi_next "return from incr_a to do_special_tests" - -mi_gdb_test "-var-update selected_a" \ - {\^done,changelist=\{name="selected_a",in_scope="true",new_type="int",new_num_children="0"\}} \ - "update selected_a in do_special_tests" - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-var-display.exp b/gdb/testsuite/gdb.mi/mi1-var-display.exp deleted file mode 100644 index 0bdaee44ae4..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-var-display.exp +++ /dev/null @@ -1,627 +0,0 @@ -# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. -# -# This Program Is Free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# Test essential Machine interface (MI) operations -# -# Verify that, using the MI, we can create, update, delete variables. -# - - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "var-cmd" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} - -mi_gdb_test "200-break-insert 260" \ - "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"260\",times=\"0\"\}" \ - "break-insert operation" - -mi_run_cmd -# The running part has been checked already by mi_run_cmd -gdb_expect { - -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"260\"\}\r\n$mi_gdb_prompt$" { - pass "run to do_children_tests" - } - -re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"} - timeout {fail "run to do_children_tests (timeout 2)"} -} - -##### ##### -# # -# Display tests # -# # -##### ##### - -# Test: c_variable-6.1 -# Desc: create variable bar -mi_gdb_test "-var-create bar * bar" \ - "\\^done,name=\"bar\",numchild=\"0\",type=\"int\"" \ - "create local variable bar" - -# Test: c_variable-6.2 -# Desc: type of variable bar -mi_gdb_test "-var-info-type bar" \ - "\\^done,type=\"int\"" \ - "info type variable bar" - -# Test: c_variable-6.3 -# Desc: format of variable bar -mi_gdb_test "-var-show-format bar" \ - "\\^done,format=\"natural\"" \ - "show format variable bar" - -# Test: c_variable-6.4 -# Desc: value of variable bar -mi_gdb_test "-var-evaluate-expression bar" \ - "\\^done,value=\"2121\"" \ - "eval variable bar" - -# Test: c_variable-6.5 -# Desc: change format of bar to hex -mi_gdb_test "-var-set-format bar hexadecimal" \ - "\\^done,format=\"hexadecimal\"" \ - "set format variable bar" - -# Test: c_variable-6.6 -# Desc: value of bar with new format -mi_gdb_test "-var-evaluate-expression bar" \ - "\\^done,value=\"0x849\"" \ - "eval variable bar with new format" - -# Test: c_variable-6.7 -# Desc: change value of bar -mi_gdb_test "-var-assign bar 3" \ - "\\^done,value=\"0x3\"" \ - "assing to variable bar" - -mi_gdb_test "-var-set-format bar decimal" \ - "\\^done,format=\"decimal\"" \ - "set format variable bar" - -mi_gdb_test "-var-evaluate-expression bar" \ - "\\^done,value=\"3\"" \ - "eval variable bar with new value" - -mi_gdb_test "-var-delete bar" \ - "\\^done,ndeleted=\"1\"" \ - "delete var bar" - -# Test: c_variable-6.11 -# Desc: create variable foo -mi_gdb_test "-var-create foo * foo" \ - "\\^done,name=\"foo\",numchild=\"1\",type=\"int \\*\"" \ - "create local variable foo" - -# Test: c_variable-6.12 -# Desc: type of variable foo -mi_gdb_test "-var-info-type foo" \ - "\\^done,type=\"int \\*\"" \ - "info type variable foo" - -# Test: c_variable-6.13 -# Desc: format of variable foo -mi_gdb_test "-var-show-format foo" \ - "\\^done,format=\"natural\"" \ - "show format variable foo" - -# Test: c_variable-6.14 -# Desc: value of variable foo -mi_gdb_test "-var-evaluate-expression foo" \ - "\\^done,value=\"$hex\"" \ - "eval variable foo" - -# Test: c_variable-6.15 -# Desc: change format of var to octal -mi_gdb_test "-var-set-format foo octal" \ - "\\^done,format=\"octal\"" \ - "set format variable foo" - -mi_gdb_test "-var-show-format foo" \ - "\\^done,format=\"octal\"" \ - "show format variable foo" - -# Test: c_variable-6.16 -# Desc: value of foo with new format -mi_gdb_test "-var-evaluate-expression foo" \ - "\\^done,value=\"\[0-7\]+\"" \ - "eval variable foo" - -# Test: c_variable-6.17 -# Desc: change value of foo -mi_gdb_test "-var-assign foo 3" \ - "\\^done,value=\"03\"" \ - "assing to variable foo" - -mi_gdb_test "-var-set-format foo decimal" \ - "\\^done,format=\"decimal\"" \ - "set format variable foo" - -# Test: c_variable-6.18 -# Desc: check new value of foo -mi_gdb_test "-var-evaluate-expression foo" \ - "\\^done,value=\"3\"" \ - "eval variable foo" - -mi_gdb_test "-var-delete foo" \ - "\\^done,ndeleted=\"1\"" \ - "delete var foo" - -# Test: c_variable-6.21 -# Desc: create variable weird and children -mi_gdb_test "-var-create weird * weird" \ - "\\^done,name=\"weird\",numchild=\"11\",type=\"weird_struct \\*\"" \ - "create local variable weird" - -mi_gdb_test "-var-list-children weird" \ - "\\^done,numchild=\"11\",children=\{child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\}" \ - "get children local variable weird" - - -# Test: c_variable-6.23 -# Desc: change format of weird.func_ptr and weird.func_ptr_ptr -mi_gdb_test "-var-set-format weird.func_ptr hexadecimal" \ - "\\^done,format=\"hexadecimal\"" \ - "set format variable weird.func_ptr" - -mi_gdb_test "-var-show-format weird.func_ptr" \ - "\\^done,format=\"hexadecimal\"" \ - "show format variable weird.func_ptr" - -mi_gdb_test "-var-set-format weird.func_ptr_ptr hexadecimal" \ - "\\^done,format=\"hexadecimal\"" \ - "set format variable weird.func_ptr_ptr" - -mi_gdb_test "-var-show-format weird.func_ptr_ptr" \ - "\\^done,format=\"hexadecimal\"" \ - "show format variable weird.func_ptr_ptr" - -# Test: c_variable-6.24 -# Desc: format of weird and children -mi_gdb_test "-var-set-format weird natural" \ - "\\^done,format=\"natural\"" \ - "set format variable weird" - -mi_gdb_test "-var-set-format weird.integer natural" \ - "\\^done,format=\"natural\"" \ - "set format variable weird.integer" - -mi_gdb_test "-var-set-format weird.character natural" \ - "\\^done,format=\"natural\"" \ - "set format variable weird.character" - -mi_gdb_test "-var-set-format weird.char_ptr natural" \ - "\\^done,format=\"natural\"" \ - "set format variable weird.char_ptr" - -mi_gdb_test "-var-set-format weird.long_int natural" \ - "\\^done,format=\"natural\"" \ - "set format variable weird.long_int" - -mi_gdb_test "-var-set-format weird.int_ptr_ptr natural" \ - "\\^done,format=\"natural\"" \ - "set format variable weird.int_ptr_ptr" - -mi_gdb_test "-var-set-format weird.long_array natural" \ - "\\^done,format=\"natural\"" \ - "set format variable weird.long_array" - -mi_gdb_test "-var-set-format weird.func_ptr hexadecimal" \ - "\\^done,format=\"hexadecimal\"" \ - "set format variable weird.func_ptr" - -mi_gdb_test "-var-set-format weird.func_ptr_struct hexadecimal" \ - "\\^done,format=\"hexadecimal\"" \ - "set format variable weird.func_ptr_struct" - -mi_gdb_test "-var-set-format weird.func_ptr_ptr natural" \ - "\\^done,format=\"natural\"" \ - "set format variable weird.func_ptr_ptr" - -mi_gdb_test "-var-set-format weird.u1 natural" \ - "\\^done,format=\"natural\"" \ - "set format variable weird.u1" - -mi_gdb_test "-var-set-format weird.s2 natural" \ - "\\^done,format=\"natural\"" \ - "set format variable weird.s2" - -# Test: c_variable-6.25 -# Desc: value of weird and children -#gdbtk_test c_variable-6.25 {value of weird and children} { -# set values {} -# foreach v [lsort [array names var]] f [list x "" "" x x x x d d d d d] { -# lappend values [value $v $f] -# } - -# set values -#} {ok ok ok ok ok ok ok ok weird.long_array ok weird.s2 weird.u1} - -# Test: c_variable-6.26 -# Desc: change format of weird and children to octal -#gdbtk_test c_variable-6.26 {change format of weird and children to octal} { -# set formats {} -# foreach v [lsort [array names var]] { -# $var($v) format octal -# lappend formats [$var($v) format] -# } - -# set formats -#} {octal octal octal octal octal octal octal octal octal octal octal octal} - -# Test: c_variable-6.27 -# Desc: value of weird and children with new format -#gdbtk_test c_variable-6.27 {value of foo with new format} { -# set values {} -# foreach v [lsort [array names var]] { -# lappend values [value $v o] -# } - -# set values -#} {ok ok ok ok ok ok ok ok weird.long_array ok weird.s2 weird.u1} - -# Test: c_variable-6.30 -# Desc: create more children of weird -#gdbtk_test c_variable-6.30 {create more children of weird} { -# foreach v [array names var] { -# get_children $v -# } - -# # Do it twice to get more children -# foreach v [array names var] { -# get_children $v -# } - -# lsort [array names var] -#} {weird weird.char_ptr weird.character weird.func_ptr weird.func_ptr_ptr weird.func_ptr_struct weird.int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr weird.integer weird.long_array weird.long_array.0 weird.long_array.1 weird.long_array.2 weird.long_array.3 weird.long_array.4 weird.long_array.5 weird.long_array.6 weird.long_array.7 weird.long_array.8 weird.long_array.9 weird.long_int weird.s2 weird.s2.g weird.s2.h weird.s2.i weird.s2.i.0 weird.s2.i.1 weird.s2.i.2 weird.s2.i.3 weird.s2.i.4 weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.s2.i.9 weird.s2.u2 weird.s2.u2.f weird.s2.u2.u1s1 weird.s2.u2.u1s2 weird.u1 weird.u1.a weird.u1.b weird.u1.c weird.u1.d} - -# Test: c_variable-6.31 -# Desc: check that all children of weird change -# Ok, obviously things like weird.s2 and weird.u1 will not change! -#gdbtk_test *c_variable-6.31 {check that all children of weird change (ops, we are now reporting array names as changed in this case - seems harmless though)} { -# $var(weird) value 0x2121 -# check_update -#} {{weird.integer weird.character weird.char_ptr weird.long_int weird.int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr weird.long_array.0 weird.long_array.1 weird.long_array.2 weird.long_array.3 weird.long_array.4 weird.long_array.5 weird.long_array.6 weird.long_array.7 weird.long_array.8 weird.long_array.9 weird.func_ptr weird.func_ptr_struct weird.func_ptr_ptr weird.u1.a weird.u1.b weird.u1.c weird.u1.d weird.s2.u2.f weird.s2.g weird.s2.h weird.s2.i.0 weird.s2.i.1 weird.s2.i.2 weird.s2.i.3 weird.s2.i.4 weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.s2.i.9} {weird.s2.i weird.s2.u2 weird weird.s2.u2.u1s1 weird.s2.u2.u1s2 weird.s2 weird.long_array weird.u1} {}} - -mi_gdb_test "-var-delete weird" \ - "\\^done,ndeleted=\"12\"" \ - "delete var weird" - - -##### ##### -# # -# Special Display Tests # -# # -##### ##### - -# Stop in "do_special_tests" -mi_gdb_test "200-break-insert do_special_tests" \ - "200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"282\",times=\"0\"\}" \ - "break-insert operation" - -send_gdb "-exec-continue\n" -gdb_expect { - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"282\"\}\r\n$mi_gdb_prompt$" { - pass "continue to do_special_tests" - } - timeout { - fail "continue to do_special_tests (timeout)" - } -} - -# Test: c_variable-7.10 -# Desc: create union u -mi_gdb_test "-var-create u * u" \ - "\\^done,name=\"u\",numchild=\"2\",type=\"union named_union\"" \ - "create local variable u" - -# Test: c_variable-7.11 -# Desc: value of u -mi_gdb_test "-var-evaluate-expression u" \ - "\\^done,value=\"\{\\.\\.\\.\}\"" \ - "eval variable u" - -# Test: c_variable-7.12 -# Desc: type of u -mi_gdb_test "-var-info-type u" \ - "\\^done,type=\"union named_union\"" \ - "info type variable u" - -# Test: c_variable-7.13 -# Desc: is u editable -mi_gdb_test "-var-show-attributes u" \ - "\\^done,attr=\"noneditable\"" \ - "is u editable" - -# Test: c_variable-7.14 -# Desc: number of children of u -mi_gdb_test "-var-info-num-children u" \ - "\\^done,numchild=\"2\"" \ - "get number of children of u" - -# Test: c_variable-7.15 -# Desc: children of u -mi_gdb_test "-var-list-children u" \ - "\\^done,numchild=\"2\",children=\{child=\{name=\"u.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"u.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\}\}" \ - "get children of u" - -# Test: c_variable-7.20 -# Desc: create anonu -mi_gdb_test "-var-create anonu * anonu" \ - "\\^done,name=\"anonu\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"" \ - "create local variable anonu" - -# Test: c_variable-7.21 -# Desc: value of anonu -mi_gdb_test "-var-evaluate-expression anonu" \ - "\\^done,value=\"\{\\.\\.\\.\}\"" \ - "eval variable anonu" - -# Test: c_variable-7.22 -# Desc: type of anonu -mi_gdb_test "-var-info-type anonu" \ - "\\^done,type=\"union \{\\.\\.\\.\}\"" \ - "info type variable anonu" - -# Test: c_variable-7.23 -# Desc: is anonu editable -mi_gdb_test "-var-show-attributes anonu" \ - "\\^done,attr=\"noneditable\"" \ - "is anonu editable" - -# Test: c_variable-7.24 -# Desc: number of children of anonu -mi_gdb_test "-var-info-num-children anonu" \ - "\\^done,numchild=\"3\"" \ - "get number of children of anonu" - -# Test: c_variable-7.25 -# Desc: children of anonu -mi_gdb_test "-var-list-children anonu" \ - "\\^done,numchild=\"3\",children=\{child=\{name=\"anonu.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anonu.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anonu.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\}\}" \ - "get children of anonu" - -# Test: c_variable-7.30 -# Desc: create struct s -mi_gdb_test "-var-create s * s" \ - "\\^done,name=\"s\",numchild=\"6\",type=\"struct _simple_struct\"" \ - "create local variable s" - - -# Test: c_variable-7.31 -# Desc: value of s -mi_gdb_test "-var-evaluate-expression s" \ - "\\^done,value=\"\{\\.\\.\\.\}\"" \ - "eval variable s" - -# Test: c_variable-7.32 -# Desc: type of s -mi_gdb_test "-var-info-type s" \ - "\\^done,type=\"struct _simple_struct\"" \ - "info type variable s" - -# Test: c_variable-7.33 -# Desc: is s editable -mi_gdb_test "-var-show-attributes s" \ - "\\^done,attr=\"noneditable\"" \ - "is s editable" - -# Test: c_variable-7.34 -# Desc: number of children of s -mi_gdb_test "-var-info-num-children s" \ - "\\^done,numchild=\"6\"" \ - "get number of children of s" - -# Test: c_variable-7.35 -# Desc: children of s -mi_gdb_test "-var-list-children s" \ - "\\^done,numchild=\"6\",children=\{child=\{name=\"s.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"s.unsigned_integer\",exp=\"unsigned_integer\",numchild=\"0\",type=\"unsigned int\"\},child=\{name=\"s.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child=\{name=\"s.signed_character\",exp=\"signed_character\",numchild=\"0\",type=\"signed char\"\},child=\{name=\"s.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"s.array_of_10\",exp=\"array_of_10\",numchild=\"10\",type=\"int \\\[10\\\]\"\}\}" \ - "get children of s" -#} {integer unsigned_integer character signed_character char_ptr array_of_10} - -# Test: c_variable-7.40 -# Desc: create anons -mi_gdb_test "-var-create anons * anons" \ - "\\^done,name=\"anons\",numchild=\"3\",type=\"struct \{\\.\\.\\.\}\"" \ - "create local variable anons" - -# Test: c_variable-7.41 -# Desc: value of anons -mi_gdb_test "-var-evaluate-expression anons" \ - "\\^done,value=\"\{\\.\\.\\.\}\"" \ - "eval variable anons" - -# Test: c_variable-7.42 -# Desc: type of anons -mi_gdb_test "-var-info-type anons" \ - "\\^done,type=\"struct \{\\.\\.\\.\}\"" \ - "info type variable anons" - -# Test: c_variable-7.43 -# Desc: is anons editable -mi_gdb_test "-var-show-attributes anons" \ - "\\^done,attr=\"noneditable\"" \ - "is anons editable" - -# Test: c_variable-7.44 -# Desc: number of children of anons -mi_gdb_test "-var-info-num-children anons" \ - "\\^done,numchild=\"3\"" \ - "get number of children of anons" - -# Test: c_variable-7.45 -# Desc: children of anons -mi_gdb_test "-var-list-children anons" \ - "\\^done,numchild=\"3\",children=\{child=\{name=\"anons.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"anons.b\",exp=\"b\",numchild=\"0\",type=\"char\"\},child=\{name=\"anons.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\}\}" \ - "get children of anons" - - -# Test: c_variable-7.50 -# Desc: create enum e -mi_gdb_test "-var-create e * e" \ - "\\^done,name=\"e\",numchild=\"0\",type=\"enum foo\"" \ - "create local variable e" - -setup_xfail "*-*-*" -# Test: c_variable-7.51 -# Desc: value of e -mi_gdb_test "-var-evaluate-expression e" \ - "\\^done,value=\"FIXME\"" \ - "eval variable e" -clear_xfail "*-*-*" - -# Test: c_variable-7.52 -# Desc: type of e -mi_gdb_test "-var-info-type e" \ - "\\^done,type=\"enum foo\"" \ - "info type variable e" - -# Test: c_variable-7.53 -# Desc: is e editable -mi_gdb_test "-var-show-attributes e" \ - "\\^done,attr=\"editable\"" \ - "is e editable" - -# Test: c_variable-7.54 -# Desc: number of children of e -mi_gdb_test "-var-info-num-children e" \ - "\\^done,numchild=\"0\"" \ - "get number of children of e" - -# Test: c_variable-7.55 -# Desc: children of e -mi_gdb_test "-var-list-children e" \ - "\\^done,numchild=\"0\"" \ - "get children of e" - -# Test: c_variable-7.60 -# Desc: create anone -mi_gdb_test "-var-create anone * anone" \ - "\\^done,name=\"anone\",numchild=\"0\",type=\"enum \{\\.\\.\\.\}\"" \ - "create local variable anone" - -setup_xfail "*-*-*" -# Test: c_variable-7.61 -# Desc: value of anone -mi_gdb_test "-var-evaluate-expression anone" \ - "\\^done,value=\"A\"" \ - "eval variable anone" -clear_xfail "*-*-*" - - -# Test: c_variable-7.70 -# Desc: create anone -mi_gdb_test "-var-create anone * anone" \ - "&\"Duplicate variable object name\\\\n\".*\\^error,msg=\"Duplicate variable object name\"" \ - "create duplicate local variable anone" - - -# Test: c_variable-7.72 -# Desc: type of anone -mi_gdb_test "-var-info-type anone" \ - "\\^done,type=\"enum \{\\.\\.\\.\}\"" \ - "info type variable anone" - - -# Test: c_variable-7.73 -# Desc: is anone editable -mi_gdb_test "-var-show-attributes anone" \ - "\\^done,attr=\"editable\"" \ - "is anone editable" - -# Test: c_variable-7.74 -# Desc: number of children of anone -mi_gdb_test "-var-info-num-children anone" \ - "\\^done,numchild=\"0\"" \ - "get number of children of anone" - -# Test: c_variable-7.75 -# Desc: children of anone -mi_gdb_test "-var-list-children anone" \ - "\\^done,numchild=\"0\"" \ - "get children of anone" - - -# Record fp - -send_gdb "p/x \$fp\n" -gdb_expect { - -re ".*($hex).*\\^done\r\n$mi_gdb_prompt$" { - pass "print FP register" - set fp $expect_out(1,string) - } -# -re ".*" { fail "print FP register"} - timeout { fail "print FP register (timeout)"} -} - -mi_gdb_test "200-break-insert incr_a" \ - "200\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"incr_a\",file=\".*var-cmd.c\",line=\"85\",times=\"0\"\}" \ - "break-insert operation" -send_gdb "-exec-continue\n" -gdb_expect { - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" { - pass "continue to incr_a" - } - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"\.*\"\}\\\],file=\".*var-cmd.c\",line=\"8\[345\]\"\}\r\n$mi_gdb_prompt$" { - fail "continue to incr_a (compiler debug info incorrect)" - } - -re "\\^running\r\n${mi_gdb_prompt}.*\r\n$mi_gdb_prompt$" { - fail "continue to incr_a (unknown output)" - } - timeout { - fail "continue to incr_a (timeout)" - } -} - -# Test: c_variable-7.81 -# Desc: Create variables in different scopes -mi_gdb_test "-var-create a1 * a" \ - "\\^done,name=\"a1\",numchild=\"0\",type=\"char\"" \ - "create local variable a1" - -mi_gdb_test "-var-create a2 $fp a" \ - "\\^done,name=\"a2\",numchild=\"0\",type=\"int\"" \ - "create variable a2 in different scope" - -#gdbtk_test c_variable-7.81 {create variables in different scopes} { -# set a1 [gdb_variable create -expr a] -# set a2 [gdb_variable create -expr a -frame $fp] - -# set vals {} -# lappend vals [$a1 value] -# lappend vals [$a2 value] -# set vals -#} {2 1} - - -mi_gdb_exit -return 0 diff --git a/gdb/testsuite/gdb.mi/mi1-watch.exp b/gdb/testsuite/gdb.mi/mi1-watch.exp deleted file mode 100644 index 937eb2c807c..00000000000 --- a/gdb/testsuite/gdb.mi/mi1-watch.exp +++ /dev/null @@ -1,191 +0,0 @@ -# Copyright 1999, 2000 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gdb@prep.ai.mit.edu - -# -# Test essential Machine interface (MI) operations -# -# Verify that, using the MI, we can run a simple program and perform basic -# debugging activities like: insert breakpoints, run the program, -# step, next, continue until it ends and, last but not least, quit. -# -# The goal is not to test gdb functionality, which is done by other tests, -# but to verify the correct output response to MI operations. -# - -load_lib mi-support.exp -set MIFLAGS "-i=mi1" - -gdb_exit -if [mi_gdb_start] { - continue -} - -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -mi_delete_breakpoints -mi_gdb_reinitialize_dir $srcdir/$subdir -mi_gdb_load ${binfile} - -proc test_watchpoint_creation_and_listing {} { - global mi_gdb_prompt - global srcfile - global hex - - # Insert a watchpoint and list - # Tests: - # -break-watch C - # -break-list - - mi_gdb_test "111-break-watch C" \ - "111\\^done,wpt=\{number=\"2\",exp=\"C\"\}" \ - "break-watch operation" - - mi_gdb_test "222-break-list" \ - "222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"1\"\},bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\"\}\\\]\}" \ - "list of watchpoints" - -} - -# UNUSED at the time -proc test_awatch_creation_and_listing {} { - global mi_gdb_prompt - global srcfile - global hex - - # Insert an access watchpoint and list it - # Tests: - # -break-watch -a A - # -break-list - - mi_gdb_test "333-break-watch -a A" \ - "333\\^done,bkpt=\{number=\"1\",addr=\"$hex\",file=\".*basics.c\",line=\"32\"\}" \ - "break-watch -a operation" - - mi_gdb_test "444-break-list" \ - "444\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"3\",type=\"watchpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\]\}" \ - "list of watchpoints awatch" - - mi_gdb_test "777-break-delete 3" \ - "777\\^done" \ - "delete access watchpoint" -} - -# UNUSED at the time -proc test_rwatch_creation_and_listing {} { - global mi_gdb_prompt - global srcfile - global hex - - # Insert a read watchpoint and list it. - # Tests: - # -break-insert -r B - # -break-list - - mi_gdb_test "200-break-watch -r C" \ - "200\\^done,bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \ - "break-insert -r operation" - - mi_gdb_test "300-break-list" \ - "300\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\},.*\}\\\}\}" \ - "list of breakpoints" - - mi_gdb_test "177-break-delete 4" \ - "177\\^done" \ - "delete read watchpoint" -} - -proc test_running_the_program {} { - global mi_gdb_prompt - global hex - - # Run the program without args, then specify srgs and rerun the program - # Tests: - # -exec-run - - mi_gdb_test "300-break-insert callee4" \ - "300\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \ - "insert breakpoint at callee4" - - # mi_gdb_test cannot be used for asynchronous commands because there are - # two prompts involved and this can lead to a race condition. - # The following is equivalent to a send_gdb "000-exec-run\n" - mi_run_cmd - # The running part has been checked already by mi_run_cmd - gdb_expect { - -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" \ - { pass "run to callee4" } - -re ".*$mi_gdb_prompt$" {fail "run to callee4 (2)"} - timeout {fail "run to callee4 (timeout 2)"} - } -} - -proc test_watchpoint_triggering {} { - global mi_gdb_prompt - global hex - - # Continue execution until the watchpoint is reached, continue again, - # to see the watchpoint go out of scope. - # Does: - # -exec-continue (Here wp triggers) - # -exec-continue (Here wp goes out of scope) - - send_gdb "222-exec-continue\n" - gdb_expect { - -re "222\\^running\r\n$mi_gdb_prompt" { - gdb_expect { - -re "222\\*stopped,reason=\"watchpoint-trigger\",wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\},thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" { - pass "watchpoint trigger" - } - -re ".*$mi_gdb_prompt$" {fail "watchpoint trigger (2)"} - timeout {fail "watchpoint trigger (timeout 2)"} - } - } - -re ".*$mi_gdb_prompt$" {fail "watchpoint trigger (1)"} - timeout {fail "watchpoint trigger (timeout 1)"} - } - - send_gdb "223-exec-continue\n" - gdb_expect { - -re "223\\^running\r\n$mi_gdb_prompt" { - gdb_expect { - -re "\[\r\n\]*223\\*stopped,reason=\"watchpoint-scope\",wpnum=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" { - pass "wp out of scope" - } - -re ".*$mi_gdb_prompt$" {fail "wp out of scope (2)"} - timeout {fail "wp out of scope (timeout 2)"} - } - } - -re ".*$mi_gdb_prompt$" {fail "wp out of scope (1)"} - timeout {fail "wp out of scope (timeout 1)"} - } -} - -test_running_the_program -test_watchpoint_creation_and_listing -#test_rwatch_creation_and_listing -#test_awatch_creation_and_listing -test_watchpoint_triggering - -mi_gdb_exit -return 0 diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index b2900b60a41..2d12f31d57b 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -73,6 +73,10 @@ extern int addressprint; /* Print machine addresses? */ */ extern void output_command (char *, int); +extern void registers_info (char *, int); +extern void args_info (char *, int); +extern void locals_info (char *, int); + /* If this definition isn't overridden by the header files, assume that isatty and fileno exist on this system. */ diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog index 8fdc4bcdfc3..e2bc95fe455 100644 --- a/gdb/tui/ChangeLog +++ b/gdb/tui/ChangeLog @@ -1,8 +1,3 @@ -2002-10-02 Elena Zannoni - - * tui-hooks.c (selected_frame_level_changed_hook): Use the one - exported from frame.h. - 2002-09-29 Elena Zannoni * tui.c (tui_show_source): Don't access current_source_symtab, use diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c index e1aad9f03b3..3beca39c782 100644 --- a/gdb/tui/tui-hooks.c +++ b/gdb/tui/tui-hooks.c @@ -69,6 +69,7 @@ int tui_target_has_run = 0; static void (* tui_target_new_objfile_chain) (struct objfile*); +extern void (*selected_frame_level_changed_hook) (int); static void tui_event_loop (void); static void tui_command_loop (void); diff --git a/gdb/ui-out.c b/gdb/ui-out.c index da7740f4ca6..4a4a9228540 100644 --- a/gdb/ui-out.c +++ b/gdb/ui-out.c @@ -485,23 +485,6 @@ ui_out_field_int (struct ui_out *uiout, uo_field_int (uiout, fldno, width, align, fldname, value); } -void -ui_out_field_fmt_int (struct ui_out *uiout, - int input_width, - enum ui_align input_align, - const char *fldname, - int value) -{ - int fldno; - int width; - int align; - struct ui_out_level *current = current_level (uiout); - - verify_field (uiout, &fldno, &width, &align); - - uo_field_int (uiout, fldno, input_width, input_align, fldname, value); -} - void ui_out_field_core_addr (struct ui_out *uiout, const char *fldname, diff --git a/gdb/ui-out.h b/gdb/ui-out.h index c8ed9dd504e..797c2fe960d 100644 --- a/gdb/ui-out.h +++ b/gdb/ui-out.h @@ -119,10 +119,6 @@ extern struct cleanup *make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout extern void ui_out_field_int (struct ui_out *uiout, const char *fldname, int value); -extern void ui_out_field_fmt_int (struct ui_out *uiout, int width, - enum ui_align align, const char *fldname, - int value); - extern void ui_out_field_core_addr (struct ui_out *uiout, const char *fldname, CORE_ADDR address); diff --git a/gdb/v850ice.c b/gdb/v850ice.c index 958eac331b8..1aec483bb90 100644 --- a/gdb/v850ice.c +++ b/gdb/v850ice.c @@ -50,6 +50,12 @@ struct MessageIO /* Prototypes for functions located in other files */ extern void break_command (char *, int); +extern void stepi_command (char *, int); + +extern void nexti_command (char *, int); + +extern void continue_command (char *, int); + extern int (*ui_loop_hook) (int); /* Prototypes for local functions */ diff --git a/gdb/version.in b/gdb/version.in index a00b4a329c1..5bd79e9203d 100644 --- a/gdb/version.in +++ b/gdb/version.in @@ -1 +1 @@ -2002-10-04-cvs +2002-09-30-cvs diff --git a/src-release b/src-release deleted file mode 100644 index 9830da4598d..00000000000 --- a/src-release +++ /dev/null @@ -1,326 +0,0 @@ -# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -# 1999, 2000, 2001, 2002 Free Software Foundation -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# - -# This Makefile contains release scripts for gdb, binutils, and other -# packages which live in src. It used to be part of the top level Makefile, -# but that turned out to be very messy and hard to maintain. - -# This stuff really ought to be cleaned up and turned into something other -# than a Makefile. As it is it's heavily recursive. - -# This is the name of this script (!). Needed due to horrible recursion. -SELF = src-release - -SHELL = /bin/sh - -BZIPPROG = bzip2 -MD5PROG = md5sum - -# pwd command to use. Allow user to override default by setting PWDCMD in -# the environment to account for automounters. The make variable must not -# be called PWDCMD, otherwise the value set here is passed to make -# subprocesses and overrides the setting from the user's environment. -PWD = $${PWDCMD-pwd} - -# -# Support for building net releases - -# Files in devo used in any net release. -# ChangeLog omitted because it may refer to files which are not in this -# distribution (perhaps it would be better to include it anyway). -DEVO_SUPPORT= README Makefile.in configure configure.in \ - config.guess config.if config.sub config move-if-change \ - mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \ - COPYING COPYING.LIB install-sh config-ml.in symlink-tree \ - mkinstalldirs ltconfig ltmain.sh missing ylwrap \ - libtool.m4 gettext.m4 ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh - -# Files in devo/etc used in any net release. -# ChangeLog omitted because it may refer to files which are not in this -# distribution (perhaps it would be better to include it anyway). -ETC_SUPPORT= Makefile.in configure configure.in standards.texi \ - make-stds.texi standards.info* configure.texi configure.info* \ - configbuild.* configdev.* - - -# When you use `make setup-dirs' or `make taz' you should always redefine -# this macro. -SUPPORT_FILES = list-of-support-files-for-tool-in-question - -# NOTE: No double quotes in the below. It is used within shell script -# as VER="$(VER)" -VER = ` if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' $(TOOL)/configure.in >/dev/null 2>&1; then \ - sed < bfd/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ - elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ - sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ - elif test -f $(TOOL)/version.in; then \ - head -1 $(TOOL)/version.in; \ - elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \ - sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \ - else \ - echo VERSION; \ - fi` -PACKAGE = $(TOOL) - -.PHONY: taz -taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex - $(MAKE) -f $(SELF) do-proto-toplev \ - TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(SUPPORT_FILES)" - $(MAKE) -f $(SELF) do-md5sum \ - TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(SUPPORT_FILES)" - $(MAKE) -f $(SELF) do-tar \ - TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(SUPPORT_FILES)" - $(MAKE) -f $(SELF) do-bz2 \ - TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(SUPPORT_FILES)" - -.PHONY: gdb-tar -gdb-tar: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex - $(MAKE) -f $(SELF) do-proto-toplev \ - TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(SUPPORT_FILES)" - $(MAKE) -f $(SELF) do-md5sum \ - TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(SUPPORT_FILES)" - $(MAKE) -f $(SELF) do-djunpack \ - TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(SUPPORT_FILES)" - $(MAKE) -f $(SELF) do-tar \ - TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(SUPPORT_FILES)" - -.PHONY: gdb-taz -gdb-taz: gdb-tar $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex - $(MAKE) -f $(SELF) gdb-tar \ - TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(SUPPORT_FILES)" - $(MAKE) -f $(SELF) do-bz2 \ - TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(SUPPORT_FILES)" - -.PHONY: do-proto-toplev -do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex - echo "==> Making $(PACKAGE)-$(VER)/" - # Take out texinfo from a few places. - sed -e '/^all\.normal: /s/\all-texinfo //' \ - -e '/^ install-texinfo /d' \ - tmp - mv -f tmp Makefile.in - # - ./configure sun4 - $(MAKE) configure-target \ - ALL_GCC="" ALL_GCC_C="" ALL_GCC_CXX="" \ - CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)" - # Make links, and run "make diststuff" or "make info" when needed. - rm -rf proto-toplev ; mkdir proto-toplev - set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \ - for d in $$dirs ; do \ - if [ -d $$d ]; then \ - if [ ! -f $$d/Makefile ] ; then true ; \ - elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \ - (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \ - elif grep '^info:' $$d/Makefile >/dev/null ; then \ - (cd $$d ; $(MAKE) info ) || exit 1 ; \ - fi ; \ - if [ -d $$d/proto-$$d.dir ]; then \ - ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \ - else \ - ln -s ../$$d proto-toplev/$$d ; \ - fi ; \ - else ln -s ../$$d proto-toplev/$$d ; fi ; \ - done - cd etc && $(MAKE) info - $(MAKE) distclean - # - mkdir proto-toplev/etc - (cd proto-toplev/etc; \ - for i in $(ETC_SUPPORT); do \ - ln -s ../../etc/$$i . ; \ - done) - # - # Take out texinfo from configurable dirs - rm proto-toplev/configure.in - sed -e '/^host_tools=/s/texinfo //' \ - proto-toplev/configure.in - # - mkdir proto-toplev/texinfo - ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/ - if test -r texinfo/util/tex3patch ; then \ - mkdir proto-toplev/texinfo/util && \ - ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \ - else true; fi - chmod -R og=u . || chmod og=u `find . -print` - # - # Create .gmo files from .po files. - for f in `find . -name '*.po' -type f -print`; do \ - msgfmt -o `echo $$f | sed -e 's/\.po$$/.gmo/'` $$f ; \ - done - # - -rm -f $(PACKAGE)-$(VER) - ln -s proto-toplev $(PACKAGE)-$(VER) - -.PHONY: do-tar -do-tar: - echo "==> Making $(PACKAGE)-$(VER).tar" - -rm -f $(PACKAGE)-$(VER).tar - find $(PACKAGE)-$(VER) -follow -name CVS -prune -o -type f -print \ - | tar cTfh - $(PACKAGE)-$(VER).tar - -.PHONY: do-bz2 -do-bz2: - echo "==> Bzipping $(PACKAGE)-$(VER).tar.bz2" - -rm -f $(PACKAGE)-$(VER).tar.bz2 - $(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar - -.PHONY: do-md5sum -do-md5sum: - echo "==> Adding md5 checksum to top-level directory" - cd proto-toplev && find * -follow -name CVS -prune -o -type f -print \ - | xargs $(MD5PROG) > ../md5.sum - mv md5.sum proto-toplev - -.PHONY: do-djunpack -do-djunpack: - echo "==> Adding updated djunpack.bat to top-level directory" - echo - 's /gdb-[0-9\.]*/gdb-'"$(VER)"'/' - sed < djunpack.bat > djunpack.new \ - -e 's/gdb-[0-9][0-9\.]*/gdb-'"$(VER)"'/' - mv djunpack.new djunpack.bat - -rm -f proto-toplev/djunpack.bat - ln -s ../djunpack.bat proto-toplev/djunpack.bat - -TEXINFO_SUPPORT= texinfo/texinfo.tex -DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT) - -.PHONY: gas.tar.bz2 -GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms mkdep -gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas - $(MAKE) -f $(SELF) taz TOOL=gas \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" - -# The FSF "binutils" release includes gprof and ld. -.PHONY: binutils.tar.bz2 -BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms mkdep cpu -binutils.tar.bz2: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils - $(MAKE) -f $(SELF) taz TOOL=binutils \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)" - -.PHONY: gas+binutils.tar.bz2 -GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof -gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas - $(MAKE) -f $(SELF) taz TOOL=gas \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(GASB_SUPPORT_DIRS)" - -GNATS_SUPPORT_DIRS=include libiberty send-pr -gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats - $(MAKE) -f $(SELF) taz TOOL=gnats \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)" - -.PHONY: gdb.tar.bz2 -GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl -gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb - $(MAKE) -f $(SELF) gdb-taz TOOL=gdb \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(GDB_SUPPORT_DIRS)" -.PHONY: gdb.tar -gdb.tar: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb - $(MAKE) -f $(SELF) gdb-tar TOOL=gdb \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(GDB_SUPPORT_DIRS)" - -DEJAGNU_SUPPORT_DIRS= tcl expect libiberty -.PHONY: dejagnu.tar.bz2 -dejagnu.tar.bz2: $(DIST_SUPPORT) $(DEJAGNU_SUPPORT_DIRS) dejagnu - $(MAKE) -f $(SELF) taz TOOL=dejagnu \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(DEJAGNU_SUPPORT_DIRS)" - -.PHONY: gdb+dejagnu.tar.bz2 -GDBD_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl expect dejagnu -gdb+dejagnu.tar.bz2: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb - $(MAKE) -f $(SELF) gdb-taz TOOL=gdb PACKAGE=gdb+dejagnu \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)" -.PHONY: gdb+dejagnu.tar -gdb+dejagnu.tar: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb - $(MAKE) -f $(SELF) gdb-tar TOOL=gdb PACKAGE=gdb+dejagnu \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)" - -.PHONY: insight.tar.bz2 -INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui -insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb - $(MAKE) -f $(SELF) gdb-taz TOOL=gdb PACKAGE=insight \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)" -.PHONY: insight.tar -insight.tar: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb - $(MAKE) -f $(SELF) gdb-tar TOOL=gdb PACKAGE=insight \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)" - -.PHONY: insight+dejagnu.tar.bz2 -INSIGHTD_SUPPORT_DIRS= $(INSIGHT_SUPPORT_DIRS) expect dejagnu -insight+dejagnu.tar.bz2: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb - $(MAKE) -f $(SELF) gdb-taz TOOL=gdb PACKAGE="insight+dejagnu" \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)" -.PHONY: insight+dejagnu.tar -insight+dejagnu.tar: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb - $(MAKE) -f $(SELF) gdb-tar TOOL=gdb PACKAGE="insight+dejagnu" \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)" - -.PHONY: newlib.tar.bz2 -NEWLIB_SUPPORT_DIRS=libgloss -# taz configures for the sun4 target which won't configure newlib. -# We need newlib configured so that the .info files are made. -# Unfortunately, it is not enough to just configure newlib separately: -# taz will build the .info files but since SUBDIRS won't contain newlib, -# distclean won't be run (leaving Makefile, config.status, and the tmp files -# used in building the .info files, eg: *.def, *.ref). -# The problem isn't solvable however without a lot of extra work because -# target libraries are built in subdir $(target_alias) which gets nuked during -# the make distclean. For now punt on the issue of shipping newlib info files -# with newlib net releases and wait for a day when some native target (sun4?) -# supports newlib (if only minimally). -newlib.tar.bz2: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib - $(MAKE) -f $(SELF) taz TOOL=newlib \ - MD5PROG="$(MD5PROG)" \ - SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \ - DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib - -.NOEXPORT: -MAKEOVERRIDES= -- 2.47.3