summaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2002-05-08 18:26:26 +0000
committerJim Blandy <jimb@codesourcery.com>2002-05-08 18:26:26 +0000
commit6b76fc8f56d26af247b4036f7dd23c3e9b2f8ebe (patch)
tree47aa7046d5bf20e18b81f6c7dca058b1ec274bcf /gdb/testsuite
parentacb2f9a66ffe7facdcdb42c2ac648c23f2d26dbd (diff)
downloadgdb-6b76fc8f56d26af247b4036f7dd23c3e9b2f8ebe.tar.gz
Add first preprocessor macro-expansion files.
* macroexp.c, macroexp.h, macrotab.c, macrotab.h: New files. * Makefile.in (SFILES): Add macrotab.c, macroexp.c. (splay_tree_h, macroexp_h, macrotab_h): New variable. (HFILES_NO_SRCDIR): Add macrotab.h, macroexp.h. (COMMON_OBS): Add macrotab.o, macroexp.o. (macroexp.o, macrotab.o): New rules.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.gdbtk/ChangeLog283
-rw-r--r--gdb/testsuite/gdb.gdbtk/Makefile.in36
-rw-r--r--gdb/testsuite/gdb.gdbtk/README421
-rw-r--r--gdb/testsuite/gdb.gdbtk/browser.exp41
-rw-r--r--gdb/testsuite/gdb.gdbtk/browser.test686
-rw-r--r--gdb/testsuite/gdb.gdbtk/c_variable.c296
-rw-r--r--gdb/testsuite/gdb.gdbtk/c_variable.exp42
-rw-r--r--gdb/testsuite/gdb.gdbtk/c_variable.test2060
-rw-r--r--gdb/testsuite/gdb.gdbtk/configure1010
-rw-r--r--gdb/testsuite/gdb.gdbtk/configure.in18
-rw-r--r--gdb/testsuite/gdb.gdbtk/console.exp42
-rw-r--r--gdb/testsuite/gdb.gdbtk/console.test491
-rw-r--r--gdb/testsuite/gdb.gdbtk/cpp_variable.cc33
-rw-r--r--gdb/testsuite/gdb.gdbtk/cpp_variable.exp48
-rw-r--r--gdb/testsuite/gdb.gdbtk/cpp_variable.h54
-rw-r--r--gdb/testsuite/gdb.gdbtk/cpp_variable.test588
-rw-r--r--gdb/testsuite/gdb.gdbtk/defs306
-rw-r--r--gdb/testsuite/gdb.gdbtk/list0.c43
-rw-r--r--gdb/testsuite/gdb.gdbtk/list0.h37
-rw-r--r--gdb/testsuite/gdb.gdbtk/list1.c39
-rw-r--r--gdb/testsuite/gdb.gdbtk/simple.c20
-rw-r--r--gdb/testsuite/gdb.gdbtk/srcwin.exp71
-rw-r--r--gdb/testsuite/gdb.gdbtk/srcwin.test1191
-rw-r--r--gdb/testsuite/gdb.gdbtk/srcwin2.test898
-rw-r--r--gdb/testsuite/gdb.gdbtk/srcwin3.test789
-rw-r--r--gdb/testsuite/gdb.gdbtk/stack1.c231
-rw-r--r--gdb/testsuite/gdb.gdbtk/stack2.c107
-rw-r--r--gdb/testsuite/gdb.gdbtk/windows.exp41
-rw-r--r--gdb/testsuite/gdb.gdbtk/windows.test131
29 files changed, 0 insertions, 10053 deletions
diff --git a/gdb/testsuite/gdb.gdbtk/ChangeLog b/gdb/testsuite/gdb.gdbtk/ChangeLog
deleted file mode 100644
index d161686b320..00000000000
--- a/gdb/testsuite/gdb.gdbtk/ChangeLog
+++ /dev/null
@@ -1,283 +0,0 @@
-2002-04-26 Martin M. Hunt <hunt@redhat.com>
-
- * defs (gdbtk_test_done): Call gdbtk_force_quit.
-
-2002-04-26 Martin M. Hunt <hunt@redhat.com>
-
- * srcwin.test (click): Take a button number as an arg.
- Generate a ButtonPress event then a ButtonRelease event
- for that button number.
- (4.4): Fix args for click().
- (5.1): Fix results again.
-
-2002-03-07 Martin M. Hunt <hunt@redhat.com>
-
- * srcwin.test (5.1): Adjust line numbers to
- test now runs correctly.
-
-2002-01-18 Keith Seitz <keiths@redhat.com>
-
- * console.test: Don't rely on "event generate" to do
- keystrokes. It just doesn't work. Use the console window's
- "test" method instead.
- Use Console::test instead of Console::get_text.
-
-2002-01-15 Keith Seitz <keiths@redhat.com>
-
- * c_variable.test (1.4,2.14): Remove test for local frame
- variables. Varobj now forces evaluation in the current frame
- by default.
- (2.15): Ignore any changes and only check for out of scope
- locals (which is still unsupported).
- * cpp_variable.test (1.1): Support alternative names for
- local scope.
- (1.6a): Catch call to gdb_cmd to prevent an error from
- throwing testsuite into la-la land. Add to test.
- (1.7): Ignore results from children during step, since
- they may or may not change value when the parent changes.
- (2.2a): New test incorperating gdb_cmd (also wrapped in
- catch).
- (2.22a): Likewise.
- (2.71a): Likewise.
-
-2001-12-20 Keith Seitz <keiths@redhat.com>
-
- * cpp_variable.test: Catch non-test calls in case we
- could not run.
-
-2001-10-25 Keith Seitz <keiths@redhat.com>
-
- * defs (_report_error): Fix typo.
- (show_warning): Redefine the standard warning handler
- so that we don't end up stalling tests with a warning dialog.
-
- * windows.exp: New file.
- * windows.test: New file.
-
-2001-10-08 Keith Seitz <keiths@redhat.com>
-
- * c_variable.test (check_update): Forget about returning
- the "unchanged" list. It unneccessarily complicates things.
- Update all callers.
- * cpp_variable.test: Likewise.
-
-2001-08-30 Keith Seitz <keiths@redhat.com>
-
- * README: Update documentation to reflect recent changes.
- * browser.exp: Load the insight testsuite support library.
- * c_variable.exp: Likewise.
- * console.exp: Likewise.
- * cpp_variable.exp: Likewise.
- * srcwin.exp: Likewise.
-
-2001-08-16 Keith Seitz <keiths@redhat.com>
-
- * cpp_variable.test (2.29, 2.30, 2.43, 2.63, 2.72): Char
- pointers can now be dereferenced. Update test to reflect
- this change in varobj.
- * c_variable.test (4.9, 4.10, 4.47, 4.48, 5.1, 5.2, 5.3,
- 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 5.17, 5.18, 5.43, 5.44, 5.47,
- 5.48, 5.49, 5.50, 5.51, 5.53, 6.30): Likewise.
-
-2001-08-13 Jeff Holcomb <jeffh@redhat.com>
-
- * cpp_variable.test: Use gdbtk_test_run to start the test
- program.
-
-2001-05-07 Keith Seitz <keiths@cygnus.com>
-
- * README: New file.
-
- * configure.in: Check for executable filename extension.
- * Makefile.in: Add filename extensions.
- * configure: Regenerated.
-
- * defs: Fix typo setting _test(verbose).
- (gdbtk_test_file): New proc to load executables into gdbtk.
- (gdbtk_test_run): New proc to run executables on gdbtk.
- * browser.exp: Don't check if DISPLAY is set: let
- gdbtk_initialize_display do it all for us.
- Call gdbtk_done when finished with tests.
- * c_variable.exp: Ditto.
- * console.exp: Ditto.
- * cpp_variable.exp: Ditto.
- Only run tests if c++ is supported in the configuration.
- * srcwin.exp: Ditto the DISPLAY stuff.
- Accumulate all test results for the end and report them then.
-
- * browser.test: Use gdbtk_test_file and gdbtk_test_run
- to load and run an executable.
- * c_variable.test: Use gdbtk_test_file and gdbtk_test_run
- to load and run an executable.
- * srcwin.test: Ditto.
- * srcwin1.test: Ditto.
- * srcwin2.test: Ditto.
-
- * browser.test: (set_search_mode): Use "configure
- -value" not "entryset" to set the combobox's value. We need
- to have the command fired.
- (browser-3.5): Remove trailing whitespace which causes test to
- fail.
- (browser-4.4): Expect something rational. Regexp "\_1$" cannot
- match "func_10"!
- (browser-4.5): Ditto.
- (browser-5.12): Select all files for search to make test
- match description.
- (browser-6.2): Renamed from another test also calledd 6.1.
- (browser-7.1): Delete all breakpoints at once without from_tty.
- Select all entries in the comobox before invoking BP set/delete
- button.
- (browser-7.2): Ditto.
-
- * list0.c, list1.c, list0.h: New files. Grabbed from gdb.base.
- * srcwin.exp: Use these local files instead of those in gdb.base.
-
-1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * cpp_variable.test: Add test (2.75) to verify
- that a baseclass member value was effectively changed.
-
-1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * cpp_variable.test: Update for new variable
- code.
-
-1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * c_variable.test: Update for new variable code.
-
-1999-09-17 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * cpp_variable.h (class V): Add type to virtual function
- declaration.
-
-1999-06-08 Fernando Nasser <fnasser@totem.to.cygnus.com>
-
- * browser.exp: Use untested and not warning when DISPLAY is
- not found.
- * c_variable.exp: Same.
- * console.exp: Same.
- * cpp_variable.exp: Same.
- * srcwin.exp: Same.
-
-1999-04-12 Keith Seitz <keiths@cygnus.com>
-
- * cpp_variable.exp: Pass the "c++" flag to gdb_compile so
- that it can grab the right compiler.
-
-1999-03-16 Martin Hunt <hunt@cygnus.com>
-
- * srcwin.test (srcwin-4.5): Change variable name
- to $b so test will run again.
-
-1999-03-03 James Ingham <jingham@cygnus.com>
-
- * browser.test: Fixed up to match the new function browser.
- This is not done yet...
-
- * srcwin.test: Check for errors when the bbox is called for a text
- item that is not on screen (so bbox is ""). Return something more
- useful.
-
-1999-03-01 James Ingham <jingham@cygnus.com>
-
- Changelog entries merged over from gdb development branch.
-
- 1999-01-12 Martin Hunt <hunt@cygnus.com>
- * srcwin.test: Add a bunch of tests for the source
- window filename and function comboboxes. Add in stack tests.
-
- 1999-01-11 Martin Hunt <hunt@cygnus.com>
- * srcwin.test: New file. Source Window tests.
- * srcwin.exp: New file. Source Window tests.
-
- Wed Jan 6 09:22:52 1999 Keith Seitz <keiths@cygnus.com>
- * c_variable.test (c_variable-1.9): Add new
- test to check for creation of a variable that is really a type.
- (c_variable-7.81): Use "output" instead of "print" to get PC.
- Include missing bits of test.
-
- * cpp_variable.test (cpp_variable-1.6): Default format
- is now "natural", not "hexadecimal"
- (cpp_variable-2.22): Ditto.
- (cpp_variable-2.24): Force format to hex before getting value.
-
- * cpp_variable.exp: Supply missing arg to gdbtk_analyze_results.
-
- Tue Jan 5 12:40:52 1999 Keith Seitz <keiths@cygnus.com>
- * gdb.gdbtk/c_variable.c, c_variable.test, c_variable.exp: New C
- language tests for variable object interface.
-
- * gdb.gdbtk/cpp_variable.h, cpp_variable.cc, cpp_variable.test,
- cpp_variable.exp: New C++ language tests for variable object
- interface.
-
- * gdb.gdbtk/Makefile.in (EXECUTABLES): Add c_variable and cpp_variable.
-
- Tue Jan 5 12:33:47 1999 Keith Seitz <keiths@cygnus.com>
- lib/gdb.exp (gdbtk_analyze_results): Generic function
- for outputting results of test run.
-
- * gdb.gdbtk/defs (gdbtk_test): Handle xpass and xfail.
- (gdbtk_test_error): New proc which handles error aborts.
-
- * gdb.gdbtk/console.exp: Use gdbtk_analyze_results.
- Check if we have a valid DISPLAY before running.
- * gdb.gdbtk/browser.exp: Ditto.
-
- 1998-12-07 Martin M. Hunt <hunt@cygnus.com>
- * lib/gdb.exp (gdbtk_start): Fix path for itcl library.
- * gdb.gdbtk/browser.test: Change "manage open" to ManagedWin::open.
- * gdb.gdbtk/console.test: Same.
- * gdb.gdbtk/*: Update from devo.
-
- Fri Jul 24 14:57:19 1998 Keith Seitz <keiths@cygnus.com>
- * gdb.gdbtk/Makefile.in: Add new example program "stack".
- * gdb.gdbtk/browser.test,browser.exp: Add browser window
- tests.
- * gdb.gdbtk/stack1.c,stack2.c: Test case for browser window.
-
-1999-02-22 Martin Hunt <hunt@cygnus.com>
-
- * srcwin.test (move_mouse_to): Fix typo.
-
-1999-02-03 Martin Hunt <hunt@cygnus.com>
-
- * console.test (clear_command_line): Add tests 1.5 - 1.8,
- which test the new Shift-Up and Shift-Down bindings.
-
-1999-02-01 Martin Hunt <hunt@cygnus.com>
-
- * srcwin.test (srcwin-4.3): Fix bp test.
-
-1999-01-29 Martin Hunt <hunt@cygnus.com>
-
- * srcwin.test (click): New function that generates an event
- at a location.
- (srcwin-4.4): New test. Simulate a click on a line and
- check for breakpoint set.
- (srcwin-4.5): New test. Right-click on a line and select "Continue
- to Here" from popup.
-
- * srcwin.exp: Source srcwin3.test, which will test source window
- assembly debugging on executables built without "-g".
-
-1999-01-29 Martin Hunt <hunt@cygnus.com>
-
- * srcwin.exp: Add srcwin2.test, which are basically the same
- tests as srcwin.test, but run with a missing source file.
-
- * srcwin2.test: New file.
-
- * srcwin.test: Add tests for setting breakpoints in the source window,
- testing BP balloons, variable balloons, and mixed-mode disassembly
- of include files.
-
-Sun Jun 28 22:34:34 1998 Martin M. Hunt <hunt@cygnus.com>
-
- * gdb.gdbtk/simple.c (main): Make main return an
- int so compiler will stop complaining.
-
-Fri Jun 26 14:27:13 1998 Keith Seitz <keiths@cygnus.com>
-
- * gdb.gdbtk/console.{exp, test}: New console window tests.
diff --git a/gdb/testsuite/gdb.gdbtk/Makefile.in b/gdb/testsuite/gdb.gdbtk/Makefile.in
deleted file mode 100644
index 51151a57814..00000000000
--- a/gdb/testsuite/gdb.gdbtk/Makefile.in
+++ /dev/null
@@ -1,36 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXEEXT = @EXEEXT@
-
-EXECUTABLES = simple$(EXEEXT) stack$(EXEEXT) c_variable$(EXEEXT) \
- cpp_variable$(EXEEXT)
-
-# uuencoded format to avoid SCCS/RCS problems with binary files.
-CROSS_EXECUTABLES =
-
-all:
- @echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
-
-clean mostlyclean:
- -rm -f *~ *.o a.out xgdb *.x $(CROSS_EXECUTABLES) *.ci *.tmp
- -rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
- -rm -f twice-tmp.c
-
-distclean maintainer-clean realclean: clean
- -rm -f *~ core
- -rm -f Makefile config.status config.log
- -rm -f arch.inc
- -rm -f *-init.exp
- -rm -fr *.log summary detail *.plog *.sum *.psum site.*
-
-Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
- $(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.gdbtk/README b/gdb/testsuite/gdb.gdbtk/README
deleted file mode 100644
index b70488647b4..00000000000
--- a/gdb/testsuite/gdb.gdbtk/README
+++ /dev/null
@@ -1,421 +0,0 @@
- The Insight Testsuite
- ---------------------
- Keith Seitz (keiths@cygnus.com)
- May 1, 2001
-
-RUNNING THE TESTSUITE
-
-The Insight testsuite is run in much the same way that gdb's testsuites
-are run. The one big difference is the environment variable GDB_DISPLAY,
-which governs what display should be used for the tests.
-
-When GDB_DISPLAY is not set in the user's environment, the Insight testsuite
-will attempt to run Xvfb, an X server with a virtual frame buffer. Using
-Xvfb, the testsuite can run without interuppting the user.
-
-When Xvfb is not available, the testsuite will mark the Insight tests
-"untested" and print out some appropriate warning to the testsuite log
-file.
-
-If GDB_DISPLAY is set in the user's environment, the testsuite will attempt
-to use this display for the tests. If this display is a desktop display,
-it is very likely that any interaction between the user and his desktop
-will interfere with the tests. Some tests warp the cursor, i.e., they
-force the mouse to move on the screen. If you don't want this to happen to
-you, put Xvfb in your path.
-
-On Cygwin systems, Xvfb is not supported. Only two choices are available in
-this environment: run the testsuites using the desktop or do not run the
-testsuite. To run the testsuite on Cygwin, just define the environment
-variable GDB_DISPLAY to anything.
-
-The examples below summarize the usage of the environment variable GDB_DISPLAY
-on unix/X-Windows hosts and Cygwin hosts. In all examples, assume that DISPLAY
-set to the local workstation's main display (:0).
-
-To run the testsuite using Xvfb -- unix only (Xvfb must be in PATH):
-$ make check
-
-To run the testsuite using a given display (either the desktop or a peviously
-started Xvfb):
-$ GDB_DISPLAY=$DISPLAY make check
-
-To run the testsuite on Cygwin:
-$ GDB_DISPLAY=foo make check
-
-
-TESTSUITE INFRASTRUCTURE
-
-The rest of this document deals with writing tests for Insight. This reading
-is only noteworthy for developers and contributors.
-
-The Insight testsuite consists of two large portions of code: code which is
-run in dejagnu and code which runs in Insight's built-in Tcl interpreter. Files
-containing dejagnu code (those files ending in ".exp" in the testsuite directory)
-are "glue code" between gdb's dejagnu testsuite and Insight's Tcl testsuite.
-
-Dejagnu testsuite files are considered "drivers" for any particular set of
-tests, since they allow dejagnu to control Insight's Tcl testsuite.
-
-
-Dejagnu Testsuite Infrastructure
-
-The dejagnu code is responsible for doing several things. Some of the more
-important responsibilities include:
-
-o Initializing the display
-o Determining if tests should be run
-o Results accounting
-o Compiling testcases in various languages
-o Repoting results to gdb's testsuite
-
-There are various functions defined to facilitate the writing of tests. These
-functions currently reside in gdb's gdb.exp (src/gdb/testsuite/lib/gdb.exp) and
-include:
-
-Pulic functions:
-proc gdbtk_initialize_display {}
-
- gdbtk_initialize_display should be the first function called from the
- (dejagnu) test file. It initializes the DISPLAY variable on unix systems
- and determines (for all host systems) whether or not the testsuite should
- run. It returns 1 if the test should run. If tests should not run, it
- marks the test as "untested" and leaves a suitable message about why
- the test should not run. If gdbtk_initialize_display returns zero, a test
- should simply exit.
-
-proc gdbtk_start {test}
-
- This function marks the start of a test and will execute Insight for
- testing. The TEST parameter should be the file name of the Tcl test
- file to load into Insight's Tcl interpreter. It returns a list of
- test results suitable for passing to gdbtk_done or gdbtk_analyze_results.
- See gdbtk_analyze_results for more information on the format of results.
-
- gdbtk_start is responsible for communicating target startup information
- to Insight, so that Insight's testsuite may be run on any target supported
- by gdb. It does this by setting several environment variables just before
- it starts Insight. These environment variables are:
-
- OBJDIR
- The object directory of the dejagnu testsuite (i.e.,
- objdir/gdb/testsuite).
- SRCDIR
- The dejagnu source directory in which the tests are located (i.e,
- src/gdb/testsuite)
- SUBDIR
- The dejagnu testsuite subdirectory for the test (i.e., gdb.gdbtk)
- DEFS
- The location of the testsuite definitions file (i.e.,
- src/gdb/testsuite/gdb.gdbtk/defs)
-
- Note that DEFS is converted to abs$lute tcl-style paths. On unix,
- this means that DEFS would point to, for example,
- /home/keiths/insight/src/gdb/testsuite/gdb.gdbtk/defs. On Cygwin it
- would point to C:/cygwin/home/keiths/insight/src/gdb/testsuite/gdb.gdbtk/defs.
- This is because of a descrepency between Cygwin's posix paths and Tcl's
- not-quite-posix paths.
-
-proc gdbtk_analyze_results {results}
- This function translates the list of results in RESULTS into dejagnu
- results, reporting the number of failures, errors, passes, and expected
- failures and passes. It currently does not deal with "untested" and other
- test statuses from dejagnu since Insight's tcl testsuite does not
- issue such results.
-
- The format of the results expected by gdbtk_analyze_results is simple:
- it is a list of {status name description msg}. "status" is the execution
- status of one of the tcl tests run. This can be "PASS", "FAIL", "ERROR",
- "XFAIL", or "XPASS".
-
- "name" is the name of the test, and it is reported in all testsuite
- results in dejagnu. This speeds location of the failing test. This
- "name" may also be given to Insight's testsuite, telling it to
- only run this test. See "do_tests" in Tcl Testsuite Infrastructure
- for more information.
-
- "description" is a textual description of the test given by "name".
-
- "msg" is currently not used.
-
-proc gdbtk_done {{results {}}}
- gdbtk_done takes any RESULTS and passes it gdbtk_analyze_results for
- outputting to the dejagnu part of the testsuite. It may be called
- without an argument, in which case it will only terminate Xvfb if it
- was started. Tests must call gdbtk_done _once_ at the end of their
- test drivers.
-
-Private functions:
-proc _gdbtk_export_target_info
- This functin exports information about the target into the environment
- so that Insight's testsuite may run programs on any supported gdb
- target. This target information is passed into the Tcl testsuite
- via an environment variable, TARGET_INFO, which is really a Tcl array,
- i.e., the array is constructed in tcl and exported into the environment
- with Tcl's "array get" command).
-
- There are four elements to the array:
- TARGET_INFO(init) - (optional) A list of commands to execute in gdb
- to initialize the session. This usually includes
- setting baud rates and remote protocol options.
- TARGET_INFO(target) - (required) The complete "target" command to connect
- to the given target.
- TARGET_INFO(load) - (optional) The complete "load" command to load an
- executable into a target.
- TARGET_INFO(run) - (required) The complete "run" command, sans arguments,
- to start a process on the target. For remote targets,
- this is usually just "continue".
-
-proc _gdbtk_xvfb_init
- This procedure actually determines whether the an Insight test should
- run and what DISPLAY it should use for that test. It is called by
- gdbtk_initialize_display to do most of the dirty work.
-
- It has a simple heuristic: If GDB_DISPLAY is not set and Xvfb is available
- (on unix), it starts Xvfb, using the current process id as the screen number.
- If Xvfb is not available and GDB_DISPLAY was not set, it skips the tests.
-
-proc _gdbtk_xvfb_exit
- _gdbtk_xvfb_exit will kill any previously started Xvfb.
-
-Private globals:
-global _xvfb_spawn_id
- This variable holds the spawn_id of any Xvfb process started
- by the testsuite (or it is left undefined).
-
-global _using_windows
- A global variable which indicates whether the testsuite is running
- on cygwin. Unfortunately, as of writing, the global variable
- tcl_platform(platform) is "unix" on Cygwin, so it is not possible
- to rely on this for platform-dependent operations.
-
- Instead, this variable is set by gdbtk_initialize_display. The test
- it uses to determine if Cygwin is being used: it looks for the program
- cygpath in the PATH. Therefore, cygpath is REQUIRED to run the testsuite
- on Cygwin. (gdbtk_start also uses cygpath to determine Windows
- pathnames for Cygwin.)
-
-
-Testsuite Driver Basics
-
-Given the above interfaces for connecting Insight's Tcl testsuite and
-gdb's dejagnu testsuite, the basic testsuite driver file should look
-(minimally) like this:
-
-File: mytest.exp
-1 load_lib "insight-support.exp"
-2 if {[gdbtk_initialize_display]} {
-3 # We found a display to use
-4 gdb_exit; # Make sure any previous gdb is gone
-5 set results [gdbtk_start mytest.test]
-6
-7 # Done!
-8 gdbtk_done [split $results \n]
-9 }
-
-Line 1 loads the insight testsuite support library which contains definitions
-for all the procedures used in dejagnu to initialize and run the Insight testsuite.
-Line 2 calls gdbtk_initialize_display to ascertain whether there is a display
-to use for the test. This could use an existing display (if GDB_DISPLAY is
-set in the environment) or gdbk_initialize_display could startup an Xvfb
-for use by the testsuite.
-
-Line 4 forces any previously executing gdb to terminate.
-
-Line 5 signals the start of the test run. "mytest.test" is the name of the
-Tcl test file to execute in Insight's built-in Tcl interpreter. The output
-of gdbtk_start_test is all of the results of the Tcl test from Insight, which
-is subsequently passed to gdbk_analyze_results via gdbtk_done on Line 8.
-
-Note how nothing happens if gdbtk_initialize_display returns false.
-
-
-Tcl Testsuite Infrastructure
-
-The heart of Insight's testsuite is its Tcl testsuite. It is these tests
-which run directly in Insight's Tcl interpreter and allow test writers
-access to Insight's internals. Tcl testsuite files have the filename suffix
-".test" to distinguish them from their driver files, which end in ".exp".
-
-The design of the Insight Tcl testsuite parallels Tcl's testsuite. It has
-many powerful features, including the ability to run ANY test in a given
-Tcl test file. See the description of utility routines below for more
-information about running any set of tests from a file.
-
-The bulk of the code implementing the Tcl testsuite infrastructure in
-Insight is contained in the testsuite definitions file, "defs", located
-in src/gdb/testsuite/gdb.gdbtk. This file contains routines necessary
-to write tests for Insight.
-
-Public functions:
-proc gdbtk_read_defs {}
- This function, located in Insight's core Tcl library, attempts to load
- the testsuite definitions file. If it fails, it will either pop up
- a dialog box with the error (if running interactively) or it will
- print the error to stderr and exit (if running non-interactively).
-
- If successful, it will return true.
-
-proc gdbtk_test_file {filename}
- This function is used to load the file given by FILENAME into
- Insight. It will automatically append ".exe" to any FILENAME
- on Cygwin-hosted systems.
-
- If successful, it will load the given file into Insight and
- return the output of gdb's file command. It will call "error"
- if it was succesful, therefore all calls to "gdbtk_test_file"
- should be called using "catch".
-
- Test authors should not use "gdb_cmd {file FILENAME}" to load
- files into gdb unless they are testing interface code between
- gdb and Insight.
-
-proc gdbtk_test_run {{prog_args {}}}
- gdbtk_test_run runs the previoiusly loaded executable, passing
- the given arguments to the inferior. Like Insight's Run button,
- it will do whatever is necessary to get the executable running,
- including any target initialization (setting baud rate and remote
- protocol options), downloading the executable to the target, and
- finally starting execution.
-
- Test authors should NEVER use "gdb_cmd {run ARGUMENTS}" to run an
- executable. Doing so will insure that your tests will only run on
- a native debugger.
-
- It returns true if successful or false otherwise. It will report
- the error in a dialog box (if running interactively) or it will
- print the error to stderr.
-
-proc gdbtk_test {name description script answer}
- This is Tcl testsuite equivalent of "expect". "name" is a canonical
- name of the test, usually of the form "shortname-major.minor". This is
- the name that is used when running selected tests from a given file.
- If "name" starts with an asterisk (*), it designates that the test
- is expected to fail.
-
- "description" is a short textual description of the test to help
- humans understand what it does.
-
- "script" is the actual test script to run. The result of this script
- will be compared against "answer" to determine if the test passed
- or failed.
-
- It calls gdbtk_print_verbose to print out the results to the terminal
- (if running interactively) or to the log file.
-
-proc gdbtk_test_done {}
- gdbtk_test_done is called at the very end of all tcl tests. It is used
- to exit Insight and return control back to the dejagnu driver which
- started the tests.
-
-proc gdbtk_dotests {file args}
- Obsolete.
-
-proc do_test {{file {}} {verbose {}} {tests {}}}
- This procedure is used to invoke the Insight test(s) given in FILE
- which match the regular expression(s) in TESTS. This is invoked
- from Insight's console window to run tests interactively.
-
- VERBOSE sets the verbosity of the test run. When set to one,
- the testsuite will report all results in human readable form.
- When set greater than one, it will print out results as a list,
- i.e., for passing to gdbtk_analyze_results. If zero, it will only
- print errors and failures in human readable form.
-
-Public global variables:
-objdir - The objdir from dejagnu. See gdbtk_start for more information.
-srcdir - The srcdir from dejagnu. See gdbtk_start for more information.
-test_ran - Indicates whether the last test ran or not. See example below.
-
-Private functions:
-proc gdbtk_test_error {desc}
- An internal function used to report a framework error in the testsuite.
- "desc" is a description of the error. It calls gdbtk_test_done.
-
-proc gdbtk_print_verbose {status name description script code answer}
- A helper procedure to gdbtk_test which prints out results to the terminal
- or the logfile (or both or none).
-
-Private global variables:
-_test - An array used by the testsuite internals.
-
-
-Tcl Test Basics
-
-Armed with the basic interface described above, it is possible to test Insight's
-GUI. Please do not write tests which attempt to imitate a user (moving the
-mouse and clicking buttons), unless there is no other way to test the functionality.
-
-The basic test file (with one test) looks like this (nonsensical one):
-File: mytest.test
-1 if {![gdbtk_read_defs]} {
-2 break
-3 }
-4
-5 global objdir test_ran
-6 set program [file join $objdir mytest]
-7 if {[catch {gdbtk_test_file $program} t]} {
-8 gdbtk_test_error "loading \"$program\": $t"
-9 }
-10 if {![gdbtk_test_run]} { exit 1 }
-11
-12 global foo
-13 set foo 1
-14
-15 # Test: mytest-1.1
-16 # Desc: check if a source window was created
-17 gdbtk_test mytest-1.1 {source window created} {
-18 set window [ManagedWin::find SrcWin]
-19 llength $window
-20 set foo 13
-21 } {1}
-22
-23 if {$test_ran} {
-24 set foo 1
-25 }
-26
-27 # Done
-28 gdbtk_test_done
-
-Line 1 calls the Inisght function gdbtk_read_defs to read in the testsuite
-definitions file.
-
-Line 6 then specifies the name of a file (mytest) in the object directory
-which is loaded into gdb on Line 7. If loading the file into Insight
-failed, gdbtk_test_error is called to publish the error (and terminate the
-test run for this file).
-
-Line 10 runs the executable on the target, and exits if it was unable
-to do so.
-
-Line 13 simply sets a global variable foo to illustrate the purpose
-of the global "test_ran". Before the test "mytest-1.1" runs, foo is set to
-one. In order to support running specific tests, the state of the debugger
-cannot be altered INSIDE gdbtk_test scripts, since the contents of the
-script may not be run if the user requested only a specific test to run.
-
-Line 20 in the middle of the test modifies the global foo. If subsequent
-test relied on foo being one, we would have a state violation, since
-mytest-1.1 may have (or may have not) run.
-
-Therefore, we can check if a test ran and reset foo by checking the
-global "test_ran". If set, we know that the previous test (mytest-1.1)
-was run, and that foo is now thirteen. We reset the result back to one.
-
-(Aside: Some tests do not follow this rule explicitly: they can assume
-that all tests run sequentially. In these cases, running a specific
-test in the file will probably fail, since the debugger is not brought
-to a known state along the way.)
-
-Lines 17-21 contain the actual test. The test's name is "mytest-1.1". It
-is this name that may be referred to when asking the testsuite to run
-a specific test. The description of this test is "source window created",
-indicating that mytest-1.1's purpose is to check whether a source window
-was created.
-
-If gdbtk_test determines that this test is to run, it will execute the
-next part, lines 18-20, and compare the output of that script (llength
-$window) with "1". If the result is not "1", a failure is recorded. If
-it is "1", a pass is recorded.
-
-Finally, the test file is done and exits on line 28.
diff --git a/gdb/testsuite/gdb.gdbtk/browser.exp b/gdb/testsuite/gdb.gdbtk/browser.exp
deleted file mode 100644
index 9869bc4ee48..00000000000
--- a/gdb/testsuite/gdb.gdbtk/browser.exp
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 1998, 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) 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.
-
-load_lib insight-support.exp
-
-if {[gdbtk_initialize_display]} {
- if {$tracelevel} {
- strace $tracelevel
- }
-
- #
- # test browser window
- #
- set prms_id 0
- set bug_id 0
-
- set testfile "stack"
- set binfile ${objdir}/${subdir}/${testfile}
- set r [gdb_compile "${srcdir}/${subdir}/stack1.c ${srcdir}/${subdir}/stack2.c" "${binfile}" executable {debug}]
- if { $r != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so some tests in this file will automatically fail."
- }
-
- # Start with a fresh gdbtk
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir browser.test]]
- set results [split $results \n]
-
- # Analyze results
- gdbtk_done $results
-}
diff --git a/gdb/testsuite/gdb.gdbtk/browser.test b/gdb/testsuite/gdb.gdbtk/browser.test
deleted file mode 100644
index 9e358dab1a5..00000000000
--- a/gdb/testsuite/gdb.gdbtk/browser.test
+++ /dev/null
@@ -1,686 +0,0 @@
-# Browser Window Tests
-# Copyright 1998, 2001 Red Hat, 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 was written by Keith Seitz (keiths@cygnus.com)
-
-# Read in the standard defs file
-
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir test_ran
-set _files(stupid_initializer) -100
-
-##### #####
-# #
-# Helper functions for this module #
-# #
-##### #####
-
-# Set the search expression
-proc set_regexp {exp} {
- global browser
-
- $browser component filt_entry delete 0 end
- $browser component filt_entry insert 0 $exp
-}
-
-# Do the search
-proc do_search {} {
- global browser
- $browser search
- set m [$browser component func_box get 0 end]
-
- return $m
-}
-
-# Set search to use regular expressions.
-proc set_search_mode {val} {
- global browser
- pref set gdb/search/filter_mode $val
-
- # Use configure instead of entryset: need to have
- # combobox's command fire
- $browser component filt_type configure -value $val
-}
-
-# Highlight a file
-proc select {filename} {
- global browser _files
-
- if {[info exists _files($filename)]} {
- $browser component file_box selection set $_files($filename)
- } else {
- set files [$browser component file_box get 0 end]
- set i [lsearch $files $filename]
- set _files($filename) $i
- $browser component file_box selection set $i
- }
- $browser search
-}
-
-proc select_all {} {
- global browser
-
- $browser component file_all invoke
-
-}
-
-# clear all files
-proc clear {} {
- global browser
-
- $browser component file_box selection clear 0 end
- $browser search
-}
-
-##### #####
-# #
-# BROWSER TESTS #
-# #
-##### #####
-
-# Load the test executable
-set program [file join $objdir stack]
-if {[catch {gdbtk_test_file $program} t]} {
- # This isn't a test case, since if this fails, we're hosed.
- gdbtk_test_error "loading \"$program\": $t"
-}
-
-# Open a browser
-set browser [ManagedWin::open BrowserWin]
-
-# Test: browser-1.1
-# Desc: Check file listbox contents
-gdbtk_test browser-1.1 {file listbox contents} {
- set m [$browser component file_box get 0 end]
- set f {}
- if {[lsearch $m stack1.c] == -1} {
- lappend f 0
- } else {
- lappend f 1
- }
- if {[lsearch $m stack2.c] == -1} {
- lappend f 0
- } else {
- lappend f 1
- }
-
- join $f \
-} {1 1}
-
-# Tests 2.* test starts with search mode.
-# Test: browser-2.1
-# Desc: Check all files/all funcs
-gdbtk_test browser-2.1 {all files/all funcs} {
- set_search_mode "starts with"
- set_regexp ""
- select_all
- set m [do_search]
- set r 0
- foreach f {extern_func1_1 extern_func1_10 extern_func1_11 extern_func1_12 \
- extern_func1_13 extern_func1_14 extern_func1_15 extern_func1_2 \
- extern_func1_3 extern_func1_4 extern_func1_5 extern_func1_6 \
- extern_func1_7 extern_func1_8 extern_func1_9 func_1 \
- func_10 func_11 func_12 func_13 \
- func_14 func_15 func_2 func_3 \
- func_4 func_5 func_6 func_7 \
- func_8 func_9 main static_func_1 \
- static_func_10 static_func_11 static_func_12 static_func_13 \
- static_func_14 static_func_15 static_func_2 static_func_3 \
- static_func_4 static_func_5 static_func_6 static_func_7 \
- static_func_8 static_func_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {46}
-
-# Test: browser-2.2
-# Desc: Check all functions in stack1.c
-gdbtk_test browser-2.2 {all functions in stack1.c} {
- set_regexp ""
- clear
- select stack1.c
- set m [do_search]
-
- set r 0
- foreach f {func_1 func_10 func_11 func_12 \
- func_13 func_14 func_15 func_2 \
- func_3 func_4 func_5 func_6 \
- func_7 func_8 func_9 main \
- static_func_1 static_func_10 static_func_11 static_func_12 \
- static_func_13 static_func_14 static_func_15 static_func_2 \
- static_func_3 static_func_4 static_func_5 static_func_6 \
- static_func_7 static_func_8 static_func_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {31}
-if {$test_ran} {
- clear
-}
-
-# Test: browser-2.3
-# Desc: Check all functions in stack2.c
-gdbtk_test browser-2.3 {all functions in stack2.c} {
- set_regexp ""
- clear
- select stack2.c
- set m [do_search]
-
- set r 0
- foreach f {extern_func1_1 extern_func1_10 extern_func1_11 \
- extern_func1_12 extern_func1_13 extern_func1_14 extern_func1_15 \
- extern_func1_2 extern_func1_3 extern_func1_4 extern_func1_5 \
- extern_func1_6 extern_func1_7 extern_func1_8 extern_func1_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {15}
-if {$test_ran} {
- clear
-}
-
-# Test: browser-2.4
-# Desc: Check for all functions matching "func" - mode starts with
-gdbtk_test browser-2.4 {all functions matching "func" - "mode starts with"} {
- set_search_mode "starts with"
- select_all
- set_regexp func
- do_search
-} {func_1 func_10 func_11 func_12 func_13 func_14 func_15 func_2 func_3 func_4 func_5 func_6 func_7 func_8 func_9}
-
-# Test: browser-2.5
-# Desc: Check all functions matching "func" in stack1.c - mode starts with
-gdbtk_test browser-2.5 {all functions matching "func" in stack1.c - "mode starts with"} {
- set_search_mode "starts with"
- set_regexp func
- clear
- select stack1.c
- do_search
-} {func_1 func_10 func_11 func_12 func_13 func_14 func_15 func_2 func_3 func_4 func_5 func_6 func_7 func_8 func_9}
-
-# Test: browser-2.6
-# Desc: Check all functions matching "funcs" in stack2.c - mode starts with
-gdbtk_test browser-2.6 {all functions matching "func" in stack2.c - mode "starts with"} {
- set_search_mode "starts with"
- set_regexp func
- clear
- select stack2.c
- do_search
-} {}
-if {$test_ran} {
- clear
-}
-
-# Test: browser-2.7
-# Desc: Check all functions matching "foobar"
-gdbtk_test browser-2.7 {all functions matching "foobar"} {
- set_search_mode "starts with"
- select_all
- set_regexp foobar
- do_search
-} {}
-
-# Test: browser-2.8
-# Desc: Check all functions matching "foobar" in stack1.c
-gdbtk_test browser-2.8 {functions matching "foobar" in stack1.c} {
- set_search_mode "starts with"
- set_regexp foobar
- clear
- select stack1.c
- do_search
-} {}
-
-# Tests 3.* test "contains" search mode.
-# Test: browser-3.1
-# Desc: Check all files/all funcs
-gdbtk_test browser-3.1 {all files/all funcs} {
- set_search_mode "contains"
- set_regexp ""
- select_all
- set m [do_search]
- set r 0
- foreach f {extern_func1_1 extern_func1_10 extern_func1_11 extern_func1_12 \
- extern_func1_13 extern_func1_14 extern_func1_15 extern_func1_2 \
- extern_func1_3 extern_func1_4 extern_func1_5 extern_func1_6 \
- extern_func1_7 extern_func1_8 extern_func1_9 func_1 \
- func_10 func_11 func_12 func_13 \
- func_14 func_15 func_2 func_3 \
- func_4 func_5 func_6 func_7 \
- func_8 func_9 main static_func_1 \
- static_func_10 static_func_11 static_func_12 static_func_13 \
- static_func_14 static_func_15 static_func_2 static_func_3 \
- static_func_4 static_func_5 static_func_6 static_func_7 \
- static_func_8 static_func_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {46}
-
-# Test: browser-3.2
-# Desc: Check all functions in stack1.c
-gdbtk_test browser-3.2 {all functions in stack1.c} {
- set_regexp ""
- set_search_mode "contains"
- clear
- select stack1.c
- set m [do_search]
-
- set r 0
- foreach f {func_1 func_10 func_11 func_12 \
- func_13 func_14 func_15 func_2 \
- func_3 func_4 func_5 func_6 \
- func_7 func_8 func_9 main \
- static_func_1 static_func_10 static_func_11 static_func_12 \
- static_func_13 static_func_14 static_func_15 static_func_2 \
- static_func_3 static_func_4 static_func_5 static_func_6 \
- static_func_7 static_func_8 static_func_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {31}
-
-if {$test_ran} {
- clear
-}
-
-# Test: browser-3.3
-# Desc: Check all functions in stack2.c
-gdbtk_test browser-3.3 {all functions in stack2.c} {
- set_regexp ""
- set_search_mode "contains"
- clear
- select stack2.c
- set m [do_search]
-
- set r 0
- foreach f {extern_func1_1 extern_func1_10 extern_func1_11 \
- extern_func1_12 extern_func1_13 extern_func1_14 extern_func1_15 \
- extern_func1_2 extern_func1_3 extern_func1_4 extern_func1_5 \
- extern_func1_6 extern_func1_7 extern_func1_8 extern_func1_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {15}
-if {$test_ran} {
- clear
-}
-
-# Test: browser-3.4
-# Desc: Check for all functions matching "func" - mode contains
-gdbtk_test browser-3.4 {all functions matching "func_1" - "mode contains"} {
- set_search_mode "contains"
- set_regexp "func_1"
- select_all
- do_search
-} {func_1 func_10 func_11 func_12 func_13 func_14 func_15 static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15}
-
-# Test: browser-3.5
-# Desc: Check all functions matching "func_1" in stack1.c - mode contains
-gdbtk_test browser-3.5 {all functions matching "func_1" in stack1.c - "mode contains"} {
- set_search_mode "contains"
- set_regexp "func_1"
- clear
- select stack1.c
- do_search
-} {func_1 func_10 func_11 func_12 func_13 func_14 func_15 static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15}
-
-# Test: browser-3.6
-# Desc: Check all functions matching "func_1" in stack2.c - mode contains
-gdbtk_test browser-3.6 {all functions matching "func" in stack2.c - mode "contains"} {
- set_search_mode "contains"
- set_regexp func_1
- clear
- select stack2.c
- do_search
-} {}
-
-# Test: browser-3.7
-# Desc: Check all functions matching "foobar"
-gdbtk_test browser-3.7 {all functions matching "foobar"} {
- set_search_mode "contains"
- select_all
- set_regexp foobar
- do_search
-} {}
-
-# Test: browser-3.8
-# Desc: Check all functions matching "foobar" in stack1.c
-gdbtk_test browser-3.8 {functions matching "foobar" in stack1.c} {
- set_search_mode "contains"
- set_regexp foobar
- clear
- select stack1.c
- do_search
-} {}
-
-# Tests 4.* test "ends with" search mode.
-# Test: browser-4.1
-# Desc: Check all files/all funcs
-gdbtk_test browser-4.1 {all files/all funcs} {
- set_search_mode "ends with"
- set_regexp ""
- select_all
- set m [do_search]
- set r 0
- foreach f {extern_func1_1 extern_func1_10 extern_func1_11 extern_func1_12 \
- extern_func1_13 extern_func1_14 extern_func1_15 extern_func1_2 \
- extern_func1_3 extern_func1_4 extern_func1_5 extern_func1_6 \
- extern_func1_7 extern_func1_8 extern_func1_9 func_1 \
- func_10 func_11 func_12 func_13 \
- func_14 func_15 func_2 func_3 \
- func_4 func_5 func_6 func_7 \
- func_8 func_9 main static_func_1 \
- static_func_10 static_func_11 static_func_12 static_func_13 \
- static_func_14 static_func_15 static_func_2 static_func_3 \
- static_func_4 static_func_5 static_func_6 static_func_7 \
- static_func_8 static_func_9} {
- if {[lsearch $m $f] > -1} {
- incr r
- }
- }
-
- set r
-} {46}
-
-# Test: browser-4.2
-# Desc: Check all functions in stack1.c
-gdbtk_test browser-4.2 {all functions in stack1.c} {
- set_regexp ""
- set_search_mode "ends with"
- clear
- select stack1.c
- set m [do_search]
-
- set r 0
- foreach f {func_1 func_10 func_11 func_12 \
- func_13 func_14 func_15 func_2 \
- func_3 func_4 func_5 func_6 \
- func_7 func_8 func_9 main \
- static_func_1 static_func_10 static_func_11 static_func_12 \
- static_func_13 static_func_14 static_func_15 static_func_2 \
- static_func_3 static_func_4 static_func_5 static_func_6 \
- static_func_7 static_func_8 static_func_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {31}
-
-if {$test_ran} {
- clear
-}
-
-# Test: browser-4.3
-# Desc: Check all functions in stack2.c
-gdbtk_test browser-4.3 {all functions in stack2.c} {
- set_regexp ""
- set_search_mode "ends with"
- clear
- select stack2.c
- set m [do_search]
-
- set r 0
- foreach f {extern_func1_1 extern_func1_10 extern_func1_11 \
- extern_func1_12 extern_func1_13 extern_func1_14 extern_func1_15 \
- extern_func1_2 extern_func1_3 extern_func1_4 extern_func1_5 \
- extern_func1_6 extern_func1_7 extern_func1_8 extern_func1_9} {
- if {[lsearch $m $f] != -1} {
- incr r
- }
- }
-
- set r
-} {15}
-if {$test_ran} {
- clear
-}
-
-# Test: browser-4.4
-# Desc: Check for all functions matching "func_1" - mode ends with
-gdbtk_test browser-4.4 {all functions matching "func_1" - "mode ends with"} {
- set_search_mode "ends with"
- set_regexp "func_1"
- select_all
- do_search
-} {func_1 static_func_1}
-
-# Test: browser-4.5
-# Desc: Check all functions matching "func_1" in stack1.c - mode ends with
-gdbtk_test browser-4.5 {all functions matching "func_1" in stack1.c - "mode ends with"} {
- set_search_mode "ends with"
- set_regexp "func_1"
- clear
- select stack1.c
- do_search
-} {func_1 static_func_1}
-if {$test_ran} {
- clear
-}
-
-# Test: browser-4.6
-# Desc: Check all functions matching "func_1" in stack2.c - mode ends with
-gdbtk_test browser-4.6 {all functions matching "func" in stack2.c - mode "ends with"} {
- set_search_mode "ends with"
- set_regexp func_1
- clear
- select stack2.c
- do_search
-} {}
-
-# Test: browser-4.7
-# Desc: Check all functions matching "foobar"
-gdbtk_test browser-4.7 {all functions matching "foobar"} {
- set_search_mode "ends with"
- select_all
- set_regexp foobar
- do_search
-} {}
-
-# Test: browser-4.8
-# Desc: Check all functions matching "foobar" in stack1.c
-gdbtk_test browser-4.8 {functions matching "foobar" in stack1.c} {
- set_search_mode "ends with"
- set_regexp foobar
- clear
- select stack1.c
- do_search
-} {}
-if {$test_ran} {
- clear
-}
-
-# Test: browser-5.10
-# Desc: Check all functions matching regexp "func"
-gdbtk_test browser-5.10 {all functions matching regexp "func"} {
- set_search_mode "matches regexp"
- set_regexp func
- select_all
- do_search
-} {extern_func1_1 extern_func1_10 extern_func1_11 extern_func1_12 extern_func1_13 extern_func1_14 extern_func1_15 extern_func1_2 extern_func1_3 extern_func1_4 extern_func1_5 extern_func1_6 extern_func1_7 extern_func1_8 extern_func1_9 func_1 func_10 func_11 func_12 func_13 func_14 func_15 func_2 func_3 func_4 func_5 func_6 func_7 func_8 func_9 static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15 static_func_2 static_func_3 static_func_4 static_func_5 static_func_6 static_func_7 static_func_8 static_func_9}
-
-# Test: browser-5.11
-# Desc: Check all functions matching regexp "func" in stack1.c
-gdbtk_test browser-5.11 {all functions matching regexp "func" in stack1.c} {
- set_search_mode "matches regexp"
- set_regexp func
- clear
- select stack1.c
- do_search
-} {func_1 func_10 func_11 func_12 func_13 func_14 func_15 func_2 func_3 func_4 func_5 func_6 func_7 func_8 func_9 static_func_1 static_func_10 static_func_11 static_func_12 static_func_13 static_func_14 static_func_15 static_func_2 static_func_3 static_func_4 static_func_5 static_func_6 static_func_7 static_func_8 static_func_9}
-
-# Test: browser-5.12
-# Desc: Check all functions matching regexp "func" in stack2.c
-gdbtk_test browser-5.12 {all functions matching regexp "func" in stack2.c} {
- set_regexp func
- clear
- select stack2.c
- do_search
-} {extern_func1_1 extern_func1_10 extern_func1_11 extern_func1_12 extern_func1_13 extern_func1_14 extern_func1_15 extern_func1_2 extern_func1_3 extern_func1_4 extern_func1_5 extern_func1_6 extern_func1_7 extern_func1_8 extern_func1_9}
-
-# Test: browser-5.13
-# Desc: Check all functions matching regexp "\_1$"
-gdbtk_test browser-5.13 {all functions matching regexp "\_1$"} {
- set_search_mode "matches regexp"
- set_regexp {\_1$}
- select_all
- do_search
-} {extern_func1_1 func_1 static_func_1}
-
-# Test: browser-5.14
-# Desc: Check all functions matching regexp "\_1$" in stack1.c
-gdbtk_test browser-5.14 {all functions matching regexp "\_1$" in stack1.c} {
- set_search_mode "matches regexp"
- set_regexp {\_1$}
- clear
- select stack1.c
- do_search
-} {func_1 static_func_1}
-
-# Test: browser-5.15
-# Desc: Check all functions matching regexp "\_1$" in stack2.c
-gdbtk_test browser-5.15 {all functions matching regexp "\_1$" in stack2.c} {
- set_search_mode "matches regexp"
- set_regexp {\_1$}
- clear
- select stack2.c
- do_search
-} {extern_func1_1}
-
-# Test: browser-5.16
-# Desc: Check all functions matching regexp "foobar"
-gdbtk_test browser-5.16 {all functions matching regexp "foobar"} {
- set_search_mode "matches regexp"
- set_regexp foobar
- select_all
- do_search
-} {}
-
-# Test: browser-5.17
-# Desc: Check all functions matching regexp "foobar" in stack1.c
-gdbtk_test browser-5.17 {all functions matching regexp "foobar" in stack1.c} {
- set_search_mode "matches regexp"
- set_regexp foobar
- clear
- select stack1.c
- do_search
-} {}
-
-
-# Test: browser-6.1
-# Desc: Check select button function
-gdbtk_test browser-6.1 {select button - select all} {
- clear
- select_all
- set m [$browser component file_box curselection]
-
- expr {[llength $m] >= 2}
-} {1}
-
-# Test: browser-6.2
-# Desc: Check that search expressions are saved
-gdbtk_test browser-6.2 {save last search expression} {
- set_regexp hello
- select_all
- do_search
- pref get gdb/search/last_symbol
-} {hello}
-
-# Test: browser-7.1
-# Desc: Toggle all bps on
-gdbtk_test browser-7.1 {toggle_all_bp on} {
- set_regexp {\_1$}
- set_search_mode "matches regexp"
- select_all
- set funcs [do_search]
-
- # select all to set bp on
- $browser component func_box selection set 0 end
- $browser component func_add_bp invoke
-
- set bps {}
- foreach f $funcs {
- if {![catch {gdb_loc $f} ls]} {
- if {[bp_exists $ls] != -1} {
- lappend bps $f
- }
- }
- }
-
- catch {gdb_cmd "delete" 0}
- join [lsort $bps]
-} {extern_func1_1 func_1 static_func_1}
-
-# Test: browser-7.2
-# Desc: Toggle some bps off
-gdbtk_test browser-7.2 {toggle_some_bp off} {
- set_regexp {\_1$}
- set_search_mode "matches regexp"
- select_all
- set funcs [do_search]
-
- $browser component func_box selection set 0 end
- $browser component func_add_bp invoke
-
- # Turn off all the "static_func_*" bps
- set_regexp {^static.*_1$}
- do_search
- $browser component func_box selection set 0 end
- $browser component func_remove_bp invoke
- set bps {}
- foreach f $funcs {
- if {![catch {gdb_loc $f} ls]} {
- if {[bp_exists $ls] != -1} {
- lappend bps $f
- }
- }
- }
-
- catch {gdb_cmd "delete" 0}
-
- join [lsort $bps]
-} {extern_func1_1 func_1}
-
-#
-# Exit
-#
-gdbtk_test_done
diff --git a/gdb/testsuite/gdb.gdbtk/c_variable.c b/gdb/testsuite/gdb.gdbtk/c_variable.c
deleted file mode 100644
index 461d5cee2fa..00000000000
--- a/gdb/testsuite/gdb.gdbtk/c_variable.c
+++ /dev/null
@@ -1,296 +0,0 @@
-struct _simple_struct {
- int integer;
- unsigned int unsigned_integer;
- char character;
- signed char signed_character;
- char *char_ptr;
- int array_of_10[10];
-};
-
-typedef struct _simple_struct simpleton;
-
-simpleton global_simple;
-
-enum foo {
- bar = 1,
- baz
-};
-
-typedef enum foo efoo;
-
-union named_union
-{
- int integer;
- char *char_ptr;
-};
-
-typedef struct _struct_decl {
- int integer;
- char character;
- char *char_ptr;
- long long_int;
- int **int_ptr_ptr;
- long long_array[10];
-
- void (*func_ptr) (void);
- struct _struct_decl (*func_ptr_struct) (int, char *, long);
- struct _struct_decl *(*func_ptr_ptr) (int, char *, long);
- union {
- int a;
- char *b;
- long c;
- enum foo d;
- } u1;
-
- struct {
- union {
- struct {
- int d;
- char e[10];
- int *(*func) (void);
- efoo foo;
- } u1s1;
-
- long f;
- struct {
- char array_ptr[2];
- int (*func) (int, char *);
- } u1s2;
- } u2;
-
- int g;
- char h;
- long i[10];
- } s2;
-} weird_struct;
-
-struct _struct_n_pointer {
- char ****char_ptr;
- long ****long_ptr;
- struct _struct_n_pointer *ptrs[3];
- struct _struct_n_pointer *next;
-};
-
-void do_locals_tests (void);
-void do_block_tests (void);
-void subroutine1 (int, long *);
-void nothing (void);
-void do_children_tests (void);
-void do_special_tests (void);
-void incr_a (int);
-
-void incr_a (int a)
-{
- int b;
- b = a;
-}
-
-void
-do_locals_tests ()
-{
- int linteger;
- int *lpinteger;
- char lcharacter;
- char *lpcharacter;
- long llong;
- long *lplong;
- float lfloat;
- float *lpfloat;
- double ldouble;
- double *lpdouble;
- struct _simple_struct lsimple;
- struct _simple_struct *lpsimple;
- void (*func) (void);
-
- /* Simple assignments */
- linteger = 1234;
- lpinteger = &linteger;
- lcharacter = 'a';
- lpcharacter = &lcharacter;
- llong = 2121L;
- lplong = &llong;
- lfloat = 2.1;
- lpfloat = &lfloat;
- ldouble = 2.718281828459045;
- lpdouble = &ldouble;
- lsimple.integer = 1234;
- lsimple.unsigned_integer = 255;
- lsimple.character = 'a';
- lsimple.signed_character = 21;
- lsimple.char_ptr = &lcharacter;
- lpsimple = &lsimple;
- func = nothing;
-
- /* Check pointers */
- linteger = 4321;
- lcharacter = 'b';
- llong = 1212L;
- lfloat = 1.2;
- ldouble = 5.498548281828172;
- lsimple.integer = 255;
- lsimple.unsigned_integer = 4321;
- lsimple.character = 'b';
- lsimple.signed_character = 0;
-
- subroutine1 (linteger, &llong);
-}
-
-void
-nothing ()
-{
-}
-
-void
-subroutine1 (int i, long *l)
-{
- global_simple.integer = i + 3;
- i = 212;
- *l = 12;
-}
-
-void
-do_block_tests ()
-{
- int cb = 12;
-
- {
- int foo;
- foo = 123;
- {
- int foo2;
- foo2 = 123;
- {
- int foo;
- foo = 321;
- }
- foo2 = 0;
- }
- foo = 0;
- }
-
- cb = 21;
-}
-
-void
-do_children_tests (void)
-{
- weird_struct *weird;
- struct _struct_n_pointer *psnp;
- struct _struct_n_pointer snp0, snp1, snp2;
- char a0, *a1, **a2, ***a3;
- char b0, *b1, **b2, ***b3;
- char c0, *c1, **c2, ***c3;
- long z0, *z1, **z2, ***z3;
- long y0, *y1, **y2, ***y3;
- long x0, *x1, **x2, ***x3;
- int *foo;
- int bar;
-
- struct _struct_decl struct_declarations;
- weird = &struct_declarations;
-
- struct_declarations.integer = 123;
- weird->char_ptr = "hello";
- bar = 2121;
- foo = &bar;
- struct_declarations.int_ptr_ptr = &foo;
- weird->long_array[0] = 1234;
- struct_declarations.long_array[1] = 2345;
- weird->long_array[2] = 3456;
- 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;
-
- weird->func_ptr = nothing;
-
- /* Struct/pointer/array tests */
- a0 = '0';
- a1 = &a0;
- a2 = &a1;
- a3 = &a2;
- b0 = '1';
- b1 = &b0;
- b2 = &b1;
- b3 = &b2;
- c0 = '2';
- c1 = &c0;
- c2 = &c1;
- c3 = &c2;
- z0 = 0xdead + 0;
- z1 = &z0;
- z2 = &z1;
- z3 = &z2;
- y0 = 0xdead + 1;
- y1 = &y0;
- y2 = &y1;
- y3 = &y2;
- x0 = 0xdead + 2;
- x1 = &x0;
- x2 = &x1;
- x3 = &x2;
- snp0.char_ptr = &a3;
- snp0.long_ptr = &z3;
- snp0.ptrs[0] = &snp0;
- snp0.ptrs[1] = &snp1;
- snp0.ptrs[2] = &snp2;
- snp0.next = &snp1;
- snp1.char_ptr = &b3;
- snp1.long_ptr = &y3;
- snp1.ptrs[0] = &snp0;
- snp1.ptrs[1] = &snp1;
- snp1.ptrs[2] = &snp2;
- snp1.next = &snp2;
- snp2.char_ptr = &c3;
- snp2.long_ptr = &x3;
- snp2.ptrs[0] = &snp0;
- snp2.ptrs[1] = &snp1;
- snp2.ptrs[2] = &snp2;
- snp2.next = 0x0;
- psnp = &snp0;
- snp0.char_ptr = &b3;
- snp1.char_ptr = &c3;
- snp2.char_ptr = &a3;
- snp0.long_ptr = &y3;
- snp1.long_ptr = &x3;
- snp2.long_ptr = &z3;
-}
-
-void
-do_special_tests (void)
-{
- union named_union u;
- union {
- int a;
- char b;
- long c;
- } anonu;
- struct _simple_struct s;
- struct {
- int a;
- char b;
- long c;
- } anons;
- enum foo e;
- enum { A, B, C } anone;
- int array[21];
- int a;
-
- a = 1;
- incr_a(2);
-}
-
-int
-main (int argc, char *argv [])
-{
- do_locals_tests ();
- do_block_tests ();
- do_children_tests ();
- do_special_tests ();
- exit (0);
-}
-
-
diff --git a/gdb/testsuite/gdb.gdbtk/c_variable.exp b/gdb/testsuite/gdb.gdbtk/c_variable.exp
deleted file mode 100644
index 4ef8b6f361b..00000000000
--- a/gdb/testsuite/gdb.gdbtk/c_variable.exp
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) 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.
-
-load_lib insight-support.exp
-
-if {[gdbtk_initialize_display]} {
- if {$tracelevel} {
- strace $tracelevel
- }
-
- #
- # test variable API
- #
- set prms_id 0
- set bug_id 0
-
- set testfile "c_variable"
- set srcfile ${testfile}.c
- set binfile ${objdir}/${subdir}/${testfile}
- set r [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}]
- if { $r != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so some tests in this file will automatically fail."
- }
-
- # Start with a fresh gdbtk
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir ${testfile}.test]]
- set results [split $results \n]
-
- # Analyze results
- gdbtk_done $results
-}
diff --git a/gdb/testsuite/gdb.gdbtk/c_variable.test b/gdb/testsuite/gdb.gdbtk/c_variable.test
deleted file mode 100644
index e9a023230b9..00000000000
--- a/gdb/testsuite/gdb.gdbtk/c_variable.test
+++ /dev/null
@@ -1,2060 +0,0 @@
-# Varobj Tests (C language)
-# Copyright 1998, 2001 Red Hat, 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 was written by Keith Seitz (keiths@cygnus.com)
-
-# Read in the standard defs file
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir test_ran
-
-# Load in a file
-set program [file join $objdir c_variable]
-if {[catch {gdbtk_test_file $program} t]} {
- # This isn't a test case, since if this fails, we're hosed.
- gdbtk_test_error "loading \"$program\": $t"
-}
-
-# The variables that are created are stored in an array called "var".
-
-# proc to tell us which of the variables are changed/out of scope
-# FIXME: ALWAYS returning out={}
-proc check_update {} {
- global var
-
- set out {}
- set changed {}
- foreach ind [array names var] {
- set changed [concat $changed [$var($ind) update]]
- }
-
- return [list $changed $out]
-}
-
-# proc to create a variable
-proc create_variable {expr} {
- global var
-
- set err [catch {gdb_variable create "$expr" -expr $expr} v]
- if {!$err} {
- set var($expr) $v
- }
-
- return $err
-}
-
-# proc to get the children
-# Children are stored in the global "var" as
-# PARENT.child. So for struct _foo {int a; int b} bar;,
-# the children returned are {a b} and var(bar.a) and var(bar.b)
-# map the actual objects to their names.
-proc get_children {parent} {
- global var
-
- set kiddies [$var($parent) children]
- set children {}
- foreach child $kiddies {
- set name [lindex [split $child .] end]
- lappend children $name
- set var($parent.$name) $child
- }
-
- return $children
-}
-
-proc delete_variable {varname} {
- global var
-
- if {[info exists var($varname)]} {
- # This has to be caught, since deleting a parent
- # will erase all children.
- $var($varname) delete
- set vars [array names var $varname*]
- foreach v $vars {
- if {[info exists var($v)]} {
- unset var($v)
- }
- }
- }
-}
-
-# Compare the values of variable V in format FMT
-# with gdb's value.
-proc value {v fmt} {
- global var
- global _test
-
- set value [$var($v) value]
- set gdb [gdb_cmd "output/$fmt $v"]
- if {$value == $gdb} {
- set result ok
- } else {
- set result $v
- puts $_test(logfile) "output/$fmt $v"
- puts $_test(logfile) "gdbtk: $value <> gdb: $gdb"
- }
-
- return $result
-}
-
-proc delete_all_variables {} {
- global var
-
- foreach variable [array names var] {
- delete_variable $variable
- }
-}
-
-proc editable_variables {} {
- global var
-
- set yes {}
- set no {}
- foreach name [array names var] {
- if {[$var($name) editable]} {
- lappend yes $name
- } else {
- lappend no $name
- }
- }
-
- return [list $yes $no]
-}
-
-
-##### #####
-# #
-# Variable Creation tests #
-# #
-##### #####
-
-# Test: c_variable-1.1
-# Desc: Create global variable
-gdbtk_test c_variable-1.1 {create global variable} {
- create_variable global_simple
-} {0}
-
-# Test: c_variable-1.2
-# Desc: Create non-existent variable
-gdbtk_test c_variable-1.2 {create non-existent variable} {
- create_variable bogus_unknown_variable
-} {1}
-
-# Test: c_variable-1.3
-# Desc: Create out of scope variable
-gdbtk_test c_variable-1.3 {create out of scope variable} {
- create_variable argc
-} {1}
-
-# Break in main and run
-gdb_cmd "break do_locals_tests"
-gdbtk_test_run
-
-# Test: c_variable-1.4
-# Desc: create local variables
-gdbtk_test c_variable-1.4 {create local variables} {
- set results {}
- foreach v {linteger lpinteger lcharacter lpcharacter llong lplong lfloat lpfloat ldouble lpdouble lsimple lpsimple func} {
- lappend results [create_variable $v]
- }
- set results
-} {0 0 0 0 0 0 0 0 0 0 0 0 0}
-
-# Test: c_variable-1.5
-# Desc: create lsimple.character
-gdbtk_test c_variable-1.5 {create lsimple.character} {
- create_variable lsimple.character
-} {0}
-
-# Test: c_variable-1.6
-# Desc: create lpsimple->integer
-gdbtk_test c_variable-1.6 {create lpsimple->integer} {
- create_variable lpsimple->integer
-} {0}
-
-# Test: c_variable-1.7
-# Desc: ceate lsimple.integer
-gdbtk_test c_variable-1.7 {create lsimple.integer} {
- create_variable lsimple.integer
-} {0}
-
-# Test: c_variable-1.8
-# Desc: names of editable variables
-gdbtk_test c_variable-1.8 {names of editable variables} {
- editable_variables
-} {{lsimple.character lsimple.integer lpsimple lcharacter lpcharacter linteger lpinteger lfloat lpfloat func llong lplong lpsimple->integer ldouble lpdouble} {lsimple global_simple}}
-
-# 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.
-gdbtk_test c_variable-1.9 {create type name} {
- create_variable int
-} {1}
-
-##### #####
-# #
-# Value changed tests #
-# #
-##### #####
-
-# Test: c_variable-2.1
-# Desc: check whether values changed at do_block_tests
-gdbtk_test c_variable-2.1 {check whether values changed at do_block_tests} {
- check_update
-} {{} {}}
-
-# Step over "linteger = 1234;"
-gdb_cmd "step"
-
-# Test: c_variable-2.2
-# Desc: check whether only linteger changed values
-gdbtk_test c_variable-2.2 {check whether only linteger changed values} {
- check_update
-} {linteger {}}
-
-# Step over "lpinteger = &linteger;"
-gdb_cmd "step"
-
-# Test: c_variable-2.3
-# Desc: check whether only lpinteger changed
-gdbtk_test c_variable-2.3 {check whether only lpinteger changed} {
- check_update
-} {lpinteger {}}
-
-# Step over "lcharacter = 'a';"
-gdb_cmd "step"
-
-# Test: c_variable-2.4
-# Desc: check whether only lcharacter changed
-gdbtk_test c_variable-2.4 {check whether only lcharacter changed} {
- check_update
-} {lcharacter {}}
-
-# Step over "lpcharacter = &lcharacter;"
-gdb_cmd "step"
-
-# Test: c_variable-2.5
-# Desc: check whether only lpcharacter changed
-gdbtk_test c_variable-2.5 {check whether only lpcharacter changed} {
- check_update
-} {lpcharacter {}}
-
-# 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';
-for {set i 0} {$i < 9} {incr i} {
- gdb_cmd "step"
-}
-
-# Test: c_variable-2.6
-# Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer,
-# lsimple.unsigned_character lsimple.integer lsimple.character changed
-gdbtk_test c_variable-2.6 {check whether llong -- lsimple.character changed} {
- check_update
-} {{lsimple.character lsimple.integer lfloat lpfloat llong lplong ldouble lpdouble} {}}
-
-# Step over:
-# lsimple.signed_character = 21;
-# lsimple.char_ptr = &lcharacter;
-# lpsimple = &lsimple;
-# func = nothing;
-for {set i 0} {$i < 4} {incr i} {
- gdb_cmd "step"
-}
-
-# Test: c_variable-2.7
-# Desc: check whether lsimple.signed_character, lsimple.char_ptr, lpsimple, func changed
-gdbtk_test c_variable-2.7 {check whether lsimple.signed_character, lsimple.char_ptr, lpsimple, func changed} {
- check_update
-} {{lpsimple func lpsimple->integer} {}}
-
-# Step over
-# linteger = 4321;
-# lcharacter = 'b';
-# llong = 1212L;
-# lfloat = 1.2;
-# ldouble = 5.498548281828172;
-# lsimple.integer = 255;
-# lsimple.unsigned_integer = 4321;
-# lsimple.character = 'b';
-for {set i 0} {$i < 8} {incr i} {
- gdb_cmd "step"
-}
-
-# 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)
-gdbtk_test c_variable-2.8 {check whether linteger -- lsimple.integer changed} {
- check_update
-} {{lsimple.character lsimple.integer lcharacter linteger lfloat llong lpsimple->integer ldouble} {}}
-
-gdb_cmd "break subroutine1"
-gdb_cmd "continue"
-
-# Test: c_variable-2.9
-# Desc: stop in subroutine1
-gdbtk_test c_variable-2.9 {stop in subroutine1} {
- lindex [gdb_loc] 1
-} {subroutine1}
-
-# Test: c_variable-2.10
-# Desc: create variable for locals i,l in subroutine1
-gdbtk_test c_variable-2.10 {create variable for locals i,l in subroutine1} {
- set r [create_variable i]
- lappend r [create_variable l]
-} {0 0}
-
-# Test: c_variable-2.11
-# Desc: create do_locals_tests local in subroutine1
-gdbtk_test c_variable-2.11 {create do_locals_tests local in subroutine1} {
- create_variable linteger
-} {1}
-
-# Step over
-# global_simple.integer = i + 3;
-gdb_cmd "step"
-
-# 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.
-gdbtk_test c_variable-2.12 {change global_simple.integer} {
- check_update
-} {{} {}}
-
-# Step over
-# i = 212;
-gdb_cmd "step"
-
-# Test: c_variable-2.13
-# Desc: change subroutine1 local i
-gdbtk_test c_variable-2.13 {change subroutine1 local i} {
- check_update
-} {i {}}
-
-# Step over
-# *l = 12
-gdb_cmd "step"
-
-# This test is no longer valid, since varobj now forces
-# re-evaluation in the current frame by default.
-# Test: c_variable-2.14
-# Desc: change do_locals_tests local llong
-#gdbtk_test c_variable-2.14 {change do_locals_tests local llong} {
-# check_update
-#} {llong {}}
-
-# Leave subroutine1
-gdb_cmd "next"
-
-# Test: c_variable-2.15
-# Desc: check for out of scope subroutine1 locals
-gdbtk_test *c_variable-2.15 {check for out of scope subroutine1 locals (ops, we don't have a out-of-scope list yet)} {
- lindex [check_update] 1
-} {i l}
-
-# Test: c_variable-2.16
-# Desc: names of all editable variables
-gdbtk_test c_variable-2.16 {names of all editable variables} {
- editable_variables
-} {{lsimple.character lsimple.integer lpsimple i lcharacter lpcharacter linteger lpinteger lfloat lpfloat l func llong lplong lpsimple->integer ldouble lpdouble} {lsimple global_simple}}
-
-# Done with locals/globals tests. Erase all variables
-delete_all_variables
-
-##### #####
-# #
-# Block tests #
-# #
-##### #####
-gdb_cmd "break do_block_tests"
-gdb_cmd "continue"
-
-# Test: c_variable-3.1
-# Desc: stop in do_block_tests
-gdbtk_test c_variable-3.1 {stop in do_block_tests} {
- lindex [gdb_loc] 1
-} {do_block_tests}
-
-# Test: c_variable-3.2
-# Desc: create cb and foo
-gdbtk_test c_variable-3.2 {create cb and foo} {
- set r [create_variable cb]
- lappend r [create_variable foo]
-} {0 1}
-
-# step to "foo = 123;"
-gdb_cmd "step"
-
-# Be paranoid and assume 3.2 created foo
-delete_variable foo
-
-# Test: c_variable-3.3
-# Desc: create foo
-gdbtk_test c_variable-3.3 {create foo} {
- create_variable foo
-} {0}
-
-# step to "foo2 = 123;"
-gdb_cmd "step"
-
-# Test: c_variable-3.4
-# Desc: check foo, cb changed
-gdbtk_test c_variable-3.4 {check foo,cb changed} {
- check_update
-} {{foo cb} {}}
-
-# step to "foo = 321;"
-gdb_cmd "step"
-
-# Test: c_variable-3.5
-# Desc: create inner block foo
-gdbtk_test c_variable-3.5 {create inner block foo} {
- global var
- set err [catch {gdb_variable create inner_foo -expr foo} v]
- if {!$err} {
- set var(inner_foo) $v
- }
-
- set err
-} {0}
-
-# step to "foo2 = 0;"
-gdb_cmd "step"
-
-# Test: c_variable-3.6
-# Desc: create foo2
-gdbtk_test c_variable-3.6 {create foo2} {
- create_variable foo2
-} {0}
-
-# Test: c_variable-3.7
-# Desc: check that outer foo in scope and inner foo out of scope
-# Note: also a known gdb problem
-gdbtk_test *c_variable-3.7 {check that outer foo in scope and inner foo out of scope (known gdb problem)} {
- check_update
-} {{} inner_foo}
-
-delete_variable inner_foo
-
-# step to "foo = 0;"
-gdb_cmd "step"
-
-# Test: c_variable-3.8
-# Desc: check that foo2 out of scope
-gdbtk_test *c_variable-3.8 {check that foo2 out of scope (known gdb problem} {
- check_update
-} {{} foo2}
-
-# step to "cb = 21;"
-gdb_cmd "step"
-
-# Test: c_variable-3.9
-# Desc: check that only cb is in scope
-gdbtk_test *c_variable-3.9 {check that only cb is in scope (known gdb problem)} {
- check_update
-} {{} {foo2 foo}}
-
-# 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
-delete_all_variables
-
-##### #####
-# #
-# children tests #
-# #
-##### #####
-
-gdb_cmd "break do_children_tests"
-gdb_cmd "continue"
-
-# Test: c_variable-4.1
-# Desc: stopped in do_children_tests
-gdbtk_test c_variable-4.1 {stopped in do_children_tests} {
- lindex [gdb_loc] 1
-} {do_children_tests}
-
-# Test: c_variable-4.2
-# Desc: create variable "struct_declarations"
-gdbtk_test c_variable-4.2 {create variable "struct_declarations"} {
- create_variable struct_declarations
-} {0}
-
-# Test: c_variable-4.3
-# Desc: 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
-gdbtk_test c_variable-4.4 {number of children of struct_declarations} {
- $var(struct_declarations) numChildren
-} {11}
-
-# Test: c_variable-4.5
-# Desc: children of struct_declarations.integer
-gdbtk_test c_variable-4.5 {children of struct_declarations.integer} {
- get_children struct_declarations.integer
-} {}
-
-# Test: c_variable-4.6
-# Desc: number of children of struct_declarations.integer
-gdbtk_test c_variable-4.6 {number of children of struct_declarations.integer} {
- $var(struct_declarations.integer) numChildren
-} {0}
-
-# Test: c_variable-4.7
-# Desc: children of struct_declarations.character
-gdbtk_test c_variable-4.7 {children of struct_declarations.character} {
- get_children struct_declarations.character
-} {}
-
-# Test: c_variable-4.8
-# Desc: number of children of struct_declarations.character
-gdbtk_test c_variable-4.8 {number of children of struct_declarations.character} {
- $var(struct_declarations.character) numChildren
-} {0}
-
-# Test: c_variable-4.9
-# Desc: children of struct_declarations.char_ptr
-gdbtk_test c_variable-4.9 {children of struct_declarations.char_ptr} {
- get_children struct_declarations.char_ptr
-} {*char_ptr}
-
-# Test: c_variable-4.10
-# Desc: number of children of struct_declarations.char_ptr
-gdbtk_test c_variable-4.10 {number of children of struct_declarations.char_ptr} {
- $var(struct_declarations.char_ptr) numChildren
-} {1}
-
-# Test: c_variable-4.11
-# Desc: children of struct_declarations.long_int
-gdbtk_test c_variable-4.11 {children of struct_declarations.long_int} {
-
- get_children struct_declarations.long_int
-} {}
-
-# Test: c_variable-4.12
-# Desc: number of children of struct_declarations.long_int
-gdbtk_test c_variable-4.12 {number of children of struct_declarations.long_int} {
- $var(struct_declarations.long_int) numChildren
-} {0}
-
-# Test: c_variable-4.13
-# Desc: children of 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
-gdbtk_test c_variable-4.14 {number of children of int_ptr_ptr} {
- $var(struct_declarations.int_ptr_ptr) numChildren
-} {1}
-
-# Test: c_variable-4.15
-# Desc: children of struct_declarations.long_array
-gdbtk_test c_variable-4.15 {children of struct_declarations.long_array} {
- get_children struct_declarations.long_array
-} {0 1 2 3 4 5 6 7 8 9}
-
-# Test: c_variable-4.16
-# Desc: number of children of struct_declarations.long_array
-gdbtk_test c_variable-4.16 {number of children of struct_declarations.long_array} {
- $var(struct_declarations.long_array) numChildren
-} {10}
-
-# Test: c_variable-4.17
-# Desc: children of struct_declarations.func_ptr
-gdbtk_test c_variable-4.17 {children of struct_declarations.func_ptr} {
- get_children struct_declarations.func_ptr
-} {}
-
-# Test: c_variable-4.18
-# Desc: number of children of struct_declarations.func_ptr
-gdbtk_test c_variable-4.18 {number of children of struct_declarations.func_ptr} {
- $var(struct_declarations.func_ptr) numChildren
-} {0}
-
-# Test: c_variable-4.19
-# Desc: children of struct_declarations.func_ptr_struct
-gdbtk_test c_variable-4.19 {children of struct_declarations.func_ptr_struct} {
- get_children struct_declarations.func_ptr_struct
-} {}
-
-# Test: c_variable-4.20
-# Desc: number of children of struct_declarations.func_ptr_struct
-gdbtk_test c_variable-4.20 {number of children of struct_declarations.func_ptr_struct} {
- $var(struct_declarations.func_ptr_struct) numChildren
-} {0}
-
-# Test: c_variable-4.21
-# Desc: children of struct_declarations.func_ptr_ptr
-gdbtk_test c_variable-4.21 {children of struct_declarations.func_ptr_ptr} {
- get_children struct_declarations.func_ptr_ptr
-} {}
-
-# Test: c_variable-4.22
-# Desc: number of children of struct_declarations.func_ptr_ptr
-gdbtk_test c_variable-4.22 {number of children of struct_declarations.func_ptr_ptr} {
- $var(struct_declarations.func_ptr_ptr) numChildren
-} {0}
-
-# Test: c_variable-4.23
-# Desc: children of struct_declarations.u1
-gdbtk_test c_variable-4.23 {children of struct_declarations.u1} {
- get_children struct_declarations.u1
-} {a b c d}
-
-# Test: c_variable-4.24
-# Desc: number of children of struct_declarations.u1
-gdbtk_test c_variable-4.24 {number of children of struct_declarations.u1} {
- $var(struct_declarations.u1) numChildren
-} {4}
-
-# Test: c_variable-4.25
-# Desc: 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
-gdbtk_test c_variable-4.26 {number of children of struct_declarations.s2} {
- $var(struct_declarations.s2) numChildren
-} {4}
-
-# Test: c_variable-4.27
-# Desc: children of struct_declarations.long_array.1
-gdbtk_test c_variable-4.27 {children of struct_declarations.long_array.1} {
- get_children struct_declarations.long_array.1
-} {}
-
-# Test: c_variable-4.28
-# Desc: number of children of struct_declarations.long_array.1
-gdbtk_test c_variable-4.28 {number of children of struct_declarations.long_array.1} {
- $var(struct_declarations.long_array.1) numChildren
-} {0}
-
-# Test: c_variable-4.29
-# Desc: children of struct_declarations.long_array.2
-gdbtk_test c_variable-4.29 {children of struct_declarations.long_array.2} {
- get_children struct_declarations.long_array.2
-} {}
-
-# Test: c_variable-4.30
-# Desc: number of children of struct_declarations.long_array.2
-gdbtk_test c_variable-4.30 {number of children of struct_declarations.long_array.2} {
- $var(struct_declarations.long_array.2) numChildren
-} {0}
-
-# Test: c_variable-4.31
-# Desc: children of struct_declarations.long_array.3
-gdbtk_test c_variable-4.31 {children of struct_declarations.long_array.3} {
- get_children struct_declarations.long_array.3
-} {}
-
-# Test: c_variable-4.32
-# Desc: number of children of struct_declarations.long_array.3
-gdbtk_test c_variable-4.32 {number of children of struct_declarations.long_array.3} {
- $var(struct_declarations.long_array.3) numChildren
-} {0}
-
-# Test: c_variable-4.33
-# Desc: children of struct_declarations.long_array.4
-gdbtk_test c_variable-4.33 {children of struct_declarations.long_array.4} {
- get_children struct_declarations.long_array.4
-} {}
-
-# Test: c_variable-4.34
-# Desc: number of children of struct_declarations.long_array.4
-gdbtk_test c_variable-4.34 {number of children of struct_declarations.long_array.4} {
- $var(struct_declarations.long_array.4) numChildren
-} {0}
-
-# Test: c_variable-4.35
-# Desc: children of struct_declarations.long_array.5
-gdbtk_test c_variable-4.35 {children of struct_declarations.long_array.5} {
- get_children struct_declarations.long_array.5
-} {}
-
-# Test: c_variable-4.36
-# Desc: number of children of struct_declarations.long_array.5
-gdbtk_test c_variable-4.36 {number of children of struct_declarations.long_array.5} {
- $var(struct_declarations.long_array.5) numChildren
-} {0}
-
-# Test: c_variable-4.37
-# Desc: children of struct_declarations.long_array.6
-gdbtk_test c_variable-4.37 {children of struct_declarations.long_array.6} {
- get_children struct_declarations.long_array.6
-} {}
-
-# Test: c_variable-4.38
-# Desc: number of children of struct_declarations.long_array.6
-gdbtk_test c_variable-4.38 {number of children of struct_declarations.long_array.6} {
- $var(struct_declarations.long_array.6) numChildren
-} {0}
-
-# Test: c_variable-4.39
-# Desc: children of struct_declarations.long_array.7
-gdbtk_test c_variable-4.39 {children of struct_declarations.long_array.7} {
- get_children struct_declarations.long_array.7
-} {}
-
-# Test: c_variable-4.40
-# Desc: number of children of struct_declarations.long_array.7
-gdbtk_test c_variable-4.40 {number of children of struct_declarations.long_array.7} {
- $var(struct_declarations.long_array.7) numChildren
-} {0}
-
-# Test: c_variable-4.41
-# Desc: children of struct_declarations.long_array.8
-gdbtk_test c_variable-4.41 {children of struct_declarations.long_array.8} {
- get_children struct_declarations.long_array.8
-} {}
-
-# Test: c_variable-4.42
-# Desc: number of children of struct_declarations.long_array.8
-gdbtk_test c_variable-4.42 {number of children of struct_declarations.long_array.8} {
- $var(struct_declarations.long_array.8) numChildren
-} {0}
-
-# Test: c_variable-4.43
-# Desc: children of struct_declarations.long_array.9
-gdbtk_test c_variable-4.43 {children of struct_declarations.long_array.9} {
- get_children struct_declarations.long_array.9
-} {}
-
-# Test: c_variable-4.44
-# Desc: number of children of struct_declarations.long_array.9
-gdbtk_test c_variable-4.44 {number of children of struct_declarations.long_array.9} {
- $var(struct_declarations.long_array.9) numChildren
-} {0}
-
-# Test: c_variable-4.45
-# Desc: children of struct_declarations.u1.a
-gdbtk_test c_variable-4.45 {children of struct_declarations.u1.a} {
- get_children struct_declarations.u1.a
-} {}
-
-# Test: c_variable-4.46
-# Desc: number of children of struct_declarations.u1.a
-gdbtk_test c_variable-4.46 {number of children of struct_declarations.u1.a} {
- $var(struct_declarations.u1.a) numChildren
-} {0}
-
-# Test: c_variable-4.47
-# Desc: children of struct_declarations.u1.b
-gdbtk_test c_variable-4.47 {children of struct_declarations.u1.b} {
- get_children struct_declarations.u1.b
-} {*b}
-
-# Test: c_variable-4.48
-# Desc: number of children of struct_declarations.u1.b
-gdbtk_test c_variable-4.48 {number of children of struct_declarations.u1.b} {
- $var(struct_declarations.u1.b) numChildren
-} {1}
-
-# Test: c_variable-4.49
-# Desc: children of struct_declarations.u1.c
-gdbtk_test c_variable-4.49 {children of struct_declarations.u1.c} {
- get_children struct_declarations.u1.c
-} {}
-
-# Test: c_variable-4.50
-# Desc: number of children of struct_declarations.u1.c
-gdbtk_test c_variable-4.50 {number of children of struct_declarations.u1.c} {
- $var(struct_declarations.u1.c) numChildren
-} {0}
-
-# Test: c_variable-4.51
-# Desc: children of struct_declarations.u1.d
-gdbtk_test c_variable-4.51 {children of struct_declarations.u1.d} {
- get_children struct_declarations.u1.d
-} {}
-
-# Test: c_variable-4.52
-# Desc: number of children of struct_declarations.u1.d
-gdbtk_test c_variable-4.52 {number of children of struct_declarations.u1.d} {
- $var(struct_declarations.u1.d) numChildren
-} {0}
-
-# Test: c_variable-4.53
-# Desc: children of struct_declarations.s2.u2
-gdbtk_test c_variable-4.53 {children of struct_declarations.s2.u2} {
- get_children struct_declarations.s2.u2
-} {u1s1 f u1s2}
-
-# Test: c_variable-4.54
-# Desc: number of children of struct_declarations.s2.u2
-gdbtk_test c_variable-4.54 {number of children of struct_declarations.s2.u2} {
- $var(struct_declarations.s2.u2) numChildren
-} {3}
-
-# Test: c_variable-4.55
-# Desc: children of struct_declarations.s2.g
-gdbtk_test c_variable-4.55 {children of struct_declarations.s2.g} {
- get_children struct_declarations.s2.g
-} {}
-
-# Test: c_variable-4.56
-# Desc: number of children of struct_declarations.s2.g
-gdbtk_test c_variable-4.56 {number of children of struct_declarations.s2.g} {
- $var(struct_declarations.s2.g) numChildren
-} {0}
-
-# Test: c_variable-4.57
-# Desc: children of struct_declarations.s2.h
-gdbtk_test c_variable-4.57 {children of struct_declarations.s2.h} {
- get_children struct_declarations.s2.h
-} {}
-
-# Test: c_variable-4.58
-# Desc: number of children of struct_declarations.s2.h
-gdbtk_test c_variable-4.58 {number of children of struct_declarations.s2.h} {
- $var(struct_declarations.s2.h) numChildren
-} {0}
-
-# Test: c_variable-4.59
-# Desc: children of struct_declarations.s2.i
-gdbtk_test c_variable-4.59 {children of struct_declarations.s2.i} {
- get_children struct_declarations.s2.i
-} {0 1 2 3 4 5 6 7 8 9}
-
-# Test: c_variable-4.60
-# Desc: number of children of struct_declarations.s2.i
-gdbtk_test c_variable-4.60 {number of children of struct_declarations.s2.i} {
- $var(struct_declarations.s2.i) numChildren
-} {10}
-
-# Test: c_variable-4.61
-# Desc: children of struct_declarations.s2.u2.u1s1
-gdbtk_test c_variable-4.61 {children of struct_declarations.s2.u2.u1s1} {
- get_children struct_declarations.s2.u2.u1s1
-} {d e func foo}
-
-# Test: c_variable-4.62
-# Desc: number of children of struct_declarations.s2.u2.u1s1
-gdbtk_test c_variable-4.62 {number of children of struct_declarations.s2.u2.u1s1} {
- $var(struct_declarations.s2.u2.u1s1) numChildren
-} {4}
-
-# Test: c_variable-4.63
-# Desc: children of struct_declarations.s2.u2.f
-gdbtk_test c_variable-4.63 {children of struct_declarations.s2.u2.f} {
- get_children struct_declarations.s2.u2.f
-} {}
-
-# Test: c_variable-4.64
-# Desc: number of children of struct_declarations.s2.u2.f
-gdbtk_test c_variable-4.64 {number of children of struct_declarations.s2.u2.f} {
- $var(struct_declarations.s2.u2.f) numChildren
-} {0}
-
-# Test: c_variable-4.65
-# Desc: children of struct_declarations.s2.u2.u1s2
-gdbtk_test c_variable-4.65 {children of struct_declarations.s2.u2.u1s2} {
- get_children struct_declarations.s2.u2.u1s2
-} {array_ptr func}
-
-# Test: c_variable-4.66
-# Desc: number of children of struct_declarations.s2.u2.u1s2
-gdbtk_test c_variable-4.66 {number of children of struct_declarations.s2.u2.u1s2} {
- $var(struct_declarations.s2.u2.u1s2) numChildren
-} {2}
-
-# Test: c_variable-4.67
-# Desc: children of struct_declarations.s2.u2.u1s1.d
-gdbtk_test c_variable-4.67 {children of struct_declarations.s2.u2.u1s1.d} {
- get_children struct_declarations.s2.u2.u1s1.d
-} {}
-
-# Test: c_variable-4.68
-# Desc: number of children of struct_declarations.s2.u2.u1s1.d
-gdbtk_test c_variable-4.68 {number of children of struct_declarations.s2.u2.u1s1.d} {
- $var(struct_declarations.s2.u2.u1s1.d) numChildren
-} {0}
-
-# Test: c_variable-4.69
-# Desc: children of struct_declarations.s2.u2.u1s1.e
-gdbtk_test c_variable-4.69 {children of struct_declarations.s2.u2.u1s1.e} {
- get_children struct_declarations.s2.u2.u1s1.e
-} {0 1 2 3 4 5 6 7 8 9}
-
-# Test: c_variable-4.70
-# Desc: number of children of struct_declarations.s2.u2.u1s1.e
-gdbtk_test c_variable-4.70 {number of children of struct_declarations.s2.u2.u1s1.e} {
- $var(struct_declarations.s2.u2.u1s1.e) numChildren
-} {10}
-
-# Test: c_variable-4.71
-# Desc: children of struct_declarations.s2.u2.u1s1.func
-gdbtk_test c_variable-4.71 {children of struct_declarations.s2.u2.u1s1.func} {
- get_children struct_declarations.s2.u2.u1s1.func
-} {}
-
-# Test: c_variable-4.72
-# Desc: number of children of struct_declarations.s2.u2.u1s1.func
-gdbtk_test c_variable-4.72 {number of children of struct_declarations.s2.u2.u1s1.func} {
- $var(struct_declarations.s2.u2.u1s1.func) numChildren
-} {0}
-
-# Test: c_variable-4.73
-# Desc: children of struct_declarations.s2.u2.u1s1.foo
-gdbtk_test c_variable-4.73 {children of struct_declarations.s2.u2.u1s1.foo} {
- get_children struct_declarations.s2.u2.u1s1.foo
-} {}
-
-# Test: c_variable-4.74
-# Desc: number of children of struct_declarations.s2.u2.u1s1.foo
-gdbtk_test c_variable-4.74 {number of children of struct_declarations.s2.u2.u1s1.foo} {
- $var(struct_declarations.s2.u2.u1s1.foo) numChildren
-} {0}
-
-# Test: c_variable-4.75
-# Desc: children of struct_declarations.s2.u2.u1s2.array_ptr
-gdbtk_test c_variable-4.75 {children of struct_declarations.s2.u2.u1s2.array_ptr} {
- get_children struct_declarations.s2.u2.u1s2.array_ptr
-} {0 1}
-
-# Test: c_variable-4.76
-# Desc: number of children of struct_declarations.s2.u2.u1s2.array_ptr
-gdbtk_test c_variable-4.76 {number of children of struct_declarations.s2.u2.u1s2.array_ptr} {
- $var(struct_declarations.s2.u2.u1s2.array_ptr) numChildren
-} {2}
-
-# Test: c_variable-4.77
-# Desc: children of struct_declarations.s2.u2.u1s2.func
-gdbtk_test c_variable-4.77 {children of struct_declarations.s2.u2.u1s2.func} {
- get_children struct_declarations.s2.u2.u1s2.func
-} {}
-
-# Test: c_variable-4.78
-# Desc: number of children of struct_declarations.s2.u2.u1s2.func
-gdbtk_test c_variable-4.78 {number of children of struct_declarations.s2.u2.u1s2.func} {
- $var(struct_declarations.s2.u2.u1s2.func) numChildren
-} {0}
-
-# Test: c_variable-4.79
-# Desc: children of struct_declarations.*int_ptr_ptr
-gdbtk_test c_variable-4.79 {children of struct_declarations.*int_ptr_ptr} {
- get_children 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
-gdbtk_test c_variable-4.80 {Number of children of struct_declarations.*int_ptr_ptr} {
- $var(struct_declarations.int_ptr_ptr.*int_ptr_ptr) numChildren
-} {1}
-
-# Step to "struct_declarations.integer = 123;"
-gdb_cmd "step"
-
-# Test: c_variable-4.81
-# Desc: create local variable "weird"
-gdbtk_test c_variable-4.81 {create local variable "weird"} {
- create_variable weird
-} {0}
-
-# Test: c_variable-4.82
-# Desc: children of weird
-gdbtk_test c_variable-4.82 {children of weird} {
- get_children weird
-} {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.83
-# Desc: number of children of weird
-gdbtk_test c_variable-4.83 {number of children of weird} {
- $var(weird) numChildren
-} {11}
-
-# Test: c_variable-4.84
-# Desc: 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
-gdbtk_test c_variable-4.85 {number of children of weird->long_array} {
- $var(weird.long_array) numChildren
-} {10}
-
-# Test: c_variable-4.86
-# Desc: 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
-gdbtk_test c_variable-4.87 {number of children of weird->int_ptr_ptr} {
- $var(weird.int_ptr_ptr) numChildren
-} {1}
-
-# Test: c_variable-4.88
-# Desc: children of *weird->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
-gdbtk_test c_variable-4.89 {number of children *weird->int_ptr_ptr} {
- $var(weird.int_ptr_ptr.*int_ptr_ptr) numChildren
-} {1}
-
-# Test: c_variable-4.90
-# Desc: create weird->int_ptr_ptr
-gdbtk_test c_variable-4.90 {create weird->int_ptr_ptr} {
- create_variable weird->int_ptr_ptr
-} {0}
-
-# Test: c_variable-4.91
-# Desc: children of weird->int_ptr_ptr
-gdbtk_test c_variable-4.91 {children of weird->int_ptr_ptr} {
- get_children weird->int_ptr_ptr
-} {*weird->int_ptr_ptr}
-
-# Test: c_variable-4.92
-# Desc: number of children of (weird->int_ptr_ptr)
-gdbtk_test c_variable-4.92 {number of children of (weird->int_ptr_ptr)} {
- $var(weird->int_ptr_ptr) numChildren
-} {1}
-
-# Test: c_variable-4.93
-# Desc: children of *(weird->int_ptr_ptr)
-gdbtk_test c_variable-4.93 {children of *(weird->int_ptr_ptr)} {
- get_children weird->int_ptr_ptr.*weird->int_ptr_ptr
-} {**weird->int_ptr_ptr}
-
-# Test: c_variable-4.94
-# Desc: number of children of *(weird->int_ptr_ptr)
-gdbtk_test c_variable-4.94 {number of children of *(weird->int_ptr_ptr)} {
- $var(weird->int_ptr_ptr.*weird->int_ptr_ptr) numChildren
-} {1}
-
-# Test: c_variable-4.95
-# Desc: children of *(*(weird->int_ptr_ptr))
-gdbtk_test c_variable-4.95 {children of *(*(weird->int_ptr_ptr))} {
- get_children 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))
-gdbtk_test c_variable-4.96 {number of children of **weird->int_ptr_ptr} {
- $var(weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr) numChildren
-} {0}
-
-# Test: c_variable-4.97
-# Desc: is weird editable
-gdbtk_test c_variable-4.97 {is weird editable} {
- $var(weird) editable
-} {1}
-
-# Test: c_variable-4.98
-# Desc: is weird->int_ptr_ptr editable
-gdbtk_test c_variable-4.98 {is weird->int_ptr_ptr editable} {
- $var(weird.int_ptr_ptr) editable
-} {1}
-
-# Test: c_variable-4.99
-# Desc: is *(weird->int_ptr_ptr) editable
-gdbtk_test c_variable-4.99 {is *(weird->int_ptr_ptr) editable} {
- $var(weird.int_ptr_ptr.*int_ptr_ptr) editable
-} {1}
-
-# Test: c_variable-4.100
-# Desc: is *(*(weird->int_ptr_ptr)) editable
-gdbtk_test c_variable-4.100 {is *(*(weird->int_ptr_ptr)) editable} {
- $var(weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr) editable
-} {1}
-
-# Test: c_variable-4.101
-# Desc: is weird->u1 editable
-gdbtk_test c_variable-4.101 {is weird->u1 editable} {
- $var(weird.u1) editable
-} {0}
-
-# Test: c_variable-4.102
-# Desc: is weird->s2 editable
-gdbtk_test c_variable-4.102 {is weird->s2 editable} {
- $var(weird.s2) editable
-} {0}
-
-# Test: c_variable-4.103
-# Desc: is struct_declarations.u1.a editable
-gdbtk_test c_variable-4.103 {is struct_declarations.u1.a editable} {
- $var(struct_declarations.u1.a) editable
-} {1}
-
-# Test: c_variable-4.104
-# Desc: is struct_declarations.u1.b editable
-gdbtk_test c_variable-4.104 {is struct_declarations.u1.b editable} {
- $var(struct_declarations.u1.b) editable
-} {1}
-
-# Test: c_variable-4.105
-# Desc: is struct_declarations.u1.c editable
-gdbtk_test c_variable-4.105 {is struct_declarations.u1.c editable} {
- $var(struct_declarations.u1.c) editable
-} {1}
-
-# Test: c_variable-4.106
-# Desc: is struct_declarations.long_array editable
-gdbtk_test c_variable-4.106 {is struct_declarations.long_array editable} {
- $var(struct_declarations.long_array) editable
-} {0}
-
-# Test: c_variable-4.107
-# Desc: is struct_declarations.long_array[0] editable
-gdbtk_test c_variable-4.107 {is struct_declarations.long_array[0] editable} {
- $var(struct_declarations.long_array.0) editable
-} {1}
-
-# Test: c_variable-4.108
-# Desc: is struct_declarations editable
-gdbtk_test c_variable-4.108 {is struct_declarations editable} {
- $var(struct_declarations) editable
-} {0}
-
-delete_variable weird
-
-##### #####
-# #
-# children and update tests #
-# #
-##### #####
-
-# Test: c_variable-5.1
-# Desc: check that nothing changed
-gdbtk_test c_variable-5.1 {check that nothing changed} {
- check_update
-} {{} {}}
-
-# Step over "struct_declarations.integer = 123;"
-gdb_cmd "step"
-
-# Test: c_variable-5.2
-# Desc: check that integer changed
-gdbtk_test c_variable-5.2 {check that integer changed} {
- check_update
-} {struct_declarations.integer {}}
-
-# Step over:
-# weird->char_ptr = "hello";
-# bar = 2121;
-# foo = &bar;
-for {set i 0} {$i < 3} {incr i} {
- gdb_cmd "step"
-}
-
-# Test: c_variable-5.3
-# Desc: check that char_ptr changed
-gdbtk_test c_variable-5.3 {check that char_ptr changed} {
- check_update
-} {{struct_declarations.char_ptr struct_declarations.char_ptr.*char_ptr} {}}
-
-# Step over "struct_declarations.int_ptr_ptr = &foo;"
-gdb_cmd "step"
-
-# Test: c_variable-5.4
-# Desc: check that int_ptr_ptr and children changed
-gdbtk_test c_variable-5.4 {check that int_ptr_ptr and children changed} {
- check_update
-} {{struct_declarations.int_ptr_ptr struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr} {}}
-
-# Step over "weird->long_array[0] = 1234;"
-gdb_cmd "step"
-
-# Test: c_variable-5.5
-# Desc: check that long_array[0] changed
-gdbtk_test c_variable-5.5 {check that long_array[0] changed} {
- check_update
-} {struct_declarations.long_array.0 {}}
-
-# Step over "struct_declarations.long_array[1] = 2345;"
-gdb_cmd "step"
-
-# Test: c_variable-5.6
-# Desc: check that long_array[1] changed
-gdbtk_test c_variable-5.6 {check that long_array[1] changed} {
- check_update
-} {struct_declarations.long_array.1 {}}
-
-# Step over "weird->long_array[2] = 3456;"
-gdb_cmd "step"
-
-# Test: c_variable-5.7
-# Desc: check that long_array[2] changed
-gdbtk_test c_variable-5.7 {check that long_array[2] changed} {
- check_update
-} {struct_declarations.long_array.2 {}}
-
-# 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;
-for {set i 0} {$i < 7} {incr i} {
- gdb_cmd "step"
-}
-
-# Test: c_variable-5.8
-# Desc: check that long_array[3-9] changed
-gdbtk_test c_variable-5.8 {check that long_array[3-9] changed} {
- check_update
-} {{struct_declarations.long_array.3 struct_declarations.long_array.4 struct_declarations.long_array.5 struct_declarations.long_array.6 struct_declarations.long_array.7 struct_declarations.long_array.8 struct_declarations.long_array.9} {}}
-
-# Step over "weird->func_ptr = nothing;"
-gdb_cmd "step"
-
-# Test: c_variable-5.9
-# Desc: check that func_ptr changed
-gdbtk_test c_variable-5.9 {check that func_ptr changed} {
- check_update
-} {struct_declarations.func_ptr {}}
-
-# Delete all variables
-delete_all_variables
-
-# Step over all lines:
-# ...
-# psnp = &snp0;
-for {set i 0} {$i < 43} {incr i} {
- gdb_cmd "step"
-}
-
-# Test: c_variable-5.10
-# Desc: create psnp->char_ptr
-gdbtk_test c_variable-5.10 {create psnp->char_ptr} {
- create_variable psnp->char_ptr
-} {0}
-
-# Test: c_variable-5.11
-# Desc: children of psnp->char_ptr
-gdbtk_test c_variable-5.11 {children of psnp->char_ptr} {
- get_children psnp->char_ptr
-} {*psnp->char_ptr}
-
-# Test: c_variable-5.12
-# Desc: number of children of psnp->char_ptr
-gdbtk_test c_variable-5.12 {number of children of psnp->char_ptr} {
- $var(psnp->char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.13
-# Desc: children of *(psnp->char_ptr)
-gdbtk_test c_variable-5.13 {children of *(psnp->char_ptr)} {
- get_children psnp->char_ptr.*psnp->char_ptr
-} {**psnp->char_ptr}
-
-# Test: c_variable-5.14
-# Desc: number of children of *(psnp->char_ptr)
-gdbtk_test c_variable-5.14 {number of children of *(psnp->char_ptr)} {
- $var(psnp->char_ptr.*psnp->char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.15
-# Desc: children of *(*(psnp->char_ptr))
-gdbtk_test c_variable-5.15 {children of *(*(psnp->char_ptr))} {
- get_children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr
-} {***psnp->char_ptr}
-
-# Test: c_variable-5.16
-# Desc: number of children of *(*(psnp->char_ptr))
-gdbtk_test c_variable-5.16 {number of children of *(*(psnp->char_ptr))} {
- $var(psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.17
-# Desc: children of *(*(*(psnp->char_ptr)))
-gdbtk_test c_variable-5.17 {children of *(*(*(psnp->char_ptr)))} {
- get_children psnp->char_ptr.*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)))
-gdbtk_test c_variable-5.18 {number of children of *(*(*(psnp->char_ptr)))} {
- $var(psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.19
-# Desc: create psnp->long_ptr
-gdbtk_test c_variable-5.19 {create psnp->long_ptr} {
- create_variable psnp->long_ptr
-} {0}
-
-# Test: c_variable-5.20
-# Desc: children of psnp->long_ptr
-gdbtk_test c_variable-5.20 {children of psnp->long_ptr} {
- get_children psnp->long_ptr
-} {*psnp->long_ptr}
-
-# Test: c_variable-5.21
-# Desc: number of children of psnp->long_ptr
-gdbtk_test c_variable-5.21 {number of children of psnp->long_ptr} {
- $var(psnp->long_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.22
-# Desc: children of *(psnp->long_ptr)
-gdbtk_test c_variable-5.22 {children of *(psnp->long_ptr)} {
- get_children psnp->long_ptr.*psnp->long_ptr
-} {**psnp->long_ptr}
-
-# Test: c_variable-5.23
-# Desc: number of children of *(psnp->long_ptr)
-gdbtk_test c_variable-5.23 {number of children of *(psnp->long_ptr)} {
- $var(psnp->long_ptr.*psnp->long_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.24
-# Desc: children of *(*(psnp->long_ptr))
-gdbtk_test c_variable-5.24 {children of *(*(psnp->long_ptr))} {
- get_children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr
-} {***psnp->long_ptr}
-
-# Test: c_variable-5.25
-# Desc: number of children of *(*(psnp->long_ptr))
-gdbtk_test c_variable-5.25 {number of children of *(*(psnp->long_ptr))} {
- $var(psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.26
-# Desc: children of *(*(*(psnp->long_ptr)))
-gdbtk_test c_variable-5.26 {children of *(*(*(psnp->long_ptr)))} {
- get_children psnp->long_ptr.*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)))
-gdbtk_test c_variable-5.27 {number of children of *(*(*(psnp->long_ptr)))} {
- $var(psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.28
-# Desc: children of *(*(*(*(psnp->long_ptr))))
-gdbtk_test c_variable-5.29 {children of *(*(*(*(psnp->long_ptr))))} {
- get_children 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))))
-gdbtk_test c_variable-5.29 {number of children of *(*(*(*(psnp->long_ptr))))} {
- $var(psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr) numChildren
-} {0}
-
-# Test: c_variable-5.30
-# Desc: create psnp->ptrs
-gdbtk_test c_variable-5.30 {create psnp->ptrs} {
- create_variable psnp->ptrs
-} {0}
-
-# Test: c_variable-5.31
-# Desc: children of psnp->ptrs
-gdbtk_test c_variable-5.31 {children of psnp->ptrs} {
- get_children psnp->ptrs
-} {0 1 2}
-
-# Test: c_variable-5.32
-# Desc: number of children of psnp->ptrs
-gdbtk_test c_variable-5.32 {number of children of psnp->ptrs} {
- $var(psnp->ptrs) numChildren
-} {3}
-
-# Test: c_variable-5.33
-# Desc: children of psnp->ptrs[0]
-gdbtk_test c_variable-5.33 {children of psnp->ptrs[0]} {
- get_children psnp->ptrs.0
-} {char_ptr long_ptr ptrs next}
-
-# Test: c_variable-5.34
-# Desc: number of children of psnp->ptrs[0]
-gdbtk_test c_variable-5.34 {number of children of psnp->ptrs[0]} {
- $var(psnp->ptrs.0) numChildren
-} {4}
-
-# Test: c_variable-5.35
-# Desc: children of psnp->ptrs[0]->next
-gdbtk_test c_variable-5.35 {children of psnp->ptrs.0.next} {
- get_children psnp->ptrs.0.next
-} {char_ptr long_ptr ptrs next}
-
-# Test: c_variable-5.36
-# Desc: number of children of psnp->ptrs[0]->next
-gdbtk_test c_variable-5.36 {number of children of psnp->ptrs[0]->next} {
- $var(psnp->ptrs.0.next) numChildren
-} {4}
-
-# Test: c_variable-5.37
-# Desc: 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
-gdbtk_test c_variable-5.38 {number of children of psnp->ptrs[0]->next->char_ptr} {
- $var(psnp->ptrs.0.next.char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.39
-# Desc: children of *psnp->ptrs[0]->next->char_ptr
-gdbtk_test c_variable-5.39 {children of *psnp->ptrs[0]->next->char_ptr} {
- get_children psnp->ptrs.0.next.char_ptr.*char_ptr
-} {**char_ptr}
-
-# Test: c_variable-5.40
-# Desc: number of children of *psnp->ptrs[0]->next->char_ptr
-gdbtk_test c_variable-5.40 {number of children of *psnp->ptrs[0]->next->char_ptr} {
- $var(psnp->ptrs.0.next.char_ptr.*char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.41
-# Desc: children of **psnp->ptrs[0]->next->char_ptr
-gdbtk_test c_variable-5.41 {children of **psnp->ptrs[0]->next->char_ptr} {
- get_children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr
-} {***char_ptr}
-
-# Test: c_variable-5.42
-# Desc: number of children of **psnp->ptrs[0]->next->char_ptr
-gdbtk_test c_variable-5.42 {number of children of **psnp->ptrs[0]->next->char_ptr} {
- $var(psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.43
-# Desc: children of ***psnp->ptrs[0]->next->char_ptr
-gdbtk_test c_variable-5.43 {children of ***psnp->ptrs[0]->next->char_ptr} {
- get_children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr
-} {****char_ptr}
-
-# Test: c_variable-5.44
-# Desc: number of children of ***psnp->ptrs[0]->next->char_ptr
-gdbtk_test c_variable-5.44 {number of children of ***psnp->ptrs[0]->next->char_ptr} {
- $var(psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr) numChildren
-} {1}
-
-# Test: c_variable-5.45
-# Desc: children of psnp->ptrs[0]->next->next
-gdbtk_test c_variable-5.45 {children of psnp->ptrs[0]->next->next} {
- get_children psnp->ptrs.0.next.next
-} {char_ptr long_ptr ptrs next}
-
-# Test: c_variable-5.46
-# Desc: children of psnp->ptrs[0]->next->next->ptrs
-gdbtk_test c_variable-5.46 {children of psnp->ptrs[0]->next->next->ptrs} {
- get_children psnp->ptrs.0.next.next.ptrs
-} {0 1 2}
-
-# Step over "snp0.char_ptr = &b3;"
-gdb_cmd "step"
-
-# Test: c_variable-5.47
-# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
-gdbtk_test c_variable-5.47 {check that psnp->char_ptr (and [0].char_ptr) changed} {
- check_update
-} {{psnp->ptrs.0.char_ptr psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr} {}}
-
-# Step over "snp1.char_ptr = &c3;"
-gdb_cmd "step"
-
-# Test: c_variable-5.48
-# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
-gdbtk_test c_variable-5.48 {check that psnp->next->char_ptr (and [1].char_ptr) changed} {
- check_update
-} {{psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr} {}}
-
-# Step over "snp2.char_ptr = &a3;"
-gdb_cmd "step"
-
-# Test: c_variable-5.49
-# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
-gdbtk_test c_variable-5.49 {heck that psnp->next->next->char_ptr (and [2].char_ptr) changed} {
- check_update
-} {psnp->ptrs.0.next.next.char_ptr {}}
-
-# Step over "snp0.long_ptr = &y3;"
-gdb_cmd "step"
-
-# Test: c_variable-5.50
-# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
-gdbtk_test c_variable-5.50 {check that psnp->long_ptr (and [0].long_ptr) changed} {
- check_update
-} {{psnp->ptrs.0.long_ptr psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr} {}}
-
-# Step over "snp1.long_ptr = &x3;"
-gdb_cmd "step"
-
-# Test: c_variable-5.51
-# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
-gdbtk_test c_variable-5.51 {check that psnp->next->long_ptr (and [1].long_ptr) changed} {
- check_update
-} {psnp->ptrs.0.next.long_ptr {}}
-
-# Step over "snp2.long_ptr = &z3;"
-gdb_cmd "step"
-
-# Test: c_variable-5.52
-# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
-gdbtk_test c_variable-5.52 {check that psnp->next->next->long_ptr (and [2].long_ptr) changed} {
- check_update
-} {psnp->ptrs.0.next.next.long_ptr {}}
-
-# Test: c_variable-5.53
-# Desc: names of editable variables
-gdbtk_test c_variable-5.53 {names of editable variables} {
- editable_variables
-} {{psnp->ptrs.0.next psnp->ptrs.0.next.next psnp->ptrs.0.next.next.char_ptr psnp->ptrs.0.next.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr psnp->ptrs.0.next.char_ptr psnp->ptrs.0.next.long_ptr psnp->ptrs.0.next.char_ptr.*char_ptr psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr psnp->ptrs.0.next.next.next psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr psnp->char_ptr.*psnp->char_ptr psnp->ptrs.0.next.next.ptrs.0 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr psnp->long_ptr.*psnp->long_ptr psnp->ptrs.0.next.next.ptrs.1 psnp->ptrs.0.next.next.ptrs.2 psnp->ptrs.0.char_ptr psnp->ptrs.0.long_ptr psnp->char_ptr psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->long_ptr psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr} {psnp->ptrs.0.next.ptrs psnp->ptrs.0.next.next.ptrs psnp->ptrs psnp->ptrs.0.ptrs}}
-
-##### #####
-# #
-# Display tests #
-# #
-##### #####
-
-delete_all_variables
-
-# Test: c_variable-6.1
-# Desc: create variable bar
-gdbtk_test c_variable-6.1 {create variable bar} {
- create_variable bar
-} {0}
-
-# Test: c_variable-6.2
-# Desc: type of variable bar
-gdbtk_test c_variable-6.2 {type of variable bar} {
- $var(bar) type
-} {int}
-
-# Test: c_variable-6.3
-# Desc: format of variable bar
-gdbtk_test c_variable-6.3 {format of variable bar} {
- $var(bar) format
-} {natural}
-
-# Test: c_variable-6.4
-# Desc: value of variable bar
-gdbtk_test c_variable-6.4 {value of variable bar} {
- value bar d
-} {ok}
-
-# Test: c_variable-6.5
-# Desc: change format of bar to hex
-gdbtk_test c_variable-6.5 {change format of bar to hex} {
- $var(bar) format hex
- $var(bar) format
-} {hexadecimal}
-
-# Test: c_variable-6.6
-# Desc: value of bar with new format
-gdbtk_test c_variable-6.6 {value of bar with new format} {
- value bar x
-} {ok}
-
-# Test: c_variable-6.7
-# Desc: change value of bar
-gdbtk_test c_variable-6.7 {change value of bar} {
- $var(bar) value 3
- value bar x
-} {ok}
-
-# Test: c_variable-6.8
-# Desc: check new value of bar
-gdbtk_test c_variable-6.8 {change value of bar} {
- $var(bar) format decimal
- $var(bar) value
-} {3}
-
-delete_variable bar
-
-# Test: c_variable-6.11
-# Desc: create variable foo
-gdbtk_test c_variable-6.11 {create variable foo} {
- create_variable foo
-} {0}
-
-# Test: c_variable-6.12
-# Desc: type of variable foo
-gdbtk_test c_variable-6.12 {type of variable foo} {
- $var(foo) type
-} {int *}
-
-# Test: c_variable-6.13
-# Desc: format of variable foo
-gdbtk_test c_variable-6.13 {format of variable foo} {
- $var(foo) format
-} {natural}
-
-# Test: c_variable-6.14
-# Desc: value of variable foo
-gdbtk_test c_variable-6.14 {value of variable foo} {
- value foo x
-} {ok}
-
-# Test: c_variable-6.15
-# Desc: change format of var to octal
-gdbtk_test c_variable-6.15 {change format of foo to octal} {
- $var(foo) format octal
- $var(foo) format
-} {octal}
-
-# Test: c_variable-6.16
-# Desc: value of foo with new format
-gdbtk_test c_variable-6.16 {value of foo with new format} {
- value foo o
-} {ok}
-
-# Test: c_variable-6.17
-# Desc: change value of foo
-gdbtk_test c_variable-6.17 {change value of foo} {
- $var(foo) value 3
- value foo o
-} {ok}
-
-# Test: c_variable-6.18
-# Desc: check new value of foo
-gdbtk_test c_variable-6.18 {check new value of foo} {
- $var(foo) format decimal
- $var(foo) value
-} {3}
-
-delete_variable foo
-
-# Test: c_variable-6.21
-# Desc: create variable weird and children
-gdbtk_test c_variable-6.21 {create variable foo} {
- if {![create_variable weird]} {
- lsort [get_children weird]
- }
-} {char_ptr character func_ptr func_ptr_ptr func_ptr_struct int_ptr_ptr integer long_array long_int s2 u1}
-
-# Test: c_variable-6.22
-# Desc: type of weird and children
-gdbtk_test c_variable-6.22 {type of weird and children} {
- set types {}
- foreach v [lsort [array names var]] {
- lappend types [$var($v) type]
- }
-
- set types
-} {{weird_struct *} {char *} char {void (*)()} {struct _struct_decl *(*)()} {struct _struct_decl (*)()} {int **} int {long int [10]} {long int} struct union}
-
-# Test: c_variable-6.23
-# Desc: change format of weird.func_ptr and weird.func_ptr_ptr
-gdbtk_test c_variable-6.23 {change format of weird.func_ptr and weird.func_ptr_ptr} {
- $var(weird.func_ptr) format hexadecimal
- $var(weird.func_ptr_ptr) format hexadecimal
- set result {}
- lappend result [$var(weird.func_ptr) format]
- lappend result [$var(weird.func_ptr_ptr) format]
- set result
-} {hexadecimal hexadecimal}
-
-# Test: c_variable-6.24
-# Desc: format of weird and children
-gdbtk_test c_variable-6.24 {format of weird and children} {
- set formats {}
- foreach v [lsort [array names var]] {
- lappend formats [$var($v) format]
- }
-
- set formats
-} {natural natural natural hexadecimal hexadecimal natural natural natural natural natural natural natural}
-
-# 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.char_ptr.*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.b.*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} {}}
-
-delete_variable weird
-
-##### #####
-# #
-# Special Display Tests #
-# #
-##### #####
-
-# Stop in "do_special_tests"
-gdb_cmd "break do_special_tests"
-gdb_cmd "continue"
-
-# Test: c_variable-7.1
-# Desc: stop in do_special_tests
-gdbtk_test c_variable-7.1 {stop in do_special_tests} {
- lindex [gdb_loc] 1
-} {do_special_tests}
-
-# Test: c_variable-7.10
-# Desc: create union u
-gdbtk_test c_variable-7.10 {create union u} {
- create_variable u
-} {0}
-
-# Test: c_variable-7.11
-# Desc: value of u
-gdbtk_test c_variable-7.11 {value of u} {
- $var(u) value
-} {{...}}
-
-# Test: c_variable-7.12
-# Desc: type of u
-gdbtk_test c_variable-7.12 {type of u} {
- $var(u) type
-} {union named_union}
-
-# Test: c_variable-7.13
-# Desc: is u editable
-gdbtk_test c_variable-7.13 {is u editable} {
- $var(u) editable
-} {0}
-
-# Test: c_variable-7.14
-# Desc: number of children of u
-gdbtk_test c_variable-7.14 {number of children of u} {
- $var(u) numChildren
-} {2}
-
-# Test: c_variable-7.15
-# Desc: children of u
-gdbtk_test c_variable-7.15 {children of u} {
- get_children u
-} {integer char_ptr}
-
-# Test: c_variable-7.20
-# Desc: create anonu
-gdbtk_test c_variable-7.20 {create anonu} {
- create_variable anonu
-} {0}
-
-# Test: c_variable-7.21
-# Desc: value of anonu
-gdbtk_test c_variable-7.21 {value of anonu} {
- $var(anonu) value
-} {{...}}
-
-# Test: c_variable-7.22
-# Desc: type of anonu
-gdbtk_test c_variable-7.22 {type of anonu} {
- $var(anonu) type
-} {union}
-
-# Test: c_variable-7.23
-# Desc: is anonu editable
-gdbtk_test c_variable-7.23 {is anonu editable} {
- $var(anonu) editable
-} {0}
-
-# Test: c_variable-7.24
-# Desc: number of children of anonu
-gdbtk_test c_variable-7.24 {number of children of anonu} {
- $var(anonu) numChildren
-} {3}
-
-# Test: c_variable-7.25
-# Desc: children of anonu
-gdbtk_test c_variable-7.25 {children of anonu} {
- get_children anonu
-} {a b c}
-
-# Test: c_variable-7.30
-# Desc: create struct s
-gdbtk_test c_variable-7.30 {create struct s} {
- create_variable s
-} {0}
-
-# Test: c_variable-7.31
-# Desc: value of s
-gdbtk_test c_variable-7.31 {value of s} {
- $var(s) value
-} {{...}}
-
-# Test: c_variable-7.32
-# Desc: type of s
-gdbtk_test c_variable-7.32 {type of s} {
- $var(s) type
-} {struct _simple_struct}
-
-# Test: c_variable-7.33
-# Desc: is s editable
-gdbtk_test c_variable-7.33 {is s editable} {
- $var(s) editable
-} {0}
-
-# Test: c_variable-7.34
-# Desc: number of children of s
-gdbtk_test c_variable-7.34 {number of children of s} {
- $var(s) numChildren
-} {6}
-
-# Test: c_variable-7.35
-# Desc: children of s
-gdbtk_test c_variable-7.35 {children of s} {
- get_children s
-} {integer unsigned_integer character signed_character char_ptr array_of_10}
-
-# Test: c_variable-7.40
-# Desc: create anons
-gdbtk_test c_variable-7.40 {create anons} {
- create_variable anons
-} {0}
-
-# Test: c_variable-7.41
-# Desc: value of anons
-gdbtk_test c_variable-7.41 {value of anons} {
- $var(anons) value
-} {{...}}
-
-# Test: c_variable-7.42
-# Desc: type of anons
-gdbtk_test c_variable-7.42 {type of anons} {
- $var(anons) type
-} {struct}
-
-# Test: c_variable-7.43
-# Desc: is anons editable
-gdbtk_test c_variable-7.43 {is anons editable} {
- $var(anons) editable
-} {0}
-
-# Test: c_variable-7.44
-# Desc: number of children of anons
-gdbtk_test c_variable-7.44 {number of children of anons} {
- $var(anons) numChildren
-} {3}
-
-# Test: c_variable-7.45
-# Desc: children of anons
-gdbtk_test c_variable-7.45 {children of anons} {
- get_children anons
-} {a b c}
-
-# Test: c_variable-7.50
-# Desc: create enum e
-gdbtk_test c_variable-7.50 {create enum e} {
- create_variable e
-} {0}
-
-# Test: c_variable-7.51
-# Desc: value of e
-gdbtk_test c_variable-7.51 {value of e} {
- $var(e) value bar
- $var(e) value
-} {bar}
-
-# Test: c_variable-7.52
-# Desc: type of e
-gdbtk_test c_variable-7.52 {type of e} {
- $var(e) type
-} {enum foo}
-
-# Test: c_variable-7.53
-# Desc: is e editable
-gdbtk_test c_variable-7.53 {is e editable} {
- $var(e) editable
-} {1}
-
-# Test: c_variable-7.54
-# Desc: number of children of e
-gdbtk_test c_variable-7.54 {number of children of e} {
- $var(e) numChildren
-} {0}
-
-# Test: c_variable-7.55
-# Desc: children of e
-gdbtk_test c_variable-7.55 {children of e} {
- get_children e
-} {}
-
-# Test: c_variable-7.60
-# Desc: create anone
-gdbtk_test c_variable-7.60 {create anone} {
- create_variable anone
-} {0}
-
-# Test: c_variable-7.61
-# Desc: value of anone
-gdbtk_test c_variable-7.61 {value of e} {
- $var(e) value bar
- $var(e) value
-} {bar}
-
-# Test: c_variable-7.62
-# Desc: type of e
-gdbtk_test c_variable-7.62 {type of e} {
- $var(e) type
-} {enum foo}
-
-# Test: c_variable-7.63
-# Desc: is e editable
-gdbtk_test c_variable-7.63 {is e editable} {
- $var(e) editable
-} {1}
-
-# Test: c_variable-7.64
-# Desc: number of children of e
-gdbtk_test c_variable-7.64 {number of children of e} {
- $var(e) numChildren
-} {0}
-
-# Test: c_variable-7.65
-# Desc: children of e
-gdbtk_test c_variable-7.65 {children of e} {
- get_children e
-} {}
-
-# Test: c_variable-7.70
-# Desc: create anone
-gdbtk_test c_variable-7.70 {try to create anone again (duplicate obj name} {
- create_variable anone
-} {1}
-
-# Test: c_variable-7.71
-# Desc: value of anone
-gdbtk_test c_variable-7.71 {value of anone} {
- $var(anone) value A
- $var(anone) value
-} {A}
-
-# Test: c_variable-7.72
-# Desc: type of anone
-gdbtk_test c_variable-7.72 {type of anone} {
- $var(anone) type
-} {enum}
-
-# Test: c_variable-7.73
-# Desc: is anone editable
-gdbtk_test c_variable-7.73 {is anone editable} {
- $var(anone) editable
-} {1}
-
-# Test: c_variable-7.74
-# Desc: number of children of anone
-gdbtk_test c_variable-7.74 {number of children of anone} {
- $var(anone) numChildren
-} {0}
-
-# Test: c_variable-7.75
-# Desc: children of anone
-gdbtk_test c_variable-7.75 {children of anone} {
- get_children anone
-} {}
-
-# Record fp
-set fp [gdb_cmd "output/x \$fp"]
-gdb_cmd {break incr_a}
-gdb_cmd {continue}
-
-# Test: c_variable-7.80
-# Desc: stop in incr_a
-gdbtk_test c_variable-7.80 {stop in incr_a} {
- lindex [gdb_loc] 1
-} {incr_a}
-
-# Test: c_variable-7.81
-# Desc: Create variables in different scopes
-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}
-
-# Exit
-#
-gdbtk_test_done
diff --git a/gdb/testsuite/gdb.gdbtk/configure b/gdb/testsuite/gdb.gdbtk/configure
deleted file mode 100644
index f6964b2b777..00000000000
--- a/gdb/testsuite/gdb.gdbtk/configure
+++ /dev/null
@@ -1,1010 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-sitefile=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-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'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=defs
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
- fi
-else
- CONFIG_SITE="$sitefile"
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-CC=${CC-cc}
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:586: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:607: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:625: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:649: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 654 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:682: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 687 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:713: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@EXEEXT@%$EXEEXT%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/gdb/testsuite/gdb.gdbtk/configure.in b/gdb/testsuite/gdb.gdbtk/configure.in
deleted file mode 100644
index 5ab12edbf15..00000000000
--- a/gdb/testsuite/gdb.gdbtk/configure.in
+++ /dev/null
@@ -1,18 +0,0 @@
-dnl Process this file file with autoconf to produce a configure script.
-dnl This file is a shell script fragment that supplies the information
-dnl necessary to tailor a template configure script into the configure
-dnl script appropriate for this directory. For more information, check
-dnl any existing configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(defs)
-
-CC=${CC-cc}
-AC_SUBST(CC)
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
-AC_CANONICAL_SYSTEM
-
-dnl Check for exe extension set on certain hosts (e.g. Win32)
-AC_EXEEXT
-
-AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.gdbtk/console.exp b/gdb/testsuite/gdb.gdbtk/console.exp
deleted file mode 100644
index bb378a957a8..00000000000
--- a/gdb/testsuite/gdb.gdbtk/console.exp
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1998, 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) 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.
-
-load_lib insight-support.exp
-
-if {[gdbtk_initialize_display]} {
- if {$tracelevel} {
- strace $tracelevel
- }
-
- #
- # test console window
- #
- set prms_id 0
- set bug_id 0
-
- set testfile "simple"
- set srcfile ${testfile}.c
- set binfile ${objdir}/${subdir}/${testfile}
- set r [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}]
- if { $r != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so some tests in this file will automatically fail."
- }
-
- # Start with a fresh gdbtk
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir console.test]]
- set results [split $results \n]
-
- # Analyze results
- gdbtk_done $results
-}
diff --git a/gdb/testsuite/gdb.gdbtk/console.test b/gdb/testsuite/gdb.gdbtk/console.test
deleted file mode 100644
index 41e79465cd2..00000000000
--- a/gdb/testsuite/gdb.gdbtk/console.test
+++ /dev/null
@@ -1,491 +0,0 @@
-# Copyright (C) 1998, 1999, 2002 Red Hat, 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 was written by Keith Seitz (keiths@cygnus.com)
-
-# Read in the standard defs file
-
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir test_ran
-global console text
-set console [ManagedWin::open Console]
-set text [$console test set _twin]
-
-##### #####
-# #
-# Helper functions for this module #
-# #
-##### #####
-
-# console_command --
-# Invoke STRING as a command in the console window and
-# return the result
-proc console_command {string} {
- global console text
-
- # Save current position
- set line [lindex [split [$text index cmdmark] .] 0]
- incr line 1
-
- # Insert and invoke command
- $text insert end $string
- $console invoke
- update
-
- # Get the result
- set end [lindex [split [$text index cmdmark] .] 0]
- incr end -1
- return [$text get $line.0 [list $end.0 lineend]]
-}
-
-# get_cmd_line --
-# Return the command line
-proc get_cmd_line {} {
- global text
-
- update
- set index [$text index cmdmark]
- return [$text get [list $index linestart] [list $index lineend]]
-}
-
-# clear_command_line --
-# Clear the command line
-proc clear_command_line {} {
- global text
- $text delete {cmdmark + 1 char} insert
-}
-
-##### #####
-# #
-# CONSOLE TESTS #
-# #
-##### #####
-
-#
-# Miscellaneous tests
-#
-
-# Test: console-misc-1
-# Desc: Change console prompt
-gdbtk_test console-misc-1 {change console prompt} {
- # Insert the "set prompt" command into the text widget
- console_command {set prompt (test) }
-
- $text get {cmdmark linestart} {cmdmark lineend}
-} {(test) }
-if {$test_ran} {
- console_command {set prompt (gdb) }
-}
-
-#
-# Paste tests
-#
-
-# Test: console-paste-1
-# Desc: Paste the X selection into console window
-gdbtk_test console-paste-1 {paste X text} {
- # This is cheesy, but it works... Create a text widget
- # which holds the current selection...
- text .test_text
- .test_text insert end "this is some pasted text"
- .test_text tag add sel 1.0 {1.0 lineend}
- event generate .test_text <<Copy>>
- event generate $text <<Paste>>
- get_cmd_line
-} {(gdb) this is some pasted text}
-if {$test_ran} {
- destroy .test_text
- clear_command_line
-}
-
-#
-# Test for errors
-#
-
-# Test: console-error-1
-# Desc: Check if console window reports internal gdb errors
-gdbtk_test console-error-1 {invoke unknown command} {
- console_command {this_command_doesn't_exist}
-} {Error: Undefined command: "this". Try "help".
-}
-
-#
-# History tests
-#
-
-# Test: console-history-1.1
-# Desc: Exercise the up-history functionality
-gdbtk_test console-history-1.1 {up history once} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- get_cmd_line
-} {(gdb) help si}
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-1.2
-# Desc: Exercise the up-history functionality
-gdbtk_test console-history-1.2 {up history twice} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
- # this doesn't seem to work reliably: event generate $text <Up>
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- $console test _previous
- get_cmd_line
-} {(gdb) help quit}
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-1.3
-# Desc: Exercise the up-history functionality
-gdbtk_test console-history-1.3 {up history four times} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
-
- for {set i 0} {$i < 4} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- }
- get_cmd_line
-} {(gdb) show remotedevice}
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-1.4
-# Desc: Exercise the up-history functionality
-gdbtk_test console-history-1.4 {up fourteen times} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
- for {set i 0} {$i < 14} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- }
- get_cmd_line
-} {(gdb) show annotate}
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-1.5
-# Desc: Exercise the up-history search functionality
-gdbtk_test console-history-1.5 {up search} {
- # Add some commands into the command buffer
- console_command {show height}
- console_command {show annotate}
- console_command {show complaints}
- console_command {print main}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
-
- $text insert end "sh"
- # this doesn't seem to work reliably: event generate $text <Shift-Up>
- # this doesn't seem to work reliably: event generate $text <Shift-Up>
- # this doesn't seem to work reliably: event generate $text <Shift-Up>
- $console test _search_history
- $console test _search_history
- $console test _search_history
- get_cmd_line
-} {(gdb) show annotate}
-
-
-# Test: console-history-1.6
-# Desc: Exercise the down-history search functionality
-gdbtk_test console-history-1.6 {down search} {
- # this doesn't seem to work reliably: event generate $text <Shift-Down>
- # this doesn't seem to work reliably: event generate $text <Shift-Down>
- $console test _rsearch_history
- $console test _rsearch_history
- get_cmd_line
-} {(gdb) show remotelogbase}
-
-# Test: console-history-1.7
-# Desc: Down-history search to bottom
-# We go back down until the original partialcommand is displayed
-gdbtk_test console-history-1.7 {down search to bottom} {
- # this doesn't seem to work reliably: event generate $text <Shift-Down>
- # this doesn't seem to work reliably: event generate $text <Shift-Down>
- $console test _rsearch_history
- $console test _rsearch_history
- get_cmd_line
-} {(gdb) sh}
-
-# Test: console-history-1.8
-# Desc: Up-history search to top
-# We go up until there are no matches
-gdbtk_test console-history-1.8 {up search to top} {
- for {set i 0} {$i < 100} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Shift-Up>
- $console test _search_history
- }
- get_cmd_line
-} {(gdb) show annotate}
-
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-2.1
-# Desc: Exercise the down-history functionality
-gdbtk_test console-history-2.1 {down once} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
-
- for {set i 0} {$i < 14} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- }
- # this doesn't seem to work reliably: event generate $text <Down>
- $console test _next
- get_cmd_line
-} {(gdb) show complaints}
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-2.2
-# Desc: Exercise the down-history functionality
-gdbtk_test console-history-2.2 {down twice} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
-
- for {set i 0} {$i < 14} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- }
-
- # this doesn't seem to work reliably: event generate $text <Down>
- # this doesn't seem to work reliably: event generate $text <Down>
- $console test _next
- $console test _next
- get_cmd_line
-} {(gdb) show confirm}
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-2.3
-# Desc: Exercise the down-history functionality
-gdbtk_test console-history-2.3 {down four times} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
-
- for {set i 0} {$i < 14} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- }
-
- for {set i 0} {$i < 4} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Down>
- $console test _next
- }
- get_cmd_line
-} {(gdb) show language}
-if {$test_ran} {
- clear_command_line
-}
-
-# Test: console-history-2.4
-# Desc: Exercise the down-history functionality
-gdbtk_test console-history-2.4 {down infinitely} {
- # Add some commands into the command buffer
- console_command {show annotate}
- console_command {show complaints}
- console_command {show confirm}
- console_command {show height}
- console_command {show language}
- console_command {show print demangle}
- console_command {show remotebaud}
- console_command {show remotebreak}
- console_command {show remotecache}
- console_command {show remotedebug}
- console_command {show remotedevice}
- console_command {show remotelogbase}
- console_command {help quit}
- console_command {help si}
- for {set i 0} {$i < 14} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Up>
- $console test _previous
- }
-
- for {set i 0} {$i < 20} {incr i} {
- # this doesn't seem to work reliably: event generate $text <Down>
- $console test _next
- }
- get_cmd_line
-} {(gdb) }
-if {$test_ran} {
- clear_command_line
-}
-
-#
-# gdb - gdbtk Interface Tests
-#
-
-# Test: console-interface-1.1
-# Desc: Verify that a "file" command in the console window causes
-# gdb to invoke the pre-/post-add-symbol hooks
-set file_loaded 0
-gdbtk_test console-interface-1.1 {file command goes through hooks} {
- global TEST1_RESULT TEST2_RESULT
-
- # This is really ugly, but its the only way to do this...
- rename gdbtk_tcl_pre_add_symbol pre_add
- rename gdbtk_tcl_post_add_symbol post_add
-
- proc gdbtk_tcl_pre_add_symbol {file} {
- global TEST1_RESULT
-
- set TEST1_RESULT $file
- pre_add $file
- }
- proc gdbtk_tcl_post_add_symbol {} {
- global TEST2_RESULT
-
- set TEST2_RESULT ok
- post_add
- }
-
- # load a file and make sure we went through the pre/post_add_symbol hooks
- set TEST1_RESULT {}
- set TEST2_RESULT {}
- set file [file join $objdir simple]
- console_command "file $file"
- if {$TEST1_RESULT != $file} {
- set result "did not go through gdbtk_tcl_pre_add_symbol ($TEST1_RESULT)"
- } elseif {$TEST2_RESULT != "ok"} {
- set result "did not go through gdbtk_tcl_post_add_symbol"
- } else {
- set result {}
- set file_loaded 1
- }
-
- set result
-} {}
-if {$test_ran} {
- rename gdbtk_tcl_pre_add_symbol {}
- rename gdbtk_tcl_post_add_symbol {}
- rename pre_add gdbtk_tcl_pre_add_symbol
- rename post_add gdbtk_tcl_post_add_symbol
-}
-
-#
-# Exit
-#
-gdbtk_test_done
diff --git a/gdb/testsuite/gdb.gdbtk/cpp_variable.cc b/gdb/testsuite/gdb.gdbtk/cpp_variable.cc
deleted file mode 100644
index deecc295a7f..00000000000
--- a/gdb/testsuite/gdb.gdbtk/cpp_variable.cc
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "cpp_variable.h"
-
-static void do_simple_class_tests (void);
-
-int
-VB::fvb_pub () {return 300 + vb_pub_int;}
-
-int
-VB::vvb_pub () {return 400 + vb_pub_int;}
-
-int
-V::f () {return 600 + v_pub_int;}
-
-int
-V::vv () {return 400 + v_pub_int;}
-
-int
-VC::fvc () {return 300 + vc_pub_int;}
-
-int
-VC::vfvc () {return 100 + vc_pub_int;}
-
-main ()
-{
- do_simple_class_tests ();
-}
-
-static void
-do_simple_class_tests (void)
-{
- V *v = new V;
- V vv;
-}
diff --git a/gdb/testsuite/gdb.gdbtk/cpp_variable.exp b/gdb/testsuite/gdb.gdbtk/cpp_variable.exp
deleted file mode 100644
index 7221e8c5cde..00000000000
--- a/gdb/testsuite/gdb.gdbtk/cpp_variable.exp
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) 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.
-
-load_lib insight-support.exp
-
-if {[gdbtk_initialize_display]} {
- if {$tracelevel} {
- strace $tracelevel
- }
-
- set results {}
- if {[skip_cplus_tests]} {
- # Target doesn't have c++ support
- verbose "No C++ support -- skipping test"
- } else {
- #
- # test variable API
- #
- set prms_id 0
- set bug_id 0
-
- set testfile "cpp_variable"
- set srcfile ${testfile}.cc
- set binfile ${objdir}/${subdir}/${testfile}
- set r [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}]
- if { $r != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so some tests in this file will automatically fail."
- }
-
- # Start with a fresh gdbtk
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir ${testfile}.test]]
- set results [split $results \n]
- }
-
- # Analyze results
- gdbtk_done $results
-}
diff --git a/gdb/testsuite/gdb.gdbtk/cpp_variable.h b/gdb/testsuite/gdb.gdbtk/cpp_variable.h
deleted file mode 100644
index 40fda99a4dd..00000000000
--- a/gdb/testsuite/gdb.gdbtk/cpp_variable.h
+++ /dev/null
@@ -1,54 +0,0 @@
-struct _foo
-{
- int a[10];
- char *p;
-};
-
-class VA
-{
- public:
- int va_pub_int;
- char *va_pub_charp;
-
- private:
- int va_priv_int;
- char *va_priv_charp;
-
- protected:
- struct _foo bar;
-};
-
-class VB
-{
- public:
- int vb_pub_int;
-
- int fvb_pub ();
- virtual int vvb_pub ();
-
- private:
- int vb_priv_int;
- char *vb_priv_charp;
-};
-
-class VC
-{
- public:
- int vc_pub_int;
-
- int fvc ();
- virtual int vfvc ();
-};
-
-class V : public VA, public VB, public VC
-{
- public:
- int f ();
- virtual int vv ();
- int v_pub_int;
- char *v_pub_charp;
-
- private:
- int v_priv_int;
- char *v_priv_charp;
-};
diff --git a/gdb/testsuite/gdb.gdbtk/cpp_variable.test b/gdb/testsuite/gdb.gdbtk/cpp_variable.test
deleted file mode 100644
index 9f2af787173..00000000000
--- a/gdb/testsuite/gdb.gdbtk/cpp_variable.test
+++ /dev/null
@@ -1,588 +0,0 @@
-# Copyright (C) 1998 Cygnus Solutions
-#
-# 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 was written by Keith Seitz (keiths@cygnus.com)
-
-# Read in the standard defs file
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir test_ran
-
-# Load in a file
-set program [file join $objdir cpp_variable]
-if {[catch {gdbtk_test_file $program} t]} {
- # This isn't a test case, since if this fails, we're hosed.
- gdbtk_test_error "loading \"$program\": $t"
-}
-
-# The variables that are created are stored in an array called "var".
-
-# proc to tell us which of the variables are changed/out of scope
-# FIXME: ALWAYS returning out={}!
-proc check_update {} {
- global var
-
- set out {}
- set changed {}
- foreach ind [array names var] {
- set changed [concat $changed [$var($ind) update]]
- }
-
- return [list $changed $out]
-}
-
-# proc to create a variable
-proc create_variable {expr} {
- global var
-
- set err [catch {gdb_variable create "$expr" -expr $expr} v]
- if {!$err} {
- set var($expr) $v
- }
-
- return $err
-}
-
-# proc to get the children
-# Children are stored in the global "var" as
-# PARENT.child. So for struct _foo {int a; int b} bar;,
-# the children returned are {a b} and var(bar.a) and var(bar.b)
-# map the actual objects to their names.
-proc get_children {parent} {
- global var
-
- set kiddies [$var($parent) children]
- set children {}
- foreach child $kiddies {
- set name [lindex [split $child .] end]
- lappend children $name
- set var($parent.$name) $child
- }
-
- return $children
-}
-
-proc delete_variable {varname} {
- global var
-
- if {[info exists var($varname)]} {
- # This has to be caught, since deleting a parent
- # will erase all children.
- $var($varname) delete
- set vars [array names var $varname*]
- foreach v $vars {
- if {[info exists var($v)]} {
- unset var($v)
- }
- }
- }
-}
-
-# Compare the values of variable V in format FMT with value of OBJ
-# with gdb's value.
-proc cppvalue {obj v fmt} {
- global var
- global _test
-
- puts $_test(logfile) "obj=$obj v=$v fmt=$fmt"
- puts $_test(logfile) "var(\$obj)=$var($obj)"
-
- set value [$var($obj) value]
- set gdb [gdb_cmd "output/$fmt $v"]
- puts $_test(logfile) "output/$fmt $v"
- if {$value == $gdb} {
- puts $_test(logfile) "gdbtk: $value == gdb: $gdb"
- set result ok
- } else {
- set result $v
- puts $_test(logfile) "gdbtk: $value <> gdb: $gdb"
- }
-
- return $result
-}
-
-proc delete_all_variables {} {
- global var
-
- foreach variable [array names var] {
- delete_variable $variable
- }
-}
-
-##### #####
-# #
-# Simple Class Tests #
-# #
-##### #####
-
-# run to "do_simple_class_tests"
-gdb_cmd "break do_simple_class_tests"
-gdbtk_test_run
-
-# Test: cpp_variable-1.1
-# Desc: stopped in do_simple_class_tests
-gdbtk_test cpp_variable-1.1 {stopped in do_simple_class_tests} {
- # G++ can output "do_simple_class_tests(void)". Strip the "(void)" part.
- set loc [lindex [gdb_loc] 1]
- set index [string first \( $loc]
- if {$index > 0} {
- set loc [string range $loc 0 [expr {$index-1}]]
- }
- set loc
-} {do_simple_class_tests}
-
-# Test: cpp_variable-1.2
-# Desc: create variable v
-gdbtk_test cpp_variable-1.2 {create variable v} {
- create_variable v
-} {0}
-
-# Test: cpp_variable-1.3
-# Desc: number of children of v
-gdbtk_test cpp_variable-1.3 {number of children of v} {
- $var(v) numChildren
-} {5}
-
-# Test: cpp_variable-1.4a
-# Desc: children of v
-gdbtk_test cpp_variable-1.4a {children of v} {
- get_children v
-} {VA VB VC public private}
-
-# Test: cpp_variable-1.4b
-# Desc: public children of v
-gdbtk_test cpp_variable-1.4b {public children of v} {
- get_children v.public
-} {v_pub_int v_pub_charp}
-
-# Test: cpp_variable-1.4c
-# Desc: private children of v
-gdbtk_test cpp_variable-1.4c {private children of v} {
- get_children v.private
-} {v_priv_int v_priv_charp}
-
-# Test: cpp_variable-1.5
-# Desc: type of v
-gdbtk_test cpp_variable-1.5 {type of v} {
- $var(v) type
-} {V *}
-
-# Test: cpp_variable-1.6
-# Desc: format of v
-gdbtk_test cpp_variable-1.6 {format of v} {
- $var(v) format
-} {natural}
-
-set value {}
-catch {$var(v) value} value
-
-# Test: cpp_variable-1.6a
-# Desc: Step over "V *v = new V;"
-gdbtk_test cpp_variable-1.6a {step over "V *v = new V;"} {
- catch {gdb_cmd "next"}
-} {0}
-
-# Test: cpp_variable-1.7
-# Desc: check value of v changed
-gdbtk_test cpp_variable-1.7 {check value of v changed} {
- set changes [check_update]
-
- # It is undefined whether the children will change values
- # or not, so ignore them.
- expr {[lsearch [lindex $changes 0] v] != -1}
-} {1}
-
-# Test: cpp_variable-1.8
-# Desc: check values of v
-gdbtk_test cpp_variable-1.8 {check values of v} {
- set new [$var(v) value]
- expr {$new != $value}
-} {1}
-
-# Test: cpp_variable-1.9
-# Desc: v editable
-gdbtk_test cpp_variable-1.9 {v editable} {
- $var(v) editable
-} {1}
-
-##### #####
-# #
-# Children of v tests #
-# #
-##### #####
-
-# Test: cpp_variable-2.1
-# Desc: type of v.v_pub_int
-gdbtk_test cpp_variable-2.1 {type of v.v_pub_int} {
- $var(v.public.v_pub_int) type
-} {int}
-
-# Test: cpp_variable-2.2
-# Desc: format of v.v_pub_int
-gdbtk_test cpp_variable-2.2 {format of v.v_pub_int} {
- $var(v.public.v_pub_int) format
-} {natural}
-
-# Test: cpp_variable-2.2a
-# Desc: set variable v->v_pub_int=2112
-gdbtk_test cpp_variable-2.2a {set variable v.v_pub_int=2112} {
- set err [catch {gdb_cmd "set variable v.v_pub_int=2112"} txt]
- if {$err} {
- set txt
- } else {
- set err
- }
-} {0}
-
-# Test: cpp_variable-2.3
-# Desc: value of v.v_pub_int changed
-gdbtk_test cpp_variable-2.3 {value of v.v_pub_int changed} {
- check_update
-} {v.public.v_pub_int {}}
-
-# Test: cpp_variable-2.4
-# Desc: value of v.v_pub_int
-gdbtk_test cpp_variable-2.4 {value of v.v_pub_int} {
- $var(v.public.v_pub_int) value
-} {2112}
-
-# Test: cpp_variable-2.5
-# Desc: changed format of v.v_pub_int
-gdbtk_test cpp_variable-2.5 {changed format of v.v_pub_int} {
- $var(v.public.v_pub_int) format octal
- $var(v.public.v_pub_int) format
-} {octal}
-
-# Test: cpp_variable-2.6
-# Desc: value of v.v_pub_int with new format
-gdbtk_test cpp_variable-2.6 {value of v.v_pub_int with new format} {
- $var(v.public.v_pub_int) value
-} {04100}
-
-# Test: cpp_variable-2.7
-# Desc: change value of v.v_pub_int (decimal)
-gdbtk_test cpp_variable-2.7 {change value of v.v_pub_int (decimal)} {
- $var(v.public.v_pub_int) value 3
- cppvalue v.public.v_pub_int v.v_pub_int o
-} {ok}
-
-# Test: cpp_variable-2.8
-# Desc: change value of v.v_pub_int (hexadecimal)
-gdbtk_test cpp_variable-2.8 {change value of v.v_pub_int (hexadecimal)} {
- $var(v.public.v_pub_int) value 0x21
- cppvalue v.public.v_pub_int v.v_pub_int o
-} {ok}
-
-# Test: cpp_variable-2.9
-# Desc: number of children of v_pub_int
-gdbtk_test cpp_variable-2.9 {number of children of v_pub_int} {
- $var(v.public.v_pub_int) numChildren
-} {0}
-
-# Test: cpp_variable-2.10
-# Desc: children of v.v_pub_int
-gdbtk_test cpp_variable-2.10 {children of v.v_pub_int} {
- get_children v.public.v_pub_int
-} {}
-
-# Test: cpp_variable-2.11
-# Desc: v.v_pub_int editable
-gdbtk_test cpp_variable-2.11 {v.v_pub_int editable} {
- $var(v.public.v_pub_int) editable
-} {1}
-
-# Test: cpp_variable-2.21
-# Desc: type of v.v_priv_charp
-gdbtk_test cpp_variable-2.21 {type of v.v_priv_charp} {
- $var(v.private.v_priv_charp) type
-} {char *}
-
-# Test: cpp_variable-2.22
-# Desc: format of v.v_priv_charp
-gdbtk_test cpp_variable-2.22 {format of v.v_priv_charp} {
- $var(v.private.v_priv_charp) format
-} {natural}
-
-# Test: cpp_variable-2.22a
-# Desc: set variable v->v_priv_charp=2112
-gdbtk_test cpp_variable-2.22a {set variable v->v_priv_charp=2112} {
- set err [catch {gdb_cmd "set variable v->v_priv_charp=2112"} txt]
- if {$err} {
- set txt
- } else {
- set err
- }
-} {0}
-
-# Test: cpp_variable-2.23
-# Desc: value of v.v_priv_charp changed
-gdbtk_test cpp_variable-2.23 {value of v.v_priv_charp changed} {
- check_update
-} {v.private.v_priv_charp {}}
-
-# Test: cpp_variable-2.24
-# Desc: value of v.v_priv_charp
-gdbtk_test cpp_variable-2.24 {value of v.v_priv_charp} {
- $var(v.private.v_priv_charp) format hexadecimal
- $var(v.private.v_priv_charp) value
-} {0x840}
-
-# Test: cpp_variable-2.25
-# Desc: changed format of v.v_priv_charp
-gdbtk_test cpp_variable-2.25 {changed format of v.v_priv_charp} {
- $var(v.private.v_priv_charp) format octal
- $var(v.private.v_priv_charp) format
-} {octal}
-
-# Test: cpp_variable-2.26
-# Desc: value of v.v_priv_charp with new format
-gdbtk_test cpp_variable-2.26 {value of v.v_priv_charp with new format} {
- $var(v.private.v_priv_charp) value
-} {04100}
-
-# Test: cpp_variable-2.27
-# Desc: change value of v.v_priv_charp (decimal)
-gdbtk_test cpp_variable-2.27 {change value of v.v_priv_charp (decimal)} {
- $var(v.private.v_priv_charp) value 3
- cppvalue v.private.v_priv_charp v.v_priv_charp o
-} {ok}
-
-# Test: cpp_variable-2.28
-# Desc: change value of v.v_priv_charp (hexadecimal)
-gdbtk_test cpp_variable-2.28 {change value of v.v_priv_charp (hexadecimal)} {
- $var(v.private.v_priv_charp) value 0x21
- cppvalue v.private.v_priv_charp v.v_priv_charp o
-} {ok}
-
-# Test: cpp_variable-2.29
-# Desc: number of children of v_priv_charp
-gdbtk_test cpp_variable-2.29 {number of children of v_priv_charp} {
- $var(v.private.v_priv_charp) numChildren
-} {1}
-
-# Test: cpp_variable-2.30
-# Desc: children of v.v_priv_charp
-gdbtk_test cpp_variable-2.30 {children of v.v_priv_charp} {
- get_children v.private.v_priv_charp
-} {*v_priv_charp}
-
-# Test: cpp_variable-2.31
-# Desc: v.v_priv_int editable
-gdbtk_test cpp_variable-2.31 {v.v_priv_int editable} {
- $var(v.private.v_priv_int) editable
-} {1}
-
-# Test: cpp_variable-2.41
-# Desc: type of v.VA
-gdbtk_test cpp_variable-2.41 {type of v.VA} {
- $var(v.VA) type
-} {VA}
-
-# Test: cpp_variable-2.42
-# Desc: format of v.VA
-gdbtk_test cpp_variable-2.42 {format of v.VA} {
- $var(v.VA) format
-} {natural}
-
-# Test: cpp_variable-2.43
-# Desc: value of v.VA changed
-gdbtk_test cpp_variable-2.43 {value of v.VA changed} {
- check_update
-} {{} {}}
-
-# Test: cpp_variable-2.44
-# Desc: value of v.VA
-gdbtk_test cpp_variable-2.44 {value of v.VA} {
- $var(v.VA) value
-} {{...}}
-
-# Test: cpp_variable-2.45
-# Desc: changed format of v.VA
-gdbtk_test cpp_variable-2.45 {changed format of v.VA} {
- $var(v.VA) format octal
- $var(v.VA) format
-} {octal}
-
-# Test: cpp_variable-2.46
-# Desc: value of v.VA with new format
-gdbtk_test cpp_variable-2.46 {value of v.VA with new format} {
- $var(v.VA) value
-} {{...}}
-
-# Test: cpp_variable-2.47
-# Desc: number of children of VA
-gdbtk_test cpp_variable-2.47 {number of children of VA} {
- $var(v.VA) numChildren
-} {3}
-
-# Test: cpp_variable-2.48a
-# Desc: children of v.VA
-gdbtk_test cpp_variable-2.48a {children of v.VA} {
- get_children v.VA
-} {public private protected}
-
-# Test: cpp_variable-2.48b
-# Desc: public children of v.VA
-gdbtk_test cpp_variable-2.48b {children of v.VA} {
- get_children v.VA.public
-} {va_pub_int va_pub_charp}
-
-# Test: cpp_variable-2.48c
-# Desc: private children of v.VA
-gdbtk_test cpp_variable-2.48c {children of v.VA} {
- get_children v.VA.private
-} {va_priv_int va_priv_charp}
-
-# Test: cpp_variable-2.48d
-# Desc: protected children of v.VA
-gdbtk_test cpp_variable-2.48d {children of v.VA} {
- get_children v.VA.protected
-} {bar}
-
-# Test: cpp_variable-2.49
-# Desc: v.VA editable
-gdbtk_test cpp_variable-2.49 {v.VA editable} {
- $var(v.VA) editable
-} {0}
-
-# Test: cpp_variable-2.61
-# Desc: type of v.VB
-gdbtk_test cpp_variable-2.61 {type of v.VB} {
- $var(v.VB) type
-} {VB}
-
-# Test: cpp_variable-2.62
-# Desc: format of v.VB
-gdbtk_test cpp_variable-2.62 {format of v.VB} {
- $var(v.VB) format
-} {natural}
-
-# Test: cpp_variable-2.63
-# Desc: value of v.VB changed
-gdbtk_test cpp_variable-2.63 {value of v.VB changed} {
- check_update
-} {{} {}}
-
-# Test: cpp_variable-2.64
- # Desc: value of v.VB
-gdbtk_test cpp_variable-2.64 {value of v.VB} {
- $var(v.VB) value
-} {{...}}
-
-# Test: cpp_variable-2.65
-# Desc: changed format of v.VB
-gdbtk_test cpp_variable-2.65 {changed format of v.VB} {
- $var(v.VB) format octal
- $var(v.VB) format
-} {octal}
-
-# Test: cpp_variable-2.66
-# Desc: value of v.VB with new format
-gdbtk_test cpp_variable-2.66 {value of v.VB with new format} {
- $var(v.VB) value
-} {{...}}
-
-# Note: The next two tests show whether or not the logic
-# concerning vptr tables is working.
-# Test: cpp_variable-2.67
-# Desc: number of children of VB
-gdbtk_test cpp_variable-2.67 {number of children of VB} {
- $var(v.VB) numChildren
-} {2}
-
-# Test: cpp_variable-2.68a
-# Desc: children of v.VB
-gdbtk_test cpp_variable-2.68a {children of v.VB} {
- get_children v.VB
-} {public private}
-
-# Test: cpp_variable-2.68b
-# Desc: public children of v.VB
-gdbtk_test cpp_variable-2.68b {children of v.VB} {
- get_children v.VB.public
-} {vb_pub_int}
-
-# Test: cpp_variable-2.68c
-# Desc: private children of v.VB
-gdbtk_test cpp_variable-2.68c {children of v.VB} {
- get_children v.VB.private
-} {vb_priv_int vb_priv_charp}
-
-# Test: cpp_variable-2.69
-# Desc: v.VB editable
-gdbtk_test cpp_variable-2.69 {v.VB editable} {
- $var(v.VB) editable
-} {0}
-
-# Test: cpp_variable-2.70
-# Desc: v.VB.public editable
-gdbtk_test cpp_variable-2.70 {v.VB.public editable} {
- $var(v.VB.public) editable
-} {0}
-
-# Test: cpp_variable-2.71
-# Desc: v.VB.vb_pub_int editable
-gdbtk_test cpp_variable-2.71 {v.VB.vb_pub_int editable} {
- $var(v.VB.public.vb_pub_int) editable
-} {1}
-
-# Test: cpp_variable-2.71a
-# Desc: set variable v->vb_pub_int=2112
-gdbtk_test cpp_variable-2.71a {set variable v->v_pub_int=2112} {
- set err [catch {gdb_cmd "set variable v->vb_pub_int=2112"} txt]
- if {$err} {
- set txt
- } else {
- set err
- }
-} {0}
-
-# Test: cpp_variable-2.72
-# Desc: value of v.vb_pub_int changed
-gdbtk_test cpp_variable-2.72 {value of v.vb_pub_int changed} {
- check_update
-} {v.VB.public.vb_pub_int {}}
-
-# Test: cpp_variable-2.73
-# Desc: value of v.VB.vb_pub_int
-gdbtk_test cpp_variable-2.73 {changed value of v.vb_pub_int} {
- $var(v.VB.public.vb_pub_int) value
-} {2112}
-
-# Test: cpp_variable-2.74
-# Desc: change value of v.VB.vb_pub_int
-gdbtk_test cpp_variable-2.74 {change value of v.VB.public.vb_pub_int} {
- $var(v.VB.public.vb_pub_int) value 3
- cppvalue v.VB.public.vb_pub_int v.vb_pub_int d
-} {ok}
-
-# Test: cpp_variable-2.75
-# Desc: value of v.VB.vb_pub_int
-gdbtk_test cpp_variable-2.75 {changed value of v.VB.public.vb_pub_int} {
- $var(v.VB.public.vb_pub_int) value
-} {3}
-
-
-# Exit
-#
-gdbtk_test_done
-
-
diff --git a/gdb/testsuite/gdb.gdbtk/defs b/gdb/testsuite/gdb.gdbtk/defs
deleted file mode 100644
index 8e3fe5b4531..00000000000
--- a/gdb/testsuite/gdb.gdbtk/defs
+++ /dev/null
@@ -1,306 +0,0 @@
-# This file contains support code for the gdbtk test suite.
-# Copyright 2001 Red Hat, Inc.
-#
-# Based on the Tcl testsuite support code, portions of this file
-# are Copyright (c) 1990-1994 The Regents of the University of California and
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
-#
-global _test env srcdir objdir
-
-if {![info exists srcdir]} {
- if {[info exists env(SRCDIR)]} {
- set srcdir $env(SRCDIR)
- } else {
- set srcdir .
- }
-}
-
-if {![info exists objdir]} {
- if {[info exists env(OBJDIR)]} {
- set objdir $env(OBJDIR)
- } elseif {$_test(interactive)} {
- # If running interactively, assume that the objdir is
- # relative to the executable's location
- set objdir [file join [file dirname [info nameofexecutable]] testsuite gdb.gdbtk]
- } else {
- set objdir .
- }
-}
-
-if {![info exists _test(verbose)]} {
- if {[info exists env(GDBTK_VERBOSE)]} {
- set _test(verbose) $env(GDBTK_VERBOSE)
- } else {
- set _test(verbose) 0
- }
-}
-if {![info exists _test(tests)]} {
-
- if {[info exists env(GDBTK_TESTS)]} {
- set _test(tests) $env(GDBTK_TESTS)
- } else {
- set _test(tests) {}
- }
-}
-
-if {[info exists env(GDBTK_LOGFILE)]} {
- set _test(logfile) [open $env(GDBTK_LOGFILE) a+]
- fconfigure $_test(logfile) -buffering none
-} else {
- set _test(logfile) {}
-}
-
-# Informs gdbtk internals that testsuite is running. An example
-# where this is needed is the window manager, which must place
-# all windows at some place on the screen so that the system's
-# window manager does not interfere. This is reset in gdbtk_test_done.
-set env(GDBTK_TEST_RUNNING) 1
-
-# The gdb "file" command to use for gdbtk testing
-# NOTE: This proc appends ".exe" to all windows' programs
-proc gdbtk_test_file {filename} {
- global tcl_platform
-
- if {$tcl_platform(platform) == "windows"} {
- append filename ".exe"
- }
-
- set err [catch {gdb_cmd "file $filename" 1} text]
- if {$err} {
- error $text
- }
-
- return $text
-}
-
-proc gdbtk_test_run {{prog_args {}}} {
- global env
-
- # Get the target_info array from the testsuite
- array set target_info $env(TARGET_INFO)
-
- # We get the target ready by:
- # 1. Run all init commands
- # 2. Issue target command
- # 3. Issue load command
- # 4. Issue run command
- foreach cmd $target_info(init) {
- set err [catch {gdb_cmd $cmd 0} txt]
- if {$err} {
- _report_error "Target initialization command \"$cmd\" failed: $txt"
- return 0
- }
- }
-
- if {$target_info(target) != ""} {
- set err [catch {gdb_cmd $target_info(target) 0} txt]
- if {$err} {
- _report_error "Failed to connect to target: $txt"
- return 0
- }
- }
-
- if {$target_info(load) != ""} {
- set err [catch {gdb_cmd $target_info(load) 0} txt]
- if {$err} {
- _report_error "Failed to load: $txt"
- return 0
- }
- }
-
- if {$target_info(run) != ""} {
- set err [catch {gdb_cmd $target_info(run) 0} txt]
- if {$err} {
- _report_error "Could not run target with \"$target_info(run)\": $txt"
- return 0
- }
- }
-
- return 1
-}
-
-proc _report_error {msg} {
- global _test
-
- if {[info exists _test(interactive)] && $_test(interactive)} {
- # Dialog
- tk_messageBox -message $msg -icon error -type ok
- } else {
- # to stderr
- puts stderr $msg
- }
-}
-
-proc gdbtk_print_verbose {status name description script code answer} {
- global _test
-
- switch $code {
- 0 {
- set code_words {}
- }
- 1 {
- set code_words "Test generated error: $answer"
- }
-
- 2 {
- set code_words "Test generated return exception; result was: $answer"
- }
-
- 3 {
- set code_words "Test generated break exception"
- }
-
- 4 {
- set code_words "Test generated continue exception"
- }
-
- 5 {
- set code_words "Test generated exception $code; message was:$answer"
- }
- }
-
- if {$_test(verbose) > 1 \
- || ($_test(verbose) != 1 && ($status == "ERROR" || $status == "FAIL"))} {
- # Printed when user verbose mode (verbose > 1) or an error/failure occurs
- # not running the testsuite (dejagnu)
- puts stdout "\n"
- puts stdout "==== $name $description"
- puts stdout "==== Contents of test case:"
- puts stdout "$script"
- if {$code_words != ""} {
- puts stdout $code_words
- }
- puts stdout "==== Result was:"
- puts stdout "$answer"
- } elseif {$_test(verbose)} {
- # Printed for the testsuite (verbose = 1)
- puts stdout "[list $status $name $description $code_words]"
-
- if {$_test(logfile) != ""} {
- puts $_test(logfile) "\n"
- puts $_test(logfile) "==== $name $description"
- puts $_test(logfile) "==== Contents of test case:"
- puts $_test(logfile) "$script"
- if {$code_words != ""} {
- puts $_test(logfile) $code_words
- }
- puts $_test(logfile) "==== Result was:"
- puts $_test(logfile) "$answer"
- }
- }
-}
-
-# gdbtk_test
-#
-# This procedure runs a test and prints an error message if the
-# test fails.
-#
-# Arguments:
-# name - Name of test, in the form foo-1.2.
-# description - Short textual description of the test, to
-# help humans understand what it does.
-# script - Script to run to carry out the test. It must
-# return a result that can be checked for
-# correctness.
-# answer - Expected result from script.
-
-proc gdbtk_test {name description script answer} {
- global _test test_ran
-
- set test_ran 0
- if {[string compare $_test(tests) ""] != 0} then {
- set ok 0
- foreach test $_test(tests) {
- if [string match $test $name] then {
- set ok 1
- break
- }
- }
- if !$ok then return
- }
-
- set code [catch {uplevel $script} result]
- set test_ran 1
- if {$code != 0} {
- # Error
- gdbtk_print_verbose ERROR $name $description $script \
- $code $result
- } elseif {[string compare $result $answer] == 0} {
- if {[string index $name 0] == "*"} {
- # XPASS
- set HOW XPASS
- } else {
- set HOW PASS
- }
-
- if {$_test(verbose)} {
- gdbtk_print_verbose $HOW $name $description $script \
- $code $result
- if {$_test(verbose) != 1} {
- puts stdout "++++ $name ${HOW}ED"
- }
- }
- if {$_test(logfile) != ""} {
- puts $_test(logfile) "++++ $name ${HOW}ED"
- }
- } else {
- if {[string index $name 0] == "*"} {
- # XFAIL
- set HOW XFAIL
- } else {
- set HOW FAIL
- }
-
- gdbtk_print_verbose $HOW $name $description $script \
- $code $result
- if {$_test(verbose) != 1} {
- puts stdout "---- Result should have been:"
- puts stdout "$answer"
- puts stdout "---- $name ${HOW}ED"
- }
- if {$_test(logfile) != ""} {
- puts $_test(logfile) "---- Result should have been:"
- puts $_test(logfile) "$answer"
- puts $_test(logfile) "---- $name ${HOW}ED"
- }
- }
-}
-
-proc gdbtk_dotests {file args} {
- global _test
- set savedTests $_test(tests)
- set _test(tests) $args
- source $file
- set _test(tests) $savedTests
-}
-
-proc gdbtk_test_done {} {
- global _test env
-
- if {$_test(logfile) != ""} {
- close $_test(logfile)
- }
-
- set env(GDBTK_TEST_RUNNING) 0
- if {![info exists _test(interactive)] || !$_test(interactive)} {
- gdbtk_force_quit
- }
-}
-
-proc gdbtk_test_error {desc} {
- set desc [join [split $desc \n] |]
- puts "ERROR \{$desc\} \{\} \{\}"
- gdbtk_test_done
-}
-
-# Override the warning dialog. We don't want to see them.
-rename show_warning real_show_warning
-proc show_warning {msg} {
- global _test
-
- set str "INSIGHT TESTSUITE WARNING: $msg"
- puts stdout $str
- if {$_test(logfile) != ""} {
- puts $_test(logfile) $str
- }
-}
diff --git a/gdb/testsuite/gdb.gdbtk/list0.c b/gdb/testsuite/gdb.gdbtk/list0.c
deleted file mode 100644
index b50fdd4323d..00000000000
--- a/gdb/testsuite/gdb.gdbtk/list0.c
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "list0.h"
-
-int main ()
-{
- int x;
-#ifdef usestubs
- set_debug_traps();
- breakpoint();
-#endif
- x = 0;
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- foo (x++);
- return 0;
-}
-
-static void
-unused ()
-{
- /* Not used for anything */
-}
diff --git a/gdb/testsuite/gdb.gdbtk/list0.h b/gdb/testsuite/gdb.gdbtk/list0.h
deleted file mode 100644
index d46833060e5..00000000000
--- a/gdb/testsuite/gdb.gdbtk/list0.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* An include file that actually causes code to be generated in the including file. This is known to cause problems on some systems. */
-#ifdef PROTOTYPES
-extern void bar(int);
-static void foo (int x)
-#else
-static void foo (x) int x;
-#endif
-{
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
- bar (x++);
-}
diff --git a/gdb/testsuite/gdb.gdbtk/list1.c b/gdb/testsuite/gdb.gdbtk/list1.c
deleted file mode 100644
index 6094104b9cd..00000000000
--- a/gdb/testsuite/gdb.gdbtk/list1.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <stdio.h>
-
-#ifdef PROTOTYPES
-void long_line (); int oof (int);
-void bar (int x)
-#else
-void bar (x) int x;
-#endif
-{
- printf ("%d\n", x);
-
- long_line ();
-}
-
-static void
-unused ()
-{
- /* Not used for anything */
-}
-/* This routine has a very long line that will break searching in older versions of GDB. */
-#ifdef PROTOTYPES
-void
-#endif
-long_line ()
-{
- oof (67);
-
- oof (6789);
-
- oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 5 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 10 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 15 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 20 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 25 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 30 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 35 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 40 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 45 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 50 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 55 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 60 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* 65 */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (12); /* */ oof (12); oof (12); oof (12); oof (12); oof (12); oof (1234); /* 70 */
-}
-#ifdef PROTOTYPES
-int oof (int n)
-#else
-oof (n) int n;
-#endif
-{
- return n + 1;
-}
diff --git a/gdb/testsuite/gdb.gdbtk/simple.c b/gdb/testsuite/gdb.gdbtk/simple.c
deleted file mode 100644
index b35cd58851b..00000000000
--- a/gdb/testsuite/gdb.gdbtk/simple.c
+++ /dev/null
@@ -1,20 +0,0 @@
-int
-main(int argc, char * argv[])
-{
- int i;
- char *a;
- char *b = "abc";
- long foo;
-
- a = (char *) malloc (300);
-
- for (i=0; i < 50; i++)
- {
- int j = i % 3;
- int k = 3 - j;
- strncpy (a[i], b[k], j);
- foo = (long) j * k / i + 2 * k * k * k;
- }
- return 0;
-}
-
diff --git a/gdb/testsuite/gdb.gdbtk/srcwin.exp b/gdb/testsuite/gdb.gdbtk/srcwin.exp
deleted file mode 100644
index 9d548059718..00000000000
--- a/gdb/testsuite/gdb.gdbtk/srcwin.exp
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 1999, 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) 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.
-
-load_lib insight-support.exp
-
-if {[gdbtk_initialize_display]} {
- if {$tracelevel} {
- strace $tracelevel
- }
-
- #
- # test source window
- #
- set prms_id 0
- set bug_id 0
-
- set testfile "list"
- set s1 "$srcdir/$subdir/list0.c"
- set sources "$s1 $srcdir/$subdir/list1.c"
- set binfile $objdir/$subdir/$testfile
- if {[file exists $s1.save]} {
- catch {file delete $s1}
- file rename $s1.save $s1
- }
- set r [gdb_compile $sources "$binfile" executable debug]
- if { $r != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so some tests in this file will automatically fail."
- }
-
- # Start with a fresh gdbtk
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir srcwin.test]]
- set results [split $results \n]
- set all_results $results
-
- # move file with "main" out of the way
- file rename $s1 $s1.save
-
- # run slightly different set of tests
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir srcwin2.test]]
- set results [split $results \n]
- set all_results [concat $all_results $results]
-
- # restore file
- file rename $s1.save $s1
-
- set r [gdb_compile $sources "$binfile" executable ""]
- if { $r != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so some tests in this file will automatically fail."
- }
- # run slightly different set of tests
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir srcwin3.test]]
- set results [split $results \n]
- set all_results [concat $all_results $results]
-
- # Analyze results
- gdbtk_done $all_results
-}
diff --git a/gdb/testsuite/gdb.gdbtk/srcwin.test b/gdb/testsuite/gdb.gdbtk/srcwin.test
deleted file mode 100644
index f2335872c15..00000000000
--- a/gdb/testsuite/gdb.gdbtk/srcwin.test
+++ /dev/null
@@ -1,1191 +0,0 @@
-# Copyright (C) 1999, 2001 Red Hat, 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 was written by Martin Hunt (hunt@cygnus.com)
-
-# Read in the standard defs file
-
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir srcdir
-
-
-# move the pointer to the center of the bbox relative to $win
-proc move_mouse_to {win bbox} {
- if {[llength $bbox] != 4} {
- return 0
- }
- set x [expr [lindex $bbox 0] + [lindex $bbox 2] / 2]
- set y [expr [lindex $bbox 1] + [lindex $bbox 3] / 2]
- warp_pointer . [winfo rootx $win] [winfo rooty $win]
-
- set nx 0
- set ny 0
-
- while {$nx != $x || $ny != $y} {
- if {$nx < $x} {incr nx}
- if {$ny < $y} {incr ny}
- warp_pointer $win $nx $ny
- }
- return 1
-}
-
-proc click {win bbox bnum} {
- if {![move_mouse_to $win $bbox]} {
- return 0
- }
- update
-
- set x [expr [lindex $bbox 0] + [lindex $bbox 2] / 2]
- set y [expr [lindex $bbox 1] + [lindex $bbox 3] / 2]
-
- if {[catch {event generate $win <Button-$bnum> -x $x -y $y} result]} {
- return 0
- }
- if {[catch {event generate $win <ButtonRelease-$bnum> -x $x -y $y} result]} {
- return 0
- }
- return 1
-}
-
-
-##### #####
-# #
-# SECTION 1: Mode Tests #
-# #
-##### #####
-
-# Load the test executable
-set program [file join $objdir list]
-if {[catch {gdbtk_test_file $program} t]} {
- # This isn't a test case, since if this fails, we're hosed.
- gdbtk_test_error "loading \"$program\": $t"
-}
-
-set srcwin [ManagedWin::open SrcWin]
-set stw [$srcwin test_get twin]
-set twin [$stw test_get twin]
-
-# get things started
-gdb_cmd "break main"
-gdbtk_test_run
-
-# Test: srcwin-1.1
-# Desc: Check for something in source window
-gdbtk_test srcwin-1.1 "source window has contents" {
- set file1(source) [$twin get 1.0 end]
- expr {![string compare $file1(source) ""]}
-} {0}
-
-
-# Test: srcwin-1.2
-# Desc: source->assembly mode change
-gdbtk_test srcwin-1.2 "source->assembly mode change" {
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- set file1(assembly) [$twin get 1.0 end]
- expr {![string compare $file1(source) $file1(assembly)]}
-} {0}
-
-# Test: srcwin-1.3
-# Desc: assembly->mixed mode change
-gdbtk_test srcwin-1.3 "assembly->mixed mode change" {
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- set file1(mixed) [$twin get 1.0 end]
- expr {![string compare $file1(mixed) $file1(assembly)]}
-} {0}
-
-# Test: srcwin-1.4
-# Desc: mixed->src+asm mode change
-gdbtk_test srcwin-1.4 "mixed->src+asm mode change" {
- $srcwin mode "" SRC+ASM
- set twin [$stw test_get twin]
- set bwin [$stw test_get bwin]
- set s [$twin get 1.0 end]
- set a [$bwin get 1.0 end]
- list [string compare $a $file1(assembly)] [string compare $s $file1(source)] [winfo ismapped $bwin]
-} {0 0 1}
-
-# Test: srcwin-1.5
-# Desc: src+asm->source mode change
-gdbtk_test srcwin-1.5 "src+asm->source mode change" {
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- set bwin [$stw test_get bwin]
- list [string compare $file1(source) $a] [winfo ismapped $bwin]
-} {0 0}
-
-# Test: srcwin-1.6
-# Desc: source->mixed mode change
-gdbtk_test srcwin-1.6 "source->mixed mode change" {
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- string compare $file1(mixed) $a
-} {0}
-
-# Test: srcwin-1.7
-# Desc: mixed->source mode change
-gdbtk_test srcwin-1.7 "mixed->source mode change" {
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- string compare $file1(source) $a
-} {0}
-
-# Test: srcwin-1.8
-# Desc: source->src+asm mode change
-gdbtk_test srcwin-1.8 "source->src+asm mode change" {
- $srcwin mode "" SRC+ASM
- set twin [$stw test_get twin]
- set bwin [$stw test_get bwin]
- set s [$twin get 1.0 end]
- set a [$bwin get 1.0 end]
- list [string compare $a $file1(assembly)] [string compare $s $file1(source)] [winfo ismapped $bwin]
-} {0 0 1}
-
-# Test: srcwin-1.9
-# Desc: src+asm->assembly mode change
-gdbtk_test srcwin-1.9 "src+asm->assembly mode change" {
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- string compare $file1(assembly) $a
-} {0}
-
-# Test: srcwin-1.10
-# Desc: assembly->src+asm mode change
-gdbtk_test srcwin-1.10 "assembly->src+asm mode change" {
- $srcwin mode "" SRC+ASM
- set twin [$stw test_get twin]
- set bwin [$stw test_get bwin]
- set s [$twin get 1.0 end]
- set a [$bwin get 1.0 end]
- list [string compare $a $file1(assembly)] [string compare $s $file1(source)] [winfo ismapped $bwin]
-} {0 0 1}
-
-# Test: srcwin-1.11
-# Desc: src+asm->mixed mode change
-gdbtk_test srcwin-1.11 "src+asm->mixed mode change" {
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- set bwin [$stw test_get bwin]
- expr {[string compare $file1(mixed) $a] ||
- [winfo ismapped $bwin]}
-} {0}
-
-# Test: srcwin-1.12
-# Desc: mixed->assembly mode change
-gdbtk_test srcwin-1.12 "mixed->assembly mode change" {
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- string compare $file1(assembly) $a
-} {0}
-
-# Test: srcwin-1.13
-# Desc: assembly->source mode change
-gdbtk_test srcwin-1.13 "assembly->source mode change" {
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- string compare $file1(source) $a
-} {0}
-
-
-##### #####
-# #
-# SECTION 2: Basic Operations #
-# #
-##### #####
-
-# Test: srcwin-2.1
-# Desc: check contents of filename combobox
-gdbtk_test srcwin-2.1 "check contents of filename combobox" {
- set statbar [$srcwin test_get _statbar]
- set names [$statbar.name listget 0 end]
- set r 0
- foreach f {list0.c list1.c list0.h} {
- if {[lsearch $names $f] != -1} {
- incr r
- }
- }
- set r
-} {3}
-
-# Test: srcwin-2.2
-# Desc: check contents of function combobox
-gdbtk_test srcwin-2.2 "check contents of function combobox" {
- set names [$statbar.func listget 0 end]
- set r 0
- foreach f {main foo unused} {
- if {[lsearch $names $f] != -1} {
- incr r
- }
- }
- set r
-} {3}
-
-# Test: srcwin-2.3
-# Desc: goto filename
-gdbtk_test srcwin-2.3 "goto filename" {
- set func [$srcwin test_get _name 1]
- $func "" list1.c
- set twin [$stw test_get twin]
- set file2(source) [$twin get 1.0 end]
- expr {![string compare $file1(source) $file2(source)]}
-} {0}
-
-# Test: srcwin-2.4
-# Desc: check contents of function combobox
-gdbtk_test srcwin-2.4 "check contents of function combobox" {
- set names [$statbar.func listget 0 end]
- set r 0
- foreach f {bar long_line oof unused} {
- if {[lsearch $names $f] != -1} {
- incr r
- }
- }
- set r
-} {4}
-
-# Test: srcwin-2.5
-# Desc: function combobox entry field should be empty after switching to a new file
-gdbtk_test srcwin-2.5 "function combobox entry field should be empty" {
- set names [$statbar.func get]
- string length $names
-} {0}
-
-# Test: srcwin-2.6
-# Desc: goto function
-gdbtk_test srcwin-2.6 "goto function bar" {
- $srcwin goto_func "" bar
- set r 0
-
- # now get a dump of all tags and check that only one line is
- # marked BROWSE_TAG and no lines are STACK_TAG or PC_TAG.
-
- # We know that list1.c should have BROWSE_TAG set at index 5.2
- # for function "bar". If list1.c is changed or the layout of the source
- # window is changed, this must be updated.
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "10.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} { incr r 10}
- if {$v == "PC_TAG"} { incr r 100}
- }
- }
- } else {
- set r -1
- }
-
- if {$r == 1} {
- # things are OK so far, so just verify the function name is displayed
- # in the combobox entry field.
- set names [$statbar.func get]
- if {[string compare $names "bar"]} {set r -2}
- }
- set r
-} {1}
-
-# Test: srcwin-2.7
-# Desc: goto function "oof". This tests that the correct line is highlighted
-# with BROWSE_TAG and no other lines are highlighted. It also checks that
-# the combobox has the correct function name in it. Finally, list1.c
-# has an extremely long line, line 32, that breaks some functions. We verify
-# that the GDBtk has the correct line number.
-
-gdbtk_test srcwin-2.7 "goto function oof" {
- $srcwin goto_func "" oof
- set r 0
-
- # now get a dump of all tags and check that only one line is
- # marked BROWSE_TAG and no lines are STACK_TAG or PC_TAG.
-
- # We know that list1.c should have BROWSE_TAG set at index 32.2
- # for function "oof". If list1.c is changed or the layout of the source
- # window is changed, this must be updated.
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "38.2"} {
- set line_number [$twin get "$i wordstart" "$i wordend"]
- if {$line_number == "38"} {
- incr r
- } else {
- incr r -100
- }
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- }
- }
- } else {
- set r -1
- }
-
- if {$r == 1} {
- # things are OK so far, so just verify the function name is displayed
- # in the combobox entry field.
- set names [$statbar.func get]
- if {[string compare $names "oof"]} {set r -2}
- }
- set r
-} {1}
-
-# Test: srcwin-2.8
-# Desc: This test issues a next command while browsing list1.c.
-# It should display list0.c and highlight the correct line.
-gdbtk_test srcwin-2.8 "step while browsing" {
- gdb_immediate "next" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.c"} {set r -1}
- if {$func != "main"} {set r -2}
-
- # check that correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file1(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "11.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin-2.9
-# Desc: This test issues a next command while the current
-# PC is ready to call a function. It should not go into the function and
-# should update the PC highlight correctly.
-gdbtk_test srcwin-2.9 "next" {
- gdb_immediate "next" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.c"} {set r -1}
- if {$func != "main"} {set r -2}
-
- # check that correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file1(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "12.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin-2.10
-# Desc: This test issues a step command while the current
-# PC is ready to call a function. It should step into the function.
-gdbtk_test srcwin-2.10 "step" {
- gdb_immediate "step" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check that a new file is displayed
- set twin [$stw test_get twin]
- set file3(source) [$twin get 1.0 end]
- if {![string compare $file1(source) $file3(source)]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin-2.11
-# Desc: This test issues a break and a continue
-gdbtk_test srcwin-2.11 "set BP and continue" {
- gdb_immediate "break oof" 1
- gdb_immediate "continue" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- # we must clear the breakpoint first so it doesn't mess up the
- # comparison...
- gdb_immediate "clear oof" 1
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-##### #####
-# #
-# SECTION 3: Stack Operations #
-# #
-##### #####
-
-# Test: srcwin-3.1
-# Desc: This tests "stack up"
-gdbtk_test srcwin-3.1 "stack up (1)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "long_line"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- # return n + 1;
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {
- # oof (67);
- if {$i == "26.2"} {
- incr r
- } else {
- incr r 10
- }
- }
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {2}
-
-# Test: srcwin-3.2
-# Desc: Another "stack up" test
-gdbtk_test srcwin-3.2 "stack up (2)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "bar"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- # return n + 1;
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {
- # long_line ();
- if {$i == "12.2"} {
- incr r
- } else {
- incr r 10
- }
- }
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {2}
-
-# Test: srcwin-3.3
-# Desc: Another "stack up" test
-gdbtk_test srcwin-3.3 "stack up (3)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {![string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin-3.4
-# Desc: Another "stack up" test
-gdbtk_test srcwin-3.4 "stack up (4)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.c"} {set r -1}
- if {$func != "main"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file1(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- if {$i == "12.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Disabled for now because there are different correct results.
-# Test should be rewritten to include those.
-# Test: srcwin-3.5
-# Desc: "stack up" when we are at the top
-#gdbtk_test srcwin-3.5 "stack up when at the top" {
-# $srcwin stack up
-# set r 0
-# set name [$statbar.name get]
-# set func [$statbar.func get]
-#
- # check contents of name and function comboboxes
-# if {$name != "list0.c"} {set r -1}
-# if {$func != "main"} {set r -2}
-
- # check that the correct file is displayed
-# set twin [$stw test_get twin]
-# set a [$twin get 1.0 end]
-# if {[string compare $file1(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
-# if {$r == 0} {
-# if {![catch {set z [$twin dump -tag 1.0 end]}]} {
-# foreach {k v i} $z {
-# if {$k == "tagon"} {
-# if {$v == "STACK_TAG"} {
-# if {$i == "12.2"} {
-# incr r
-# } else {
-# incr r 5
-# }
-# }
-# if {$v == "PC_TAG"} {incr r 10}
-# if {$v == "BROWSE_TAG"} {incr r 100}
-# }
-# }
-# } else {
-# set r -4
-# }
-# }
-# set r
-#} {1}
-
-# Test: srcwin-3.6
-# Desc: "stack down" test
-gdbtk_test srcwin-3.6 "stack down" {
- $srcwin stack down
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {![string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin-3.7
-# Desc: "stack bottom" test
-gdbtk_test srcwin-3.7 "stack bottom" {
- $srcwin stack bottom
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin-3.8
-# Desc: "stack down" when at bottom
-gdbtk_test srcwin-3.8 "stack down when at bottom" {
- $srcwin stack down
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# 4 - BREAKPOINTS
-
-# Test: srcwin-4.1
-# Desc: Set BP in another file. Tests bp and cache functions
-gdbtk_test srcwin-4.1 "set BP in another file" {
- gdb_immediate "break foo" 1
- $srcwin goto_func "" foo
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- set twin [$stw test_get twin]
-
- # check for BROWSE_TAG and BP image on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- if {$i == "9.0"} {
- incr r
- } else {
- set r -200
- }
- }
- }
- } else {
- set r -4
- }
- }
-
- if {$r == 2} {
- # clear BP and compare with previous contents. This should succeed,
- gdb_immediate "clear foo" 1
- set a [$twin get 1.0 end]
- if {[string compare $file3(source) $a]} {set r -3}
- }
-
- set r
-} {2}
-
-# Test: srcwin-4.2
-# Desc: Test temporary BP
-gdbtk_test srcwin-4.2 "temporary BP" {
- set r 0
- if {[catch {gdb_immediate "tbreak foo" 1} msg]} {
- set r -500
- }
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- set twin [$stw test_get twin]
-
- # check for BROWSE_TAG and BP image on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- if {$i == "9.0"} {
- incr r
- } else {
- set r -200
- }
- }
- }
- } else {
- set r -4
- }
- }
-
- gdb_immediate "continue" 1
-
- # now check for PC_TAG and no image
- if {$r == 2} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- set r -200
- }
- }
- } else {
- set r -4
- }
- }
-
- set r
-} {3}
-
-# Test: srcwin-4.3
-# Desc: Test BP balloons
-gdbtk_test srcwin-4.3 "BP Balloons" {
- # move pointer out of the way
- warp_pointer . 0 0
- set r 0
- gdb_immediate "break 10" 1
- gdb_immediate "tbreak 10" 1
-
- set twin [$stw test_get twin]
-
- # check for BROWSE_TAG and BP image on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- if {$i == "10.0"} {
- incr r
- # we found the bp image, now we will test the bp balloon messages
- set balloon [winfo toplevel [namespace tail $srcwin]].__balloon
- # shouldn't be mapped yet
- if {[winfo ismapped $balloon]} {
- set r -3000
- break
- }
- move_mouse_to $twin [$twin bbox $i]
- #wait a second for the balloon message to appear
- sleep 1
- if {![winfo ismapped $balloon]} {
- set r -4000
- break
- }
- # read the contents of the balloon and parse it into lines
- set a [split [$balloon.label cget -text] \n]
- set i 0
- # foreach line parse it and check the type and make sure it is enabled
- foreach line $a {
- if {[lindex $line 0] == "breakpoint"} {continue}
- incr i
- set enabled [lindex $line 0]
- set bptype [lindex $line 2]
- switch $i {
- 1 {
- if {$bptype != "donttouch"} {set r -1000}
- }
- 2 {
- if {$bptype != "delete"} {set r -2000}
- }
- }
- }
- } else {
- set r -200
- }
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {2}
-
-#ManagedWin::open DebugWin
-
-# Test: srcwin-4.4
-# Desc: Click on line to set BP
-gdbtk_test srcwin-4.4 "Click on line to set BP" {
- set r 0
-
- # click mouse button 1 at index 20.1
- if {![click $twin [$twin bbox 20.1] 1]} {
- set r "Click failed on line 20.1"
- } else {
-
- # now look for BP at line 20
- foreach bpnum [gdb_get_breakpoint_list] {
- set bpinfo [gdb_get_breakpoint_info $bpnum]
- lassign $bpinfo file func line pc type enabled disposition \
- ignore_count commands cond thread hit_count
- set file [lindex [file split $file] end]
- if {$file == "list0.h"} {
- if {$line == "20"} {
- if {$enabled == "1"} {incr r}
- if {$func == "foo"} {incr r}
- if {$type == "breakpoint"} {incr r}
- if {$disposition == "donttouch"} {incr r}
- }
- }
- }
- }
- set r
-} {4}
-
-
-# Test: srcwin-4.5
-# Desc: Continue till here popup
-gdbtk_test srcwin-4.5 "Continue till here popup" {
- set twin [$stw test_get twin]
-
- # Get coordinates of line 16
- set b [$twin bbox 16.1]
- set y [expr {[lindex $b 1] + ([lindex $b 3] / 2)}]
-
- # Continue to here
- $stw continue_to_here $twin $y
-
- # Where is the PC_TAG?
- set pcs {}
- set tags [$twin tag ranges PC_TAG]
- foreach {start end} $tags {
- lappend pcs [expr {int($start)}]
- }
-
- # Where are breakpoints?
- set bps {}
- set imgs [$twin dump -image 1.0 end]
- foreach {foo bar line} $imgs {
- lappend bps $line
- }
-
- list $pcs $bps
-} {16 {10.0 20.0}}
-
-# 5.1 balloon variables
-# Test: srcwin-5.1
-# Desc: variable balloon test
-# continues to BP at line 20 and checks to see that value was updated
-gdbtk_test srcwin-5.1 "variable balloon test" {
- # move pointer out of the way
- warp_pointer . 0 0
- set r 0
- set twin [$stw test_get twin]
-
- # move pointer to variable "x" and check balloon
- set index [string first "x++" [$twin get 20.0 20.end]]
- move_mouse_to $twin [$twin bbox 20.$index]
- sleep 1
- if {[winfo ismapped $balloon]} {
- if {![string compare "x=9" [$balloon.label cget -text]]} {incr r}
- gdb_immediate "continue" 1
- sleep 1
- if {![string compare "x=13" [$balloon.label cget -text]]} {incr r}
- } else {
- set r -1
- }
-
- set r
-} {2}
-
-# 6.1 mixed mode disassembly of include file
-# Test: srcwin-6.1
-# Desc: Some versions of GDBtk can't do mixed-mode disassembly of a function
-# that is in an include file.
-gdbtk_test srcwin-6.1 "mixed mode disassembly of include file" {
- set r 0
- $srcwin mode "" MIXED
-
- # check contents of name and function comboboxes
- set name [$statbar.name get]
- set func [$statbar.func get]
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check contents of source window
- set twin [$stw test_get twin]
- set text [$twin get 1.0 end]
- # Is it correct? I don't know. Guess we look for some pieces of source...
- if {[string first "static void" $text] != -1 &&
- [string first "foo (x)" $text] != -1 &&
- [string first "bar (x++);" $text] != -1} {
- set r 1
- }
-
- set r
-} {1}
-
-gdbtk_test_done
diff --git a/gdb/testsuite/gdb.gdbtk/srcwin2.test b/gdb/testsuite/gdb.gdbtk/srcwin2.test
deleted file mode 100644
index 17f838e2ec4..00000000000
--- a/gdb/testsuite/gdb.gdbtk/srcwin2.test
+++ /dev/null
@@ -1,898 +0,0 @@
-# Copyright (C) 1999, 2001 Red Hat, 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 was written by Martin Hunt (hunt@cygnus.com)
-
-
-# same as srcwin.test, except test debugging executables
-# when source files are missing.
-
-# Read in the standard defs file
-
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir srcdir
-
-##### #####
-# #
-# SECTION 1: Mode Tests #
-# #
-##### #####
-
-# Load the test executable
-set program [file join $objdir list]
-if {[catch {gdbtk_test_file $program} t]} {
- # This isn't a test case, since if this fails, we're hosed.
- gdbtk_test_error "loading \"$program\": $t"
-}
-
-set srcwin [ManagedWin::open SrcWin]
-set stw [$srcwin test_get twin]
-set twin [$stw test_get twin]
-set statbar [$srcwin test_get _statbar]
-
-# get things started
-gdb_cmd "break main"
-gdbtk_test_run
-
-# Test: srcwin2-1.1
-# Desc: Check for something in source window
-gdbtk_test srcwin2-1.1 "source window has contents" {
- set r 0
- set file1(source) [$twin get 1.0 end]
- if {$file1(source) == ""} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.2
-# Desc: source->assembly mode change
-gdbtk_test srcwin2-1.2 "source->assembly mode change" {
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- set file1(assembly) [$twin get 1.0 end]
- # source == assembly because for there is no source
- string compare $file1(source) $file1(assembly)
-} {0}
-
-# Test: srcwin2-1.3
-# Desc: assembly->mixed mode change
-gdbtk_test srcwin2-1.3 "assembly->mixed mode change" {
- set r 0
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- set file1(mixed) [$twin get 1.0 end]
- # mixed != assembly because the lines with source should
- # be noted, even if source in unavailable.
- if {$file1(mixed) == $file1(assembly)} {set r -1}
- if {[$statbar.mode get] != "MIXED"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.4
-# Desc: mixed->src+asm mode change
-gdbtk_test srcwin2-1.4 "mixed->src+asm mode change" {
- set r 0
- # mode change may fail if fallover to ASSEMBLY fails
- if {[catch {$srcwin mode "" SRC+ASM}]} { set r -5 }
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $file1(assembly)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.5
-# Desc: src+asm->source mode change
-gdbtk_test srcwin2-1.5 "src+asm->source mode change" {
- set r 0
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- if {[$stw test_get bwin] != ""} {set r -2}
- if {[$twin get 1.0 end] != $file1(assembly)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -3}
- set r
-} {0}
-
-# Test: srcwin2-1.6
-# Desc: source->mixed mode change
-gdbtk_test srcwin2-1.6 "source->mixed mode change" {
- set r 0
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $file1(mixed)} {set r -1}
- if {[$statbar.mode get] != "MIXED"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.7
-# Desc: mixed->source mode change
-gdbtk_test srcwin2-1.7 "mixed->source mode change" {
- set r 0
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $file1(source)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.8
-# Desc: source->src+asm mode change
-gdbtk_test srcwin2-1.8 "source->src+asm mode change" {
- set r 0
- # mode change may fail if fallover to ASSEMBLY fails
- if {[catch {$srcwin mode "" SRC+ASM}]} { set r -5 }
- set twin [$stw test_get twin]
- set bwin [$stw test_get bwin]
- if {[$twin get 1.0 end] != $file1(assembly)} {set r -1}
- if {$bwin != ""} {set r -2}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -3}
- set r
-} {0}
-
-# Test: srcwin2-1.9
-# Desc: src+asm->assembly mode change
-gdbtk_test srcwin2-1.9 "src+asm->assembly mode change" {
- set r 0
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $file1(assembly)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.10
-# Desc: assembly->src+asm mode change
-gdbtk_test srcwin2-1.10 "assembly->src+asm mode change" {
- set r 0
- # mode change may fail if fallover to ASSEMBLY fails
- if {[catch {$srcwin mode "" SRC+ASM}]} { set r -5 }
- set twin [$stw test_get twin]
- set bwin [$stw test_get bwin]
- if {[$twin get 1.0 end] != $file1(assembly)} {set r -1}
- if {$bwin != ""} {set r -2}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -3}
- set r
-} {0}
-
-# Test: srcwin2-1.11
-# Desc: src+asm->mixed mode change
-gdbtk_test srcwin2-1.11 "src+asm->mixed mode change" {
- set r 0
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $file1(mixed)} {set r -1}
- if {[$statbar.mode get] != "MIXED"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.12
-# Desc: mixed->assembly mode change
-gdbtk_test srcwin2-1.12 "mixed->assembly mode change" {
- set r 0
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $file1(assembly)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin2-1.13
-# Desc: assembly->source mode change
-gdbtk_test srcwin2-1.13 "assembly->source mode change" {
- set r 0
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $file1(source)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-
-##### #####
-# #
-# SECTION 2: Basic Operations #
-# #
-##### #####
-
-# Test: srcwin2-2.1
-# Desc: check contents of filename combobox
-gdbtk_test srcwin2-2.1 "check contents of filename combobox" {
- set names [$statbar.name listget 0 end]
- set r 0
- foreach f {list0.c list1.c list0.h} {
- if {[lsearch $names $f] != -1} {
- incr r
- }
- }
- set r
-} {3}
-
-# Test: srcwin2-2.2
-# Desc: check contents of function combobox
-gdbtk_test srcwin2-2.2 "check contents of function combobox" {
- set names [$statbar.func listget 0 end]
- set r 0
- foreach f {main foo unused} {
- if {[lsearch $names $f] != -1} {
- incr r
- }
- }
- set r
-} {3}
-
-# Test: srcwin2-2.3
-# Desc: goto filename
-gdbtk_test srcwin2-2.3 "goto filename" {
- set func [$srcwin test_get _name 1]
- $func "" list1.c
- set twin [$stw test_get twin]
- set file2(source) [$twin get 1.0 end]
- expr {![string compare $file1(source) $file2(source)]}
-} {0}
-
-# Test: srcwin2-2.4
-# Desc: check contents of function combobox
-gdbtk_test srcwin2-2.4 "check contents of function combobox" {
- set names [$statbar.func listget 0 end]
- set r 0
- foreach f {bar long_line oof unused} {
- if {[lsearch $names $f] != -1} {
- incr r
- }
- }
- set r
-} {4}
-
-# Test: srcwin2-2.5
-# Desc: function combobox entry field should be empty after switching to a new file
-gdbtk_test srcwin2-2.5 "function combobox entry field should be empty" {
- set names [$statbar.func get]
- string length $names
-} {0}
-
-# Test: srcwin2-2.6
-# Desc: goto function
-gdbtk_test srcwin2-2.6 "goto function bar" {
- $srcwin goto_func "" bar
- set r 0
-
- # now get a dump of all tags and check that only one line is
- # marked BROWSE_TAG and no lines are STACK_TAG or PC_TAG.
-
- # We know that list1.c should have BROWSE_TAG set at index 10.2
- # for function "bar". If list1.c is changed or the layout of the source
- # window is changed, this must be updated.
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "10.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} { incr r 10}
- if {$v == "PC_TAG"} { incr r 100}
- }
- }
- } else {
- set r -1
- }
-
- if {$r == 1} {
- # things are OK so far, so just verify the function name is displayed
- # in the combobox entry field.
- set names [$statbar.func get]
- if {[string compare $names "bar"]} {set r -2}
- }
- set r
-} {1}
-
-# Test: srcwin2-2.7
-# Desc: goto function "oof". This tests that the correct line is highlighted
-# with BROWSE_TAG and no other lines are highlighted. It also checks that
-# the combobox has the correct function name in it. Finally, list1.c
-# has an extremely long line, line 32, that breaks some functions. We verify
-# that the GDBtk has the correct line number.
-
-gdbtk_test srcwin2-2.7 "goto function oof" {
- $srcwin goto_func "" oof
- set r 0
-
- # now get a dump of all tags and check that only one line is
- # marked BROWSE_TAG and no lines are STACK_TAG or PC_TAG.
-
- # We know that list1.c should have BROWSE_TAG set at index 38.2
- # for function "oof". If list1.c is changed or the layout of the source
- # window is changed, this must be updated.
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "38.2"} {
- set line_number [$twin get "$i wordstart" "$i wordend"]
- if {$line_number == "38"} {
- incr r
- } else {
- incr r -100
- }
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- }
- }
- } else {
- set r -1
- }
-
- if {$r == 1} {
- # things are OK so far, so just verify the function name is displayed
- # in the combobox entry field.
- set names [$statbar.func get]
- if {[string compare $names "oof"]} {set r -2}
- }
- set r
-} {1}
-
-# Test: srcwin2-2.8
-# Desc: This test issues a next command while browsing list1.c.
-# It should display list0.c and highlight the correct line.
-gdbtk_test srcwin2-2.8 "step while browsing" {
- gdb_immediate "next" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.c"} {set r -1}
- if {$func != "main"} {set r -2}
-
- # check that correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file1(source) $a]} {set r -3}
-
- # check for PC_TAG
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin2-2.11
-# Desc: This test issues a break and a continue
-gdbtk_test srcwin2-2.11 "set BP and continue" {
- gdb_immediate "break oof" 1
- gdb_immediate "continue" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- # we must clear the breakpoint first so it doesn't mess up the
- # comparison...
- gdb_immediate "clear oof" 1
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-##### #####
-# #
-# SECTION 3: Stack Operations #
-# #
-##### #####
-
-# Test: srcwin2-3.1
-# Desc: This tests "stack up"
-gdbtk_test srcwin2-3.1 "stack up (1)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "long_line"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {
- if {$i == "26.2"} {
- incr r
- } else {
- incr r 10
- }
- }
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {2}
-
-# Test: srcwin2-3.2
-# Desc: Another "stack up" test
-gdbtk_test srcwin2-3.2 "stack up (2)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "bar"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {
- if {$i == "12.2"} {
- incr r
- } else {
- incr r 10
- }
- }
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {2}
-
-# Test: srcwin2-3.3
-# Desc: Another "stack up" test
-gdbtk_test srcwin2-3.3 "stack up (3)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set file3(source) [$twin get 1.0 end]
- if {![string compare $file2(source) $file3(source)]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin2-3.4
-# Desc: Another "stack up" test
-gdbtk_test srcwin2-3.4 "stack up (4)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.c"} {set r -1}
- if {$func != "main"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file1(source) $a]} {set r -3}
-
- # check for STACK_TAG
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- incr r
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-
-# Disabled for now because there are different correct results.
-# Test should be rewritten to include those.
-# Test: srcwin2-3.5
-# Desc: "stack up" when we are at the top
-#gdbtk_test srcwin2-3.5 "stack up when at the top" {
-# $srcwin stack up
-# set r 0
-# set name [$statbar.name get]
-# set func [$statbar.func get]
-
- # check contents of name and function comboboxes
-# if {$name != "list0.c"} {set r -1}
-# if {$func != "main"} {set r -2}
-
- # check that the correct file is displayed
-# set twin [$stw test_get twin]
-# set a [$twin get 1.0 end]
-# if {[string compare $file1(source) $a]} {set r -3}
-
- # check for STACK_TAG
-# if {$r == 0} {
-# if {![catch {set z [$twin dump -tag 1.0 end]}]} {
-# foreach {k v i} $z {
-# if {$k == "tagon"} {
-# if {$v == "STACK_TAG"} {
-# incr r
-# }
-# if {$v == "PC_TAG"} {incr r 10}
-# if {$v == "BROWSE_TAG"} {incr r 100}
-# }
-# }
-# } else {
-# set r -4
-# }
-# }
-# set r
-#} {1}
-
-# Test: srcwin2-3.6
-# Desc: "stack down" test
-gdbtk_test srcwin2-3.6 "stack down" {
- $srcwin stack down
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {![string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin2-3.7
-# Desc: "stack bottom" test
-gdbtk_test srcwin2-3.7 "stack bottom" {
- $srcwin stack bottom
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin2-3.8
-# Desc: "stack down" when at bottom
-gdbtk_test srcwin2-3.8 "stack down when at bottom" {
- $srcwin stack down
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list1.c"} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $file2(source) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "38.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# 4.1 bp, multiple, balloon, etc
-
-# Test: srcwin2-4.1
-# Desc: Set BP in another file. Tests bp and cache functions
-gdbtk_test srcwin2-4.1 "set BP in another file" {
- gdb_immediate "break foo" 1
- $srcwin goto_func "" foo
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- set twin [$stw test_get twin]
-
- # check for BROWSE_TAG and BP image on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- if {$i == "9.0"} {
- incr r
- } else {
- set r -200
- }
- }
- }
- } else {
- set r -4
- }
- }
-
- if {$r == 2} {
- # clear BP and compare with previous contents. This should succeed,
- gdb_immediate "clear foo" 1
- set a [$twin get 1.0 end]
- if {[string compare $file3(source) $a]} {set r -3}
- }
-
- set r
-} {2}
-
-# Test: srcwin2-4.2
-# Desc: Test temporary BP
-gdbtk_test srcwin2-4.2 "temporary BP" {
- set r 0
- if {[catch {gdb_immediate "tbreak foo" 1} msg]} {
- set r -500
- }
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != "list0.h"} {set r -1}
- if {$func != "foo"} {set r -2}
-
- set twin [$stw test_get twin]
-
- # check for BROWSE_TAG and BP image on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- if {$i == "9.0"} {
- incr r
- } else {
- set r -200
- }
- }
- }
- } else {
- set r -4
- }
- }
-
- gdb_immediate "continue" 1
-
- # now check for PC_TAG and no image
- if {$r == 2} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- if {$i == "9.2"} {
- incr r
- } else {
- incr r 5
- }
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- set r -200
- }
- }
- } else {
- set r -4
- }
- }
-
- set r
-} {3}
-
-gdbtk_test_done
diff --git a/gdb/testsuite/gdb.gdbtk/srcwin3.test b/gdb/testsuite/gdb.gdbtk/srcwin3.test
deleted file mode 100644
index cb888d286a1..00000000000
--- a/gdb/testsuite/gdb.gdbtk/srcwin3.test
+++ /dev/null
@@ -1,789 +0,0 @@
-# Copyright (C) 1999, 2001 Red Hat, 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 was written by Martin Hunt (hunt@cygnus.com)
-
-###########################################################
-# same as srcwin.test, except test debugging executables #
-# build without "-g" #
-###########################################################
-
-# Read in the standard defs file
-
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir srcdir
-
-##### #####
-# #
-# SECTION 1: Mode Tests #
-# #
-##### #####
-
-# Load the test executable
-set program [file join $objdir list]
-if {[catch {gdbtk_test_file $program} t]} {
- # This isn't a test case, since if this fails, we're hosed.
- gdbtk_test_error "loading \"$program\": $t"
-}
-
-set srcwin [ManagedWin::open SrcWin]
-set stw [$srcwin test_get twin]
-set twin [$stw test_get twin]
-set statbar [$srcwin test_get _statbar]
-
-# get things started
-gdb_cmd "break main"
-gdbtk_test_run
-
-# Test: srcwin3-1.1
-# Desc: Check for something in source window
-gdbtk_test srcwin3-1.1 "source window has contents" {
- set r 0
- set source(main) [$twin get 1.0 end]
- if {$source(main) == ""} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.2
-# Desc: source->assembly mode change
-gdbtk_test srcwin3-1.2 "source->assembly mode change" {
- set r 0
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- if {$source(main) != [$twin get 1.0 end]} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.3
-# Desc: assembly->mixed mode change
-gdbtk_test srcwin3-1.3 "assembly->mixed mode change" {
- set r 0
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- if {$source(main) != [$twin get 1.0 end]} {set r -1}
- if {[$statbar.mode get] != "MIXED"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.4
-# Desc: mixed->src+asm mode change
-gdbtk_test srcwin3-1.4 "mixed->src+asm mode change" {
- set r 0
- # mode change may fail if fallover to ASSEMBLY fails
- if {[catch {$srcwin mode "" SRC+ASM}]} { set r -5 }
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.5
-# Desc: src+asm->source mode change
-gdbtk_test srcwin3-1.5 "src+asm->source mode change" {
- set r 0
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- if {[$stw test_get bwin] != ""} {set r -2}
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -3}
- set r
-} {0}
-
-# Test: srcwin3-1.6
-# Desc: source->mixed mode change
-gdbtk_test srcwin3-1.6 "source->mixed mode change" {
- set r 0
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "MIXED"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.7
-# Desc: mixed->source mode change
-gdbtk_test srcwin3-1.7 "mixed->source mode change" {
- set r 0
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.8
-# Desc: source->src+asm mode change
-gdbtk_test srcwin3-1.8 "source->src+asm mode change" {
- set r 0
- # mode change may fail if fallover to ASSEMBLY fails
- if {[catch {$srcwin mode "" SRC+ASM}]} { set r -5 }
- set twin [$stw test_get twin]
- set bwin [$stw test_get bwin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {$bwin != ""} {set r -2}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -3}
- set r
-} {0}
-
-# Test: srcwin3-1.9
-# Desc: src+asm->assembly mode change
-gdbtk_test srcwin3-1.9 "src+asm->assembly mode change" {
- set r 0
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.10
-# Desc: assembly->src+asm mode change
-gdbtk_test srcwin3-1.10 "assembly->src+asm mode change" {
- set r 0
- # mode change may fail if fallover to ASSEMBLY fails
- if {[catch {$srcwin mode "" SRC+ASM}]} { set r -5 }
- set twin [$stw test_get twin]
- set bwin [$stw test_get bwin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {$bwin != ""} {set r -2}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -3}
- set r
-} {0}
-
-# Test: srcwin3-1.11
-# Desc: src+asm->mixed mode change
-gdbtk_test srcwin3-1.11 "src+asm->mixed mode change" {
- set r 0
- $srcwin mode "" MIXED
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "MIXED"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.12
-# Desc: mixed->assembly mode change
-gdbtk_test srcwin3-1.12 "mixed->assembly mode change" {
- set r 0
- $srcwin mode "" ASSEMBLY
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-# Test: srcwin3-1.13
-# Desc: assembly->source mode change
-gdbtk_test srcwin3-1.13 "assembly->source mode change" {
- set r 0
- $srcwin mode "" SOURCE
- set twin [$stw test_get twin]
- if {[$twin get 1.0 end] != $source(main)} {set r -1}
- if {[$statbar.mode get] != "ASSEMBLY"} {set r -2}
- set r
-} {0}
-
-
-##### #####
-# #
-# SECTION 2: Basic Operations #
-# #
-##### #####
-
-# Test: srcwin3-2.2
-# Desc: check contents of function combobox
-# There won't be any because we have no debug info
-gdbtk_test srcwin3-2.2 "check contents of function combobox" {
- set names [$statbar.func listget 0 end]
- llength $names
-} {0}
-
-# Test: srcwin3-2.3
-# Desc: goto filename - this won't work, but should leave things as they were
-gdbtk_test srcwin3-2.3 "goto filename" {
- set func [$srcwin test_get _name 1]
- $func "" list1.c
- set twin [$stw test_get twin]
- string compare $source(main) [$twin get 1.0 end]
-} {0}
-
-# Test: srcwin3-2.6
-# Desc: goto function
-gdbtk_test srcwin3-2.6 "goto function bar" {
- $srcwin goto_func "" bar
- set r 0
- set twin [$stw test_get twin]
- set source(bar) [$twin get 1.0 end]
-
- if {$source(bar) == $source(main)} {set r -1000}
-
- # now get a dump of all tags and check that only one line is
- # marked BROWSE_TAG and no lines are STACK_TAG or PC_TAG.
-
- # We know that list1.c should have BROWSE_TAG set at index 5.2
- # for function "bar". If list1.c is changed or the layout of the source
- # window is changed, this must be updated.
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} { incr r 10}
- if {$v == "PC_TAG"} { incr r 100}
- }
- }
- } else {
- set r -1
- }
-
- if {$r == 1} {
- # things are OK so far, so just verify the function name is displayed
- # in the combobox entry field.
- set names [$statbar.func get]
- if {[string compare $names "bar"]} {set r -2}
- }
- set r
-} {1}
-
-# Test: srcwin3-2.7
-# Desc: goto function "oof". This tests that the correct line is highlighted
-# with BROWSE_TAG and no other lines are highlighted. It also checks that
-# the combobox has the correct function name in it.
-
-gdbtk_test srcwin3-2.7 "goto function oof" {
- $srcwin goto_func "" oof
- set r 0
-
- set twin [$stw test_get twin]
- set source(oof) [$twin get 1.0 end]
-
- if {$source(bar) == $source(oof)} {set r -1000}
- if {$source(oof) == $source(main)} {set r -2000}
-
- # now get a dump of all tags and check that only one line is
- # marked BROWSE_TAG and no lines are STACK_TAG or PC_TAG.
-
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- }
- }
- } else {
- set r -1
- }
-
- if {$r == 1} {
- # things are OK so far, so just verify the function name is displayed
- # in the combobox entry field.
- set names [$statbar.func get]
- if {[string compare $names "oof"]} {set r -2}
- }
- set r
-} {1}
-
-# Test: srcwin3-2.8
-# Desc: This test issues a nexti command while browsing oof.
-# It should jump back to main
-gdbtk_test srcwin3-2.8 "nexti while browsing" {
- gdb_immediate "nexti" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of function combobox
- if {$func != "main"} {set r -2}
- if {$name != ""} {set r -1}
-
- # check that correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $source(main) $a]} {set r -3}
-
- # check for PC_TAG
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin3-2.11
-# Desc: This test issues a break and a continue
-gdbtk_test srcwin3-2.11 "set BP and continue" {
- gdb_immediate "break oof" 1
- gdb_immediate "continue" 1
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- # we must clear the breakpoint first so it doesn't mess up the
- # comparison...
- gdb_immediate "clear oof" 1
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $source(oof) $a]} {set r -3}
-
- # check for PC_TAG
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-##### #####
-# #
-# SECTION 3: Stack Operations #
-# #
-##### #####
-
-# Test: srcwin3-3.1
-# Desc: This tests "stack up"
-gdbtk_test srcwin3-3.1 "stack up (1)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "long_line"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set source(long_line) [$twin get 1.0 end]
- if {![string compare $source(long_line) $source(oof)]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {incr r 5}
- if {$v == "STACK_TAG"} {incr r}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin3-3.2
-# Desc: Another "stack up" test
-gdbtk_test srcwin3-3.2 "stack up (2)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "bar"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $source(bar) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- set r -100
- }
- if {$v == "STACK_TAG"} {
- incr r
- }
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin3-3.3
-# Desc: Another "stack up" test
-gdbtk_test srcwin3-3.3 "stack up (3)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set source(foo) [$twin get 1.0 end]
- if {![string compare $source(foo) $source(bar)]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- incr r
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin3-3.4
-# Desc: Another "stack up" test
-gdbtk_test srcwin3-3.4 "stack up (4)" {
- $srcwin stack up
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "main"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $source(main) $a]} {set r -3}
-
- # check for STACK_TAG
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- incr r
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Disabled for now because there are different correct results.
-# Test should be rewritten to include those.
-# Test: srcwin3-3.5
-# Desc: "stack up" when we are at the top
-#gdbtk_test srcwin3-3.5 "stack up when at the top" {
-# $srcwin stack up
-# set r 0
-# set name [$statbar.name get]
-# set func [$statbar.func get]
-
- # check contents of name and function comboboxes
-# if {$name != ""} {set r -1}
-# if {$func != "main"} {set r -2}
-
- # check that the correct file is displayed
-# set twin [$stw test_get twin]
-# set a [$twin get 1.0 end]
-# if {[string compare $source(main) $a]} {set r -3}
-
- # check for STACK_TAG
-# if {$r == 0} {
-# if {![catch {set z [$twin dump -tag 1.0 end]}]} {
-# foreach {k v i} $z {
-# if {$k == "tagon"} {
-# if {$v == "STACK_TAG"} {
-# incr r
-# }
-# if {$v == "PC_TAG"} {incr r 10}
-# if {$v == "BROWSE_TAG"} {incr r 100}
-# }
-# }
-# } else {
-# set r -4
-# }
-# }
-# set r
-#} {1}
-
-# Test: srcwin3-3.6
-# Desc: "stack down" test
-gdbtk_test srcwin3-3.6 "stack down" {
- $srcwin stack down
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "foo"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $source(foo) $a]} {set r -3}
-
- # check for PC_TAG and STACK_TAG on correct lines
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "STACK_TAG"} {
- incr r
- }
- if {$v == "PC_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin3-3.7
-# Desc: "stack bottom" test
-gdbtk_test srcwin3-3.7 "stack bottom" {
- $srcwin stack bottom
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $source(oof) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# Test: srcwin3-3.8
-# Desc: "stack down" when at bottom
-gdbtk_test srcwin3-3.8 "stack down when at bottom" {
- $srcwin stack down
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "oof"} {set r -2}
-
- # check that the correct file is displayed
- set twin [$stw test_get twin]
- set a [$twin get 1.0 end]
- if {[string compare $source(oof) $a]} {set r -3}
-
- # check for PC_TAG on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump -tag 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- }
- }
- } else {
- set r -4
- }
- }
- set r
-} {1}
-
-# 4.1 bp, multiple, balloon, etc
-
-# Test: srcwin3-4.1
-# Desc: Set BP in another file. Tests bp and cache functions
-gdbtk_test srcwin3-4.1 "set BP in another file" {
- gdb_immediate "break foo" 1
- $srcwin goto_func "" foo
- set r 0
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "foo"} {set r -2}
-
- set twin [$stw test_get twin]
-
- # check for BROWSE_TAG and BP image
- if {$r == 0} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- incr r
- }
- }
- } else {
- set r -4
- }
- }
-
- if {$r == 2} {
- # clear BP and compare with previous contents. This should succeed,
- gdb_immediate "clear foo" 1
- set a [$twin get 1.0 end]
- if {[string compare $source(foo) $a]} {set r -3}
- }
-
- set r
-} {2}
-
-# Test: srcwin3-4.2
-# Desc: Test temporary BP
-gdbtk_test srcwin3-4.2 "temporary BP" {
- set r 0
- if {[catch {gdb_immediate "tbreak foo" 1} msg]} {
- set r -500
- }
- set name [$statbar.name get]
- set func [$statbar.func get]
-
- # check contents of name and function comboboxes
- if {$name != ""} {set r -1}
- if {$func != "foo"} {set r -2}
-
- set twin [$stw test_get twin]
-
- # check for BROWSE_TAG and BP image on correct line
- if {$r == 0} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "BROWSE_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "PC_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- incr r
- }
- }
- } else {
- set r -4
- }
- }
-
- gdb_immediate "continue" 1
-
- # now check for PC_TAG and no image
- if {$r == 2} {
- if {![catch {set z [$twin dump 1.0 end]}]} {
- foreach {k v i} $z {
- if {$k == "tagon"} {
- if {$v == "PC_TAG"} {
- incr r
- }
- if {$v == "STACK_TAG"} {incr r 10}
- if {$v == "BROWSE_TAG"} {incr r 100}
- } elseif {$k == "image"} {
- set r -200
- }
- }
- } else {
- set r -4
- }
- }
-
- set r
-} {3}
-
-gdbtk_test_done
diff --git a/gdb/testsuite/gdb.gdbtk/stack1.c b/gdb/testsuite/gdb.gdbtk/stack1.c
deleted file mode 100644
index 389260a22a5..00000000000
--- a/gdb/testsuite/gdb.gdbtk/stack1.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/* Functions defined in other files */
-extern void extern_func1_1 (int a, char *b, unsigned long c);
-
-/* Functions defined in this file */
-static void static_func_1 (int a, char *b, unsigned long c);
-static void static_func_2 (int a, char *b, unsigned long c);
-static void static_func_3 (int a, char *b, unsigned long c);
-static void static_func_4 (int a, char *b, unsigned long c);
-static void static_func_5 (int a, char *b, unsigned long c);
-static void static_func_6 (int a, char *b, unsigned long c);
-static void static_func_7 (int a, char *b, unsigned long c);
-static void static_func_8 (int a, char *b, unsigned long c);
-static void static_func_9 (int a, char *b, unsigned long c);
-static void static_func_10 (int a, char *b, unsigned long c);
-static void static_func_11 (int a, char *b, unsigned long c);
-static void static_func_12 (int a, char *b, unsigned long c);
-static void static_func_13 (int a, char *b, unsigned long c);
-static void static_func_14 (int a, char *b, unsigned long c);
-static void static_func_15 (int a, char *b, unsigned long c);
-
-void func_1 (int a, char *b, unsigned long c);
-void func_2 (int a, char *b, unsigned long c);
-void func_3 (int a, char *b, unsigned long c);
-void func_4 (int a, char *b, unsigned long c);
-void func_5 (int a, char *b, unsigned long c);
-void func_6 (int a, char *b, unsigned long c);
-void func_7 (int a, char *b, unsigned long c);
-void func_8 (int a, char *b, unsigned long c);
-void func_9 (int a, char *b, unsigned long c);
-void func_10 (int a, char *b, unsigned long c);
-void func_11 (int a, char *b, unsigned long c);
-void func_12 (int a, char *b, unsigned long c);
-void func_13 (int a, char *b, unsigned long c);
-void func_14 (int a, char *b, unsigned long c);
-void func_15 (int a, char *b, unsigned long c);
-
-int
-main (int argc, char *argv[])
-{
- int a;
- char *b;
- unsigned long c;
-
- a = 1;
- b = "This is a string.";
- c = 0xdeadL;
-
- func_1 (a, b, c);
-
- exit (0);
-}
-
-void
-func_1 (int a, char *b, unsigned long c)
-{
- func_2 (a, b, c);
-}
-
-void
-func_2 (int a, char *b, unsigned long c)
-{
- func_3 (a, b, c);
-}
-
-void
-func_3 (int a, char *b, unsigned long c)
-{
- func_4 (a, b, c);
-}
-
-void
-func_4 (int a, char *b, unsigned long c)
-{
- func_5 (a, b, c);
-}
-
-void
-func_5 (int a, char *b, unsigned long c)
-{
- func_6 (a, b, c);
-}
-
-void
-func_6 (int a, char *b, unsigned long c)
-{
- func_7 (a, b, c);
-}
-
-void
-func_7 (int a, char *b, unsigned long c)
-{
- func_8 (a, b, c);
-}
-
-void
-func_8 (int a, char *b, unsigned long c)
-{
- func_9 (a, b, c);
-}
-
-void
-func_9 (int a, char *b, unsigned long c)
-{
- func_10 (a, b, c);
-}
-
-void
-func_10 (int a, char *b, unsigned long c)
-{
- func_11 (a, b, c);
-}
-
-void
-func_11 (int a, char *b, unsigned long c)
-{
- func_12 (a, b, c);
-}
-
-void
-func_12 (int a, char *b, unsigned long c)
-{
- func_13 (a, b, c);
-}
-
-void
-func_13 (int a, char *b, unsigned long c)
-{
- func_14 (a, b, c);
-}
-
-void
-func_14 (int a, char *b, unsigned long c)
-{
- func_15 (a, b, c);
-}
-
-void
-func_15 (int a, char *b, unsigned long c)
-{
- static_func_1 (a, b, c);
-}
-
-static void
-static_func_1 (int a, char *b, unsigned long c)
-{
- static_func_2 (a, b, c);
-}
-
-static void
-static_func_2 (int a, char *b, unsigned long c)
-{
- static_func_3 (a, b, c);
-}
-
-static void
-static_func_3 (int a, char *b, unsigned long c)
-{
- static_func_4 (a, b, c);
-}
-
-static void
-static_func_4 (int a, char *b, unsigned long c)
-{
- static_func_5 (a, b, c);
-}
-
-static void
-static_func_5 (int a, char *b, unsigned long c)
-{
- static_func_6 (a, b, c);
-}
-
-static void
-static_func_6 (int a, char *b, unsigned long c)
-{
- static_func_7 (a, b, c);
-}
-
-static void
-static_func_7 (int a, char *b, unsigned long c)
-{
- static_func_8 (a, b, c);
-}
-
-static void
-static_func_8 (int a, char *b, unsigned long c)
-{
- static_func_9 (a, b, c);
-}
-
-static void
-static_func_9 (int a, char *b, unsigned long c)
-{
- static_func_10 (a, b, c);
-}
-
-static void
-static_func_10 (int a, char *b, unsigned long c)
-{
- static_func_11 (a, b, c);
-}
-
-static void
-static_func_11 (int a, char *b, unsigned long c)
-{
- static_func_12 (a, b, c);
-}
-
-static void
-static_func_12 (int a, char *b, unsigned long c)
-{
- static_func_13 (a, b, c);
-}
-
-static void
-static_func_13 (int a, char *b, unsigned long c)
-{
- static_func_14 (a, b, c);
-}
-
-static void
-static_func_14 (int a, char *b, unsigned long c)
-{
- static_func_15 (a, b, c);
-}
-
-static void
-static_func_15 (int a, char *b, unsigned long c)
-{
- extern_func1_1 (a, b, c);
-}
diff --git a/gdb/testsuite/gdb.gdbtk/stack2.c b/gdb/testsuite/gdb.gdbtk/stack2.c
deleted file mode 100644
index db47c469e6e..00000000000
--- a/gdb/testsuite/gdb.gdbtk/stack2.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Functions defined in this file */
-void extern_func1_1 (int, char *, unsigned long);
-void extern_func1_2 (int, char *, unsigned long);
-void extern_func1_3 (int, char *, unsigned long);
-void extern_func1_4 (int, char *, unsigned long);
-void extern_func1_5 (int, char *, unsigned long);
-void extern_func1_6 (int, char *, unsigned long);
-void extern_func1_7 (int, char *, unsigned long);
-void extern_func1_8 (int, char *, unsigned long);
-void extern_func1_9 (int, char *, unsigned long);
-void extern_func1_10 (int, char *, unsigned long);
-void extern_func1_11 (int, char *, unsigned long);
-void extern_func1_12 (int, char *, unsigned long);
-void extern_func1_13 (int, char *, unsigned long);
-void extern_func1_14 (int, char *, unsigned long);
-void extern_func1_15 (int, char *, unsigned long);
-
-void
-extern_func1_1 (int a, char *b, unsigned long c)
-{
- extern_func1_2 (a, b, c);
-}
-
-void
-extern_func1_2 (int a, char *b, unsigned long c)
-{
- extern_func1_3 (a, b, c);
-}
-
-void
-extern_func1_3 (int a, char *b, unsigned long c)
-{
- extern_func1_4 (a, b, c);
-}
-
-void
-extern_func1_4 (int a, char *b, unsigned long c)
-{
- extern_func1_5 (a, b, c);
-}
-
-void
-extern_func1_5 (int a, char *b, unsigned long c)
-{
- extern_func1_6 (a, b, c);
-}
-
-void
-extern_func1_6 (int a, char *b, unsigned long c)
-{
- extern_func1_7 (a, b, c);
-}
-
-void
-extern_func1_7 (int a, char *b, unsigned long c)
-{
- extern_func1_8 (a, b, c);
-}
-
-void
-extern_func1_8 (int a, char *b, unsigned long c)
-{
- extern_func1_9 (a, b, c);
-}
-
-void
-extern_func1_9 (int a, char *b, unsigned long c)
-{
- extern_func1_10 (a, b, c);
-}
-
-void
-extern_func1_10 (int a, char *b, unsigned long c)
-{
- extern_func1_11 (a, b, c);
-}
-
-void
-extern_func1_11 (int a, char *b, unsigned long c)
-{
- extern_func1_12 (a, b, c);
-}
-
-void
-extern_func1_12 (int a, char *b, unsigned long c)
-{
- extern_func1_13 (a, b, c);
-}
-
-void
-extern_func1_13 (int a, char *b, unsigned long c)
-{
- extern_func1_14 (a, b, c);
-}
-
-void
-extern_func1_14 (int a, char *b, unsigned long c)
-{
- extern_func1_15 (a, b, c);
-}
-
-void
-extern_func1_15 (int a, char *b, unsigned long c)
-{
- /* THE END */
- return;
-}
diff --git a/gdb/testsuite/gdb.gdbtk/windows.exp b/gdb/testsuite/gdb.gdbtk/windows.exp
deleted file mode 100644
index 94b09a4d863..00000000000
--- a/gdb/testsuite/gdb.gdbtk/windows.exp
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 2001 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) 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.
-
-load_lib insight-support.exp
-
-if {[gdbtk_initialize_display]} {
- if {$tracelevel} {
- strace $tracelevel
- }
-
- #
- # Basic window tests (basic as in, "do they open")
- #
- set prms_id 0
- set bug_id 0
-
- set srcfile [file join $srcdir $subdir c_variable.c]
- set binfile [file join $objdir $subdir c_variable]
- set r [gdb_compile $srcfile $binfile executable {debug}]
- if { $r != "" } {
- gdb_suppress_entire_file \
- "Testcase compile failed, so some tests in this file will automatically fail."
- }
-
- # Start with a fresh gdbtk
- gdb_exit
- set results [gdbtk_start [file join $srcdir $subdir windows.test]]
- set results [split $results \n]
-
- # Analyze results
- gdbtk_done $results
-}
diff --git a/gdb/testsuite/gdb.gdbtk/windows.test b/gdb/testsuite/gdb.gdbtk/windows.test
deleted file mode 100644
index ebb4b3e9c12..00000000000
--- a/gdb/testsuite/gdb.gdbtk/windows.test
+++ /dev/null
@@ -1,131 +0,0 @@
-# Basic window tests
-# Copyright 2001 Red Hat, 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 was written by Keith Seitz (keiths@cygnus.com)
-
-# Read in the standard defs file
-if {![gdbtk_read_defs]} {
- break
-}
-
-global objdir test_ran
-
-# Windows to test
-# FIXME: TfindArgs needs to be updated before it can go in the list...
-set windows [list BpWin BrowserWin Console DebugWin HtmlViewer KodWin LocalsWin \
- MemWin ProcessWin RegWin StackWin TdumpWin WatchWin]
-
-# Dialogs to test
-# FIXME: ActionhDlg,TraceDlg cannot be independently opened
-set dialogs [list About AttachDlg GlobalPref SrcPref TargetSelection]
-
-# Helper proc to do all the testing
-proc do_open_close {num winlist} {
- set i 1
- foreach win $winlist {
-
- # Test: windows-$num.*
- # Desc: Open each window before running
- set win_obj ""
- gdbtk_test windows-$num.$i "open $win before running" {
- set err [catch {ManagedWin::open $win} txt]
- if {$err} {
- # display error
- set txt
- } else {
- # display "0"
- set win_obj $txt
- set err
- }
- } {0}
-
- # Update screen
- update idletasks
-
- # Test: windows-{$num+1}.*
- # Desc: Close each window before running
- gdbtk_test windows-[expr {$num+1}].$i "close $win before running" {
- set err [catch {delete object $win_obj} txt]
- if {$err} {
- # display error
- set txt
- } else {
- # display "0"
- set err
- }
- } {0}
-
- # Update screen
- update idletasks
- incr i
- }
-}
-
-#
-# Tests start here
-#
-
-# Counter for tests. Increment by 2 after each call to do_open_close.
-set num 1
-
-#
-# Check if all windows open with no file loaded
-#
-do_open_close $num $windows
-incr num 2
-
-# Sadly, there is no good way to unpost dialogs (except for setting
-# an after callback). Until something better comes along, skip them.
-# do_open_close $num $dialogs
-# incr num 2
-
-#
-# Check if all windows open with file loaded
-#
-
-# Load in a file
-set program [file join $objdir c_variable]
-if {[catch {gdbtk_test_file $program} t]} {
- # This isn't a test case, since if this fails, we're hosed.
- gdbtk_test_error "loading \"$program\": $t"
-}
-
-do_open_close $num $windows
-incr num 2
-#do_open_close $num $dialogs
-incr num 2
-
-#
-# Check if all windows open after running
-#
-
-# Break in main and run
-gdb_cmd "break main"
-gdbtk_test_run
-
-do_open_close $num $windows
-incr num 2
-#do_open_close $num $dialogs
-#incr num 2
-
-#
-# Exit
-#
-gdbtk_test_done