diff options
author | nobody <> | 2003-03-03 20:50:21 +0000 |
---|---|---|
committer | nobody <> | 2003-03-03 20:50:21 +0000 |
commit | 900958cda09af0ca2839cc7e2a7c46355b051c83 (patch) | |
tree | 45e564da9eaed919ca56fc52f793cb0578b02a8b /gdb/testsuite/gdb.mi | |
parent | cddd45abf62af6ed70c8c67601a9f09da0a939b0 (diff) | |
download | binutils-gdb-900958cda09af0ca2839cc7e2a7c46355b051c83.tar.gz |
This commit was manufactured by cvs2svn to create branchcagney_offbyone-20030303-branchpoint
'cagney_offbyone-20030303-branch'.
Sprout from interps-20030202-branch 2003-02-02 23:00:07 UTC nobody 'This commit was manufactured by cvs2svn to create branch'
Cherrypick from master 2003-03-03 20:50:20 UTC Andrew Cagney <cagney@redhat.com> '2003-03-03 Andrew Cagney <cagney@redhat.com>':
ChangeLog
Makefile.def
Makefile.in
Makefile.tpl
bfd/ChangeLog
bfd/Makefile.am
bfd/Makefile.in
bfd/archures.c
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/bfd.c
bfd/coff-h8300.c
bfd/coff-ppc.c
bfd/coffcode.h
bfd/config.bfd
bfd/cpu-arm.c
bfd/doc/ChangeLog
bfd/doc/bfd.texinfo
bfd/doc/fdl.texi
bfd/ecoff.c
bfd/elf-bfd.h
bfd/elf-eh-frame.c
bfd/elf.c
bfd/elf32-arm.h
bfd/elf32-cris.c
bfd/elf32-hppa.c
bfd/elf32-i386.c
bfd/elf32-m68k.c
bfd/elf32-mips.c
bfd/elf32-ppc.c
bfd/elf32-ppc.h
bfd/elf32-s390.c
bfd/elf32-sh.c
bfd/elf32-sparc.c
bfd/elf32-vax.c
bfd/elf64-alpha.c
bfd/elf64-hppa.c
bfd/elf64-mips.c
bfd/elf64-mmix.c
bfd/elf64-ppc.c
bfd/elf64-ppc.h
bfd/elf64-s390.c
bfd/elf64-sparc.c
bfd/elf64-x86-64.c
bfd/elfcore.h
bfd/elflink.c
bfd/elflink.h
bfd/elfn32-mips.c
bfd/elfxx-ia64.c
bfd/elfxx-mips.c
bfd/format.c
bfd/ieee.c
bfd/libbfd.h
bfd/libcoff.h
bfd/mmo.c
bfd/oasys.c
bfd/po/da.po
bfd/reloc.c
bfd/section.c
bfd/syms.c
bfd/targets.c
bfd/version.h
config.guess
config.sub
configure
configure.in
gdb/ChangeLog
gdb/MAINTAINERS
gdb/Makefile.in
gdb/NEWS
gdb/PROBLEMS
gdb/TODO
gdb/acinclude.m4
gdb/aclocal.m4
gdb/ada-exp.y
gdb/ada-lang.c
gdb/ada-lang.h
gdb/ada-typeprint.c
gdb/alpha-tdep.c
gdb/arch-utils.c
gdb/arm-linux-tdep.c
gdb/arm-tdep.c
gdb/avr-tdep.c
gdb/ax-gdb.c
gdb/block.c
gdb/block.h
gdb/blockframe.c
gdb/breakpoint.c
gdb/breakpoint.h
gdb/buildsym.c
gdb/buildsym.h
gdb/c-exp.y
gdb/c-valprint.c
gdb/cli-out.c
gdb/cli-out.h
gdb/cli/cli-cmds.c
gdb/cli/cli-decode.c
gdb/cli/cli-dump.c
gdb/cli/cli-interp.c
gdb/cli/cli-script.c
gdb/cli/cli-setshow.c
gdb/coff-pe-read.c
gdb/coff-pe-read.h
gdb/coffread.c
gdb/config.in
gdb/config/djgpp/fnchange.lst
gdb/config/h8500/h8500.mt
gdb/config/h8500/tm-h8500.h
gdb/config/i386/nm-i386.h
gdb/config/i386/nm-i386sco5.h
gdb/config/i386/nm-i386sol2.h
gdb/config/i386/tm-ptx.h
gdb/config/ia64/tm-ia64.h
gdb/config/m32r/m32r.mt
gdb/config/m32r/tm-m32r.h
gdb/config/mn10200/mn10200.mt
gdb/config/mn10200/tm-mn10200.h
gdb/config/pa/tm-hppa.h
gdb/config/pa/tm-hppa64.h
gdb/config/s390/nm-linux.h
gdb/config/sparc/nm-sun4sol2.h
gdb/config/sparc/tm-sp64.h
gdb/config/sparc/tm-sparc.h
gdb/config/z8k/tm-z8k.h
gdb/config/z8k/z8k.mt
gdb/configure
gdb/configure.host
gdb/configure.in
gdb/configure.tgt
gdb/cp-valprint.c
gdb/cris-tdep.c
gdb/d10v-tdep.c
gdb/dbxread.c
gdb/defs.h
gdb/disasm.c
gdb/doc/ChangeLog
gdb/doc/Makefile.in
gdb/doc/gdb.texinfo
gdb/doc/gdbint.texinfo
gdb/doublest.c
gdb/dwarf2cfi.c
gdb/dwarf2expr.c
gdb/dwarf2expr.h
gdb/dwarf2loc.c
gdb/dwarf2loc.h
gdb/dwarf2read.c
gdb/dwarfread.c
gdb/elfread.c
gdb/event-top.c
gdb/event-top.h
gdb/expprint.c
gdb/f-exp.y
gdb/f-lang.c
gdb/f-valprint.c
gdb/findvar.c
gdb/frame.c
gdb/frame.h
gdb/frv-tdep.c
gdb/gdb.c
gdb/gdb_mbuild.sh
gdb/gdb_thread_db.h
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/gnu-v2-abi.c
gdb/h8300-tdep.c
gdb/h8500-tdep.c
gdb/hppa-tdep.c
gdb/hpread.c
gdb/hpux-thread.c
gdb/i386-interix-tdep.c
gdb/i386-linux-tdep.c
gdb/i386-tdep.c
gdb/i386bsd-tdep.c
gdb/ia64-linux-nat.c
gdb/ia64-tdep.c
gdb/infcmd.c
gdb/inflow.c
gdb/inflow.h
gdb/infptrace.c
gdb/infrun.c
gdb/inftarg.c
gdb/infttrace.c
gdb/interps.c
gdb/interps.h
gdb/jv-exp.y
gdb/jv-lang.c
gdb/jv-typeprint.c
gdb/jv-valprint.c
gdb/linespec.c
gdb/linux-proc.c
gdb/lynx-nat.c
gdb/m2-exp.y
gdb/m32r-rom.c
gdb/m32r-stub.c
gdb/m32r-tdep.c
gdb/m68hc11-tdep.c
gdb/m68k-tdep.c
gdb/main.c
gdb/main.h
gdb/maint.c
gdb/mcore-tdep.c
gdb/mdebugread.c
gdb/mi/ChangeLog
gdb/mi/gdbmi.texinfo
gdb/mi/mi-cmd-env.c
gdb/mi/mi-cmd-stack.c
gdb/mi/mi-cmds.c
gdb/mi/mi-cmds.h
gdb/mi/mi-console.c
gdb/mi/mi-console.h
gdb/mi/mi-interp.c
gdb/mi/mi-main.c
gdb/mi/mi-main.h
gdb/minsyms.c
gdb/mips-tdep.c
gdb/mipsread.c
gdb/mn10200-tdep.c
gdb/mn10300-tdep.c
gdb/monitor.c
gdb/nlmread.c
gdb/ns32k-tdep.c
gdb/objc-exp.y
gdb/objc-lang.c
gdb/objc-lang.h
gdb/objfiles.c
gdb/objfiles.h
gdb/observer.c
gdb/observer.h
gdb/osabi.c
gdb/p-exp.y
gdb/p-valprint.c
gdb/parse.c
gdb/parser-defs.h
gdb/ppc-linux-nat.c
gdb/ppc-linux-tdep.c
gdb/printcmd.c
gdb/proc-api.c
gdb/procfs.c
gdb/rdi-share/ardi.c
gdb/regcache.c
gdb/regcache.h
gdb/remote-e7000.c
gdb/remote-sim.c
gdb/remote.c
gdb/rs6000-tdep.c
gdb/s390-tdep.c
gdb/sh-tdep.c
gdb/sol-thread.c
gdb/solib-sunos.c
gdb/solib.c
gdb/solist.h
gdb/somread.c
gdb/somsolib.c
gdb/sparc-nat.c
gdb/sparc-tdep.c
gdb/stabsread.c
gdb/stack.c
gdb/symfile.c
gdb/symfile.h
gdb/symm-nat.c
gdb/symmisc.c
gdb/symtab.c
gdb/symtab.h
gdb/target.c
gdb/target.h
gdb/testsuite/ChangeLog
gdb/testsuite/Makefile.in
gdb/testsuite/configure.in
gdb/testsuite/gdb.base/advance.c
gdb/testsuite/gdb.base/advance.exp
gdb/testsuite/gdb.base/dump.exp
gdb/testsuite/gdb.base/exprs.exp
gdb/testsuite/gdb.base/funcargs.exp
gdb/testsuite/gdb.base/list.exp
gdb/testsuite/gdb.base/maint.exp
gdb/testsuite/gdb.base/ptype.exp
gdb/testsuite/gdb.base/restore.c
gdb/testsuite/gdb.base/until.exp
gdb/testsuite/gdb.base/watchpoint.exp
gdb/testsuite/gdb.c++/anon-union.exp
gdb/testsuite/gdb.c++/classes.exp
gdb/testsuite/gdb.c++/cplusfuncs.exp
gdb/testsuite/gdb.c++/inherit.exp
gdb/testsuite/gdb.c++/local.cc
gdb/testsuite/gdb.c++/local.exp
gdb/testsuite/gdb.c++/overload.cc
gdb/testsuite/gdb.c++/overload.exp
gdb/testsuite/gdb.c++/ovldbreak.exp
gdb/testsuite/gdb.c++/pr-1023.cc
gdb/testsuite/gdb.c++/pr-1023.exp
gdb/testsuite/gdb.c++/templates.exp
gdb/testsuite/gdb.c++/virtfunc.exp
gdb/testsuite/gdb.disasm/Makefile.in
gdb/testsuite/gdb.disasm/mn10200.exp
gdb/testsuite/gdb.mi/ChangeLog
gdb/testsuite/gdb.mi/mi-cli.exp
gdb/testsuite/gdb.mi/mi-syn-frame.c
gdb/testsuite/gdb.mi/mi-syn-frame.exp
gdb/testsuite/gdb.trace/Makefile.in
gdb/testsuite/lib/gdb.exp
gdb/thread.c
gdb/top.c
gdb/tracepoint.c
gdb/tui/ChangeLog
gdb/tui/tui-hooks.c
gdb/tui/tui-interp.c
gdb/tui/tui.c
gdb/tui/tuiData.h
gdb/tui/tuiIO.c
gdb/typeprint.c
gdb/ui-out.c
gdb/ui-out.h
gdb/utils.c
gdb/v850-tdep.c
gdb/valops.c
gdb/value.h
gdb/values.c
gdb/vax-tdep.c
gdb/version.in
gdb/win32-nat.c
gdb/wrapper.h
gdb/x86-64-linux-nat.c
gdb/x86-64-tdep.c
gdb/xcoffread.c
gdb/xstormy16-tdep.c
gdb/z8k-tdep.c
include/ChangeLog
include/elf/ChangeLog
include/elf/arm.h
include/elf/ia64.h
include/elf/ppc.h
include/elf/ppc64.h
include/gdb/ChangeLog
include/gdb/remote-sim.h
include/libiberty.h
include/opcode/ChangeLog
include/opcode/h8300.h
libiberty/ChangeLog
libiberty/Makefile.in
libiberty/acconfig.h
libiberty/aclocal.m4
libiberty/config.in
libiberty/configure
libiberty/configure.in
libiberty/cplus-dem.c
libiberty/functions.texi
libiberty/libiberty.texi
libiberty/lrealpath.c
libiberty/make-relative-prefix.c
libiberty/physmem.c
libtool.m4
ltcf-cxx.sh
ltcf-gcj.sh
ltconfig
opcodes/ChangeLog
opcodes/fr30-desc.c
opcodes/hppa-dis.c
opcodes/i386-dis.c
opcodes/mips-dis.c
readline/ChangeLog.gdb
readline/Makefile.in
readline/aclocal.m4
readline/config.h.in
readline/configure
readline/rlmbutil.h
readline/shlib/Makefile.in
sim/ChangeLog
sim/arm/ChangeLog
sim/arm/armos.c
sim/arm/wrapper.c
sim/common/ChangeLog
sim/common/Make-common.in
sim/common/nrun.c
sim/common/sim-base.h
sim/common/sim-engine.c
sim/common/sim-engine.h
sim/common/sim-hload.c
sim/common/sim-module.c
sim/common/sim-utils.h
sim/d10v/ChangeLog
sim/d10v/interp.c
sim/erc32/ChangeLog
sim/erc32/interf.c
sim/h8300/ChangeLog
sim/h8300/compile.c
sim/h8500/ChangeLog
sim/h8500/compile.c
sim/i960/ChangeLog
sim/i960/sim-if.c
sim/m32r/ChangeLog
sim/m32r/sim-if.c
sim/m68hc11/ChangeLog
sim/m68hc11/Makefile.in
sim/m68hc11/interp.c
sim/mcore/ChangeLog
sim/mcore/interp.c
sim/mips/ChangeLog
sim/mips/interp.c
sim/mn10200/ChangeLog
sim/mn10200/interp.c
sim/mn10300/ChangeLog
sim/mn10300/am33.igen
sim/mn10300/dv-mn103tim.c
sim/mn10300/interp.c
sim/ppc/ChangeLog
sim/ppc/sim_calls.c
sim/sh/ChangeLog
sim/sh/gencode.c
sim/sh/interp.c
sim/v850/ChangeLog
sim/v850/interp.c
sim/z8k/ChangeLog
sim/z8k/iface.c
Delete:
gdb/config/i386/gdbserve.mt
gdb/config/i386/i386sco5.mt
gdb/config/i386/i386v4.mt
gdb/config/i386/i386v42mp.mt
gdb/config/m68k/nm-apollo68b.h
gdb/config/m68k/nm-hp300bsd.h
gdb/config/m68k/tm-apollo68b.h
gdb/config/m68k/tm-es1800.h
gdb/config/m68k/tm-hp300bsd.h
gdb/config/m68k/tm-mac.h
gdb/config/m68k/xm-apollo68b.h
gdb/config/pa/hpux1020.mt
gdb/config/pa/hpux11.mt
gdb/config/pa/hpux11w.mt
gdb/config/powerpc/gdbserve.mt
gdb/config/powerpc/ppcle-eabi.mt
gdb/config/powerpc/ppcle-sim.mt
gdb/config/powerpc/tm-ppc-sim.h
gdb/config/sparc/sp64sim.mt
gdb/config/sparc/tm-sp64sim.h
sim/common/sim-break.c
sim/common/sim-break.h
Diffstat (limited to 'gdb/testsuite/gdb.mi')
-rw-r--r-- | gdb/testsuite/gdb.mi/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-cli.exp | 208 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-syn-frame.c | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-syn-frame.exp | 7 |
4 files changed, 225 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.mi/ChangeLog b/gdb/testsuite/gdb.mi/ChangeLog index 2e2a82e3c85..d08946276c9 100644 --- a/gdb/testsuite/gdb.mi/ChangeLog +++ b/gdb/testsuite/gdb.mi/ChangeLog @@ -1,3 +1,7 @@ +2003-02-23 Stephane Carrez <stcarrez@nerim.fr> + + * mi-syn-frame.exp: Don't run this test when gdb,nosignals is set. + 2002-12-13 Jeff Johnston <jjohnstn@redhat.com> * mi-basics.exp: Change tests for -environment-directory. Also add diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp new file mode 100644 index 00000000000..62501e03a19 --- /dev/null +++ b/gdb/testsuite/gdb.mi/mi-cli.exp @@ -0,0 +1,208 @@ +# Copyright 2002, 2003 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 that GDB's console can be accessed via the MI. +# Specifically, we are testing the "interpreter-exec" command and that +# the commands that are executed via this command are properly executed. +# Console commands executed via MI should use MI output wrappers, MI event +# handlers, etc. + +load_lib mi-support.exp +set MIFLAGS "-i=mi" + +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_gdb_reinitialize_dir $srcdir/$subdir + +mi_gdb_test "-interpreter-exec" \ + {\^error,msg="mi_cmd_interpreter_exec: Usage: -interpreter-exec interp command"} \ + "-interpreter-exec with no arguments" + +mi_gdb_test "-interpreter-exec console" \ + {\^error,msg="mi_cmd_interpreter_exec: Usage: -interpreter-exec interp command"} \ + "-interpreter-exec with one argument" + +mi_gdb_test "-interpreter-exec bogus command" \ + {\^error,msg="mi_cmd_interpreter_exec: could not find interpreter \\\"bogus\\\""} \ + "-interpreter-exec with bogus interpreter" + +set msg {Undefined command: \\\"bogus\\\"\. Try \\\"help\\\"\.} +mi_gdb_test "-interpreter-exec console bogus" \ + "&\\\"$msg\\\\n\\\".*\\^error,msg=\\\"$msg\\\".*" \ + "-interpreter-exec console bogus" + +# NOTE: cagney/2003-02-03: Not yet. +# mi_gdb_test "-interpreter-exec console \"file $binfile\"" \ +# {(=.*)+\^done} \ +# "-interpreter-exec console \"file \$binfile\"" +mi_gdb_test "-interpreter-exec console \"file $binfile\"" \ + {\^done} \ + "-interpreter-exec console \"file \$binfile\"" + +mi_run_to_main + +mi_gdb_test "-interpreter-exec console \"set args foobar\"" \ + {\^done} \ + "-interpreter-exec console \"set args foobar\"" + +mi_gdb_test "-interpreter-exec console \"show args\"" \ + {\~"Argument list to give program being debugged when it is started is \\\"foobar\\\"\.\\n".*\^done} \ + "-interpreter-exec console \"show args\"" + +# NOTE: cagney/2003-02-03: Not yet. +# mi_gdb_test "-interpreter-exec console \"break callee4\"" \ +# {(&.*)*.*~"Breakpoint 2 at.*\\n".*=breakpoint-create,number="2".*\^done} \ +# "-interpreter-exec console \"break callee4\"" +mi_gdb_test "-interpreter-exec console \"break callee4\"" \ + {(&.*)*.*~"Breakpoint 2 at.*\\n".*\^done} \ + "-interpreter-exec console \"break callee4\"" + +mi_gdb_test "-interpreter-exec console \"info break\"" \ + {\~"Num[ \t]*Type[ \t]*Disp[ \t]*Enb[ \t]*Address[ \t]*What\\n".*~"2[ \t]*breakpoint[ \t]*keep[ \t]*y[ \t]*0x[0-9A-Fa-f]+[ \t]*in callee4 at .*basics.c:[0-9]+\\n".*\^done} \ + "-interpreter-exec console \"info break\"" + +mi_gdb_test "-interpreter-exec console \"set listsize 1\"" \ + {\^done} \ + "-interpreter-exec console \"set listsize 1\"" + +mi_gdb_test "-interpreter-exec console \"list\"" \ + {.*\~"32[ \t(\\t)]*callee1.*\\n".*\^done} \ + "-interpreter-exec console \"list\"" + +# # NOTE: cagney/2003-02-03: Not yet. +# mi_gdb_test "-exec-continue" \ +# {.*\*stopped,reason="breakpoint-hit",.*func="callee4".*file=".*basics.c",line="8"\}} \ +# "-interpreter-exec console \"continue to callee4\"" +send_gdb "999-exec-continue\n" +gdb_expect { + -re "999\\^running\[\r\n\]+$mi_gdb_prompt.*999\\*stopped,reason=.breakpoint-hit.*$mi_gdb_prompt$" { + pass "continue to callee4" + } + timeout { + fail "continue to callee4 (timeout)" + } +} + +# NOTE: cagney/2003-02-03: Not yet. +# mi_gdb_test "100-interpreter-exec console \"delete 2\"" \ +# {.*=breakpoint-delete,number=\"2\".*\^done} \ +# "-interpreter-exec console \"delete 2\"" +mi_gdb_test "100-interpreter-exec console \"delete 2\"" \ + {100\^done} \ + "-interpreter-exec console \"delete 2\"" + +# NOTE: cagney/2003-02-03: Not yet. +# mi_gdb_test "200-interpreter-exec console \"up\"" \ +# {.*=selected-frame-level-changed,level="1".*\^done} \ +# "-interpreter-exec console \"up\"" +mi_gdb_test "200-interpreter-exec console \"up\"" \ + {200\^done} \ + "-interpreter-exec console \"up\"" + +# NOTE: cagney/2003-02-03: Not yet. +# mi_gdb_test "300-interpreter-exec console \"down\"" \ +# {.*=selected-frame-level-changed,level="0".*\^done} \ +# "-interpreter-exec console \"down\"" +mi_gdb_test "300-interpreter-exec console \"down\"" \ + {300\^done} \ + "-interpreter-exec console \"down\"" + +# NOTE: cagney/2003-02-03: Not yet. +# mi_gdb_test "-interpreter-exec console \"frame 2\"" \ +# {.*=selected-frame-level-changed,level="2".*\^done} \ +# "-interpreter-exec console \"frame 2\"" +mi_gdb_test "400-interpreter-exec console \"frame 2\"" \ + {400\^done} \ + "-interpreter-exec console \"frame 2\"" + +# NOTE: cagney/2003-02-03: Not yet. +# mi_gdb_test "-stack-select-frame 0" \ +# {.*=selected-frame-level-changed,level="0".*\^done} \ +# "-stack-select-frame 0" +mi_gdb_test "500-stack-select-frame 0" \ + {500\^done} \ + "-stack-select-frame 0" + +# NOTE: cagney/2003-02-03: Not yet. +# mi_gdb_test "-break-insert -t basics.c:35" \ +# {.*=breakpoint-create,number="3".*\^done} \ +# "-break-insert -t basics.c:35" +mi_gdb_test "600-break-insert -t basics.c:35" \ + {600\^done,bkpt=.number="3",type="breakpoint".*\}} \ + "-break-insert -t basics.c:35" + +# mi_gdb_test "-exec-continue" \ +# {.*\*stopped.*,file=".*basics.c",line="35"\}} \ +# "-exec-continue to line 35" +send_gdb "700-exec-continue\n" +gdb_expect { + -re "700\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped.*,file=.*basics.c.,line=.35.*$mi_gdb_prompt$" { + pass "-exec-continue to line 35" + } + timeout { + fail "-exec-continue to line 35" + } +} + +# NOTE: cagney/2003-02-03: Not yet. +# mi_gdb_test "-exec-next" \ +# {.*\*stopped,reason="end-stepping-range",.*,file=".*basics.c",line="37"\}} \ +# "-exec-next to line 37" +send_gdb "800-exec-next\n" +gdb_expect { + -re "800\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped,reason=.end-stepping-range.*,file=.*basics.c.,line=.37.*$mi_gdb_prompt$" { + pass "-exec-next to line 37" + } + timeout { + fail "-exec-next to line 37" + } +} + +mi_gdb_test "-interpreter-exec console \"list\"" \ + {\~"37[ \t(\\t)]*return 0;\\n".*\^done} \ + "-interpreter-exec console \"list\" at basics.c:37" + +mi_gdb_test "-interpreter-exec console \"help set args\"" \ + {\~"Set argument list to give program being debugged when it is started\.\\nFollow this command with any number of args, to be passed to the program\.".*\^done} \ + "-interpreter-exec console \"help set args\"" + +# NOTE: cagney/2003-02-03: Not yet. +# mi_gdb_test "-interpreter-exec console \"set \$pc=0x0\"" \ +# {.*=target-changed.*\^done} \ +# "-interpreter-exec console \"set \$pc=0x0\"" +mi_gdb_test "888-interpreter-exec console \"set \$pc=0x0\"" \ + {888\^done} \ + "-interpreter-exec console \"set \$pc=0x0\"" + +#mi_gdb_test "-interpreter-exec console \"\"" \ + {} \ + "-interpreter-exec console \"\"" + +mi_gdb_exit +return 0 diff --git a/gdb/testsuite/gdb.mi/mi-syn-frame.c b/gdb/testsuite/gdb.mi/mi-syn-frame.c index 83d2d46876e..580b5342716 100644 --- a/gdb/testsuite/gdb.mi/mi-syn-frame.c +++ b/gdb/testsuite/gdb.mi/mi-syn-frame.c @@ -43,11 +43,16 @@ handler (int sig) subroutine (sig); } +/* The first statement in subroutine () is a place for a breakpoint. + Without it, the breakpoint is put on the while comparison and will + be hit at each iteration. */ + void subroutine (int in) { - while (in < 100) - in++; + int count = in; + while (count < 100) + count++; } void diff --git a/gdb/testsuite/gdb.mi/mi-syn-frame.exp b/gdb/testsuite/gdb.mi/mi-syn-frame.exp index 49f97721e80..44ce8452fba 100644 --- a/gdb/testsuite/gdb.mi/mi-syn-frame.exp +++ b/gdb/testsuite/gdb.mi/mi-syn-frame.exp @@ -1,4 +1,4 @@ -# Copyright 2002 Free Software Foundation, Inc. +# Copyright 2002, 2003 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 @@ -20,6 +20,11 @@ # Test MI output with synthetic frames on the stack (call dummies, # signal handlers). +if [target_info exists gdb,nosignals] { + verbose "Skipping mi-syn-frame.exp because of nosignals." + continue +} + load_lib mi-support.exp set MIFLAGS "-i=mi" |