diff options
author | Michael Snyder <msnyder@specifix.com> | 2008-06-10 00:13:15 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@specifix.com> | 2008-06-10 00:13:15 +0000 |
commit | ce119b4142eb7b70f580c8830fa2a1832b2de019 (patch) | |
tree | 9b8363b2417351934cd03581624454c5b122e1e4 /gdb/testsuite | |
parent | ea9e838749c0f6f20a7a12423efb0ef2a422e487 (diff) | |
download | gdb-drow-reverse-20070409-branch.tar.gz |
Daniel Jacobowitz' update to Michael Snyder's reverse debugging patchesdrow-reverse-20070409-branchcvs/drow-reverse-20070409-branch
Diffstat (limited to 'gdb/testsuite')
30 files changed, 0 insertions, 11685 deletions
diff --git a/gdb/testsuite/gdb.gdbtk/ChangeLog b/gdb/testsuite/gdb.gdbtk/ChangeLog deleted file mode 100644 index 3360312e41b..00000000000 --- a/gdb/testsuite/gdb.gdbtk/ChangeLog +++ /dev/null @@ -1,339 +0,0 @@ -2007-02-08 Andreas Schwab <schwab@suse.de> - - * insight-support.exp (gdbtk_start): Return error status instead - of aborting the whole testsuite run. - -2006-09-19 Keith Seitz <keiths@redhat.com> - - * Makefile.in: Change all instances of configure.in to refer to - configure.ac. - -2005-01-27 Keith Seitz <keiths@redhat.com> - - * configure.in: Rename to ... - * configure.ac: ... this. - * configure: Regnerate. - -2004-07-19 Martin Hunt <hunt@redhat.com> - - * All: Updated load_lib calls to find new location - of insight-support.exp. - -2004-07-16 Andrew Cagney <cagney@redhat.com> - - * insight-support.exp: Moved to here from ../lib. - -2003-02-28 Martin M. Hunt <hunt@redhat.com> - - * c_variable.test: Fix result for 6.22. - -2003-02-27 Martin M. Hunt <hunt@redhat.com> - - * cpp_variable.test: Major changes required because varobj_update - now returns "-1" if a variable is out of scope. - - * c_variable.test: Major changes required because varobj_update - now returns "-1" if a variable is out of scope. This fixes a bunch - of XFAILS. Change bug reporting address. - - * windows.test: Remove HtmlViewer from list of windows. - - * srcwin.test: Use "list get" instead of "listget" to - get contents of comboboxes. - (2.1): Be less sensitive. - - * srcwin2.test: Use "list get" instead of "listget" to - get contents of comboboxes - (2-1.3): Accept assembly == mixed - for no source tests. - - * srcwin3.test: Use "list get" instead of "listget" to - get contents of comboboxes - -2002-09-09 Fred Fish <fnf@intrinsity.com> - - * simple.c: Pass addresses to strncpy, not chars. - -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 4df262ac964..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.ac - $(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 475bdb506a1..00000000000 --- a/gdb/testsuite/gdb.gdbtk/browser.exp +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 1998, 1999, 2001, 2004 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 ../gdb.gdbtk/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 0fcd652e2be..00000000000 --- a/gdb/testsuite/gdb.gdbtk/c_variable.exp +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999, 2001, 2004 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 ../gdb.gdbtk/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 625ac7c017d..00000000000 --- a/gdb/testsuite/gdb.gdbtk/c_variable.test +++ /dev/null @@ -1,2071 +0,0 @@ -# Varobj Tests (C language) -# Copyright 1998, 2001, 2003 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: -# insight@sources.redhat.com - -# 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 -proc check_update {} { - global var - - set out {} - set changed {} - foreach ind [array names var] { - set ret [$var($ind) update] - if {$ret == -1} { - lappend out $ind - } elseif {$ret != ""} { - lappend changed $ret - } - } - 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: create 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 -} {{} {lsimple.character lsimple.integer lpsimple lsimple lcharacter lpcharacter linteger lpinteger lfloat lpfloat func llong lplong lpsimple->integer ldouble lpdouble}} - -# 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 {lsimple.character lsimple.integer lpsimple lsimple lcharacter lpcharacter linteger lpinteger lfloat lpfloat func llong lplong lpsimple->integer ldouble lpdouble}} - -# 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} { - 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 - -# Disabled for now because varobjs don't work this way. If you create a varobj named "foo" -# it will display the correct value for any variable named "foo" in scope. So inner_foo -# is not out of scope because there is another variable named "foo" in scope. It is -# instead marked as changed. - -#gdbtk_test *c_variable-3.7 {check that outer foo in scope and inner foo out of scope} { -# 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} { - 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} { - check_update -} {{} {foo foo2}} - -# 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 -} {{} {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}} - -# 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 {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}} - -# 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}} {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}} - -# 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}} {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}} - -# 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 {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}} - -# 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 {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}} - -# 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 {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.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}} {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}} - -# 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 {struct_declarations.s2.i.3 struct_declarations.func_ptr_ptr struct_declarations.s2.i.4 struct_declarations.s2.i.5 struct_declarations.s2.i.6 struct_declarations.func_ptr struct_declarations.s2.i.7 struct_declarations.s2.i.8 struct_declarations.s2.i.9 struct_declarations.s2.u2.u1s1.d struct_declarations.func_ptr_struct struct_declarations.s2.u2.u1s1.e struct_declarations.u1 struct_declarations.char_ptr.*char_ptr struct_declarations.long_int struct_declarations.s2.u2.u1s2.func struct_declarations.integer struct_declarations.s2.u2 struct_declarations.s2.u2.u1s1.e.0 struct_declarations.s2.u2.u1s1.e.1 struct_declarations.long_array.0 struct_declarations.s2.u2.u1s1.e.2 struct_declarations.long_array.1 struct_declarations.u1.a struct_declarations.s2.u2.u1s1.e.3 struct_declarations.long_array.2 struct_declarations.u1.b struct_declarations.s2.u2.u1s1.e.4 struct_declarations.long_array.3 struct_declarations.u1.c struct_declarations.s2.u2.u1s1.e.5 struct_declarations.long_array.4 struct_declarations.u1.d struct_declarations.u1.b.*b struct_declarations.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr struct_declarations.s2.u2.u1s1.e.6 struct_declarations.long_array.5 struct_declarations.s2.u2.u1s1.e.7 struct_declarations.long_array.6 struct_declarations.s2.u2.u1s1.e.8 struct_declarations.long_array.7 struct_declarations.s2.u2.u1s1.e.9 struct_declarations.long_array.8 struct_declarations.character struct_declarations.long_array.9 struct_declarations.int_ptr_ptr.*int_ptr_ptr struct_declarations.s2.u2.u1s1.func struct_declarations.s2.u2.u1s2.array_ptr struct_declarations.s2.u2.f struct_declarations.s2.u2.u1s1.foo struct_declarations.s2.u2.u1s1 struct_declarations.s2.u2.u1s2.array_ptr.0 struct_declarations.char_ptr struct_declarations.s2.u2.u1s2 struct_declarations.s2.u2.u1s2.array_ptr.1 struct_declarations.int_ptr_ptr struct_declarations.s2 struct_declarations.long_array struct_declarations.s2.g struct_declarations.s2.i.0 struct_declarations.s2.h struct_declarations.s2.i.1 struct_declarations.s2.i struct_declarations.s2.i.2}} - -# 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}} {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs 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.next.ptrs 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->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_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}} {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs 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.next.ptrs 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->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_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 {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs 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.next.ptrs 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->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->long_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}} {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs 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.next.ptrs 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->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 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 {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs 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.next.ptrs 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->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->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 {psnp->ptrs.0.next psnp->ptrs.0.next.ptrs 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.next.ptrs 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->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr psnp->ptrs.0.ptrs psnp->ptrs.0 psnp->ptrs.1 psnp->ptrs.2 psnp->long_ptr.*psnp->long_ptr.**psnp->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 (*)(void)} {struct _struct_decl *(*)(int, char *, long int)} {struct _struct_decl (*)(int, char *, long int)} {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 weird.integer weird.character weird.char_ptr weird.char_ptr.*char_ptr weird.long_int weird.int_ptr_ptr weird.int_ptr_ptr.*int_ptr_ptr weird.long_array.0 weird.long_array.1 weird.long_array.2 weird.long_array.3 weird.long_array.4 weird.long_array.5 weird.long_array.6 weird.long_array.7 weird.long_array.8 weird.long_array.9 weird.func_ptr weird.func_ptr_struct weird.func_ptr_ptr weird.u1.a weird.u1.b weird.u1.c weird.u1.d weird.s2.u2.f weird.s2.g weird.s2.h weird.s2.i.0 weird.s2.i.1 weird.s2.i.2 weird.s2.i.3 weird.s2.i.4 weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.s2.i.9}} {weird.char_ptr weird.s2.u2.f weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr weird.s2.g weird.s2.h weird.s2.i weird.func_ptr_ptr weird.func_ptr weird.s2.u2 weird.int_ptr_ptr weird.long_int weird.character weird.s2.u2.u1s1 weird.s2.u2.u1s2 weird.long_array.0 weird.u1.a weird.long_array.1 weird.s2 weird.func_ptr_struct weird.u1.b weird.long_array.2 weird.long_array weird.u1.c weird.long_array.3 weird.u1.d weird.long_array.4 weird.long_array.5 weird.s2.i.0 weird.long_array.6 weird.s2.i.1 weird.long_array.7 weird.s2.i.2 weird.long_array.8 weird.s2.i.3 weird.long_array.9 weird.s2.i.4 weird.integer weird.s2.i.5 weird.s2.i.6 weird.s2.i.7 weird.s2.i.8 weird.int_ptr_ptr.*int_ptr_ptr weird.s2.i.9 weird.char_ptr.*char_ptr weird.u1 weird.u1.b.*b}} - -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 - -#Local Variables: -#mode: tcl diff --git a/gdb/testsuite/gdb.gdbtk/configure b/gdb/testsuite/gdb.gdbtk/configure deleted file mode 100644 index 16dc537ba46..00000000000 --- a/gdb/testsuite/gdb.gdbtk/configure +++ /dev/null @@ -1,2248 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. -# -# Copyright (C) 2003 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -exec 6>&1 - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_config_libobj_dir=. -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="defs" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os LIBOBJS LTLIBOBJS' -ac_subst_files='' - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -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' - -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 - - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` - - # 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_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$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 ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; - - -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) 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 | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$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 | -n) - 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 ;; - - -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_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - 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 "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -# 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_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - 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 "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # 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 <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -_ACEOF - - cat <<_ACEOF -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] -_ACEOF - - cat <<\_ACEOF - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] - --target=TARGET configure for building compilers for TARGET [HOST] -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -_ACEOF -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - ac_popdir=`pwd` - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir - done -fi - -test -n "$ac_init_help" && exit 0 -if $ac_init_version; then - cat <<\_ACEOF - -Copyright (C) 2003 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit 0 -fi -exec 5>config.log -cat >&5 <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - $ $0 $@ - -_ACEOF -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_sep= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -{ - (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) - sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; - *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - sed "/^$/d" confdefs.h | sort - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status - ' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# 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 - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -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 -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - - - - - - - -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 - elif test -f $ac_dir/shtool; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \`cd $srcdir;pwd\`/../../.. $srcdir/\`cd $srcdir;pwd\`/../../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in \`cd $srcdir;pwd\`/../../.. $srcdir/\`cd $srcdir;pwd\`/../../.." >&2;} - { (exit 1); exit 1; }; } -fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. - -# Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} - { (exit 1); exit 1; }; } - -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 -build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 -host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking target system type" >&5 -echo $ECHO_N "checking target system type... $ECHO_C" >&6 -if test "${ac_cv_target+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_target_alias=$target_alias -test "x$ac_cv_target_alias" = "x" && - ac_cv_target_alias=$ac_cv_host_alias -ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6 -target=$ac_cv_target -target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - - - - ac_config_files="$ac_config_files Makefile" -cat >confcache <<\_ACEOF -# 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, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# 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 \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} | - sed ' - t clear - : clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g -t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g -t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed - - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - -exec 6>&1 - -# Open the log real soon, to keep \$[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - -This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 -_ACEOF - -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - -cat >>$CONFIG_STATUS <<\_ACEOF - -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to <bug-autoconf@gnu.org>." -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2003 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - ac_shift=: - ;; - -*) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; - esac - - case $ac_option in - # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF - - - - - -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} - -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - -# -# CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@CC@,$CC,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t -s,@target@,$target,;t t -s,@target_cpu@,$target_cpu,;t t -s,@target_vendor@,$target_vendor,;t t -s,@target_os@,$target_os,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # 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_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # 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" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi -fi # test -n "$CONFIG_FILES" - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - diff --git a/gdb/testsuite/gdb.gdbtk/configure.ac b/gdb/testsuite/gdb.gdbtk/configure.ac deleted file mode 100644 index 5ab12edbf15..00000000000 --- a/gdb/testsuite/gdb.gdbtk/configure.ac +++ /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 b17eaa11ee7..00000000000 --- a/gdb/testsuite/gdb.gdbtk/console.exp +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1998, 1999, 2001, 2004 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 ../gdb.gdbtk/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 a7764f67199..00000000000 --- a/gdb/testsuite/gdb.gdbtk/cpp_variable.exp +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 1999, 2001, 2004 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 ../gdb.gdbtk/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 d2de6f3deea..00000000000 --- a/gdb/testsuite/gdb.gdbtk/cpp_variable.test +++ /dev/null @@ -1,594 +0,0 @@ -# Varobj Tests (C++ language) -# Copyright (C) 1998, 2003 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: -# insight@sources.redhat.com - -# 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 -proc check_update {} { - global var - - set out {} - set changed {} - foreach ind [array names var] { - set ret [$var($ind) update] - if {$ret == -1} { - lappend out $ind - } elseif {$ret != ""} { - lappend changed $ret - } - } - 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 [lindex $changes 0] 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 {v.private.v_priv_charp v.VB v.private.v_priv_int v.VC v.public.v_pub_charp v.public.v_pub_int v.private v.public v.VA}} - -# 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.public.v_pub_int v.private.v_priv_charp}} {v.private.v_priv_charp v.VB v.private.v_priv_int v.VC v.public.v_pub_charp v.public.v_pub_int v.private v.public v.VA}} - -# 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 -} {v.private.v_priv_charp {v.private.v_priv_charp v.VB v.private.v_priv_int v.VC v.public.v_pub_charp v.private.v_priv_charp.*v_priv_charp v.public.v_pub_int v.private v.public v.VA}} - -# 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 -} {{} {v.VA.protected v.private.v_priv_charp.*v_priv_charp v.VA.private v.VA.public.va_pub_int v.private.v_priv_int v.public.v_pub_int v.VA.public.va_pub_charp v.private.v_priv_charp v.VA.public v.public.v_pub_charp v.VA.private.va_priv_int v.VA v.public v.VB v.VC v.VA.protected.bar v.VA.private.va_priv_charp v.private}} - -# 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 {v.VB.public v.VA.protected v.private.v_priv_charp.*v_priv_charp v.VA.private v.VB.private.vb_priv_int v.VB.private v.VA.public.va_pub_int v.private.v_priv_int v.VB.public.vb_pub_int v.public.v_pub_int v.VB.private.vb_priv_charp v.VA.public.va_pub_charp v.private.v_priv_charp v.VA.public v.public.v_pub_charp v.VA.private.va_priv_int v.VA v.public v.VB v.VC v.VA.protected.bar v.VA.private.va_priv_charp v.private}} - -# 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 - -#Local Variables: -#mode: tcl - 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/insight-support.exp b/gdb/testsuite/gdb.gdbtk/insight-support.exp deleted file mode 100644 index e5815206353..00000000000 --- a/gdb/testsuite/gdb.gdbtk/insight-support.exp +++ /dev/null @@ -1,319 +0,0 @@ -# GDB Testsuite Support for Insight. -# -# Copyright 2001, 2004 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. - -# Initializes the display for gdbtk testing. -# Returns 1 if tests should run, 0 otherwise. -proc gdbtk_initialize_display {} { - global _using_windows - - # This is hacky, but, we don't have much choice. When running - # expect under Windows, tcl_platform(platform) is "unix". - if {![info exists _using_windows]} { - set _using_windows [expr {![catch {exec cygpath --help}]}] - } - - if {![_gdbtk_xvfb_init]} { - if {$_using_windows} { - untested "No GDB_DISPLAY -- skipping tests" - } else { - untested "No GDB_DISPLAY or Xvfb -- skipping tests" - } - - return 0 - } - - return 1 -} - -# From dejagnu: -# srcdir = testsuite src dir (e.g., devo/gdb/testsuite) -# objdir = testsuite obj dir (e.g., gdb/testsuite) -# subdir = subdir of testsuite (e.g., gdb.gdbtk) -# -# To gdbtk: -# env(DEFS)=the "defs" files (e.g., devo/gdb/testsuite/gdb.gdbtk/defs) -# env(SRCDIR)=directory containing the test code (e.g., *.test) -# env(OBJDIR)=directory which contains any executables -# (e.g., gdb/testsuite/gdb.gdbtk) -proc gdbtk_start {test} { - global verbose - global GDB - global GDBFLAGS - global env srcdir subdir objdir - - gdb_stop_suppressing_tests; - - # Need to convert ::GDB to use (-)?insight... - if {[regsub {gdb$} $GDB insight newGDB]} { - set INSIGHT $newGDB - } else { - perror "Cannot find Insight executable" - return "ERROR gdbtk_start" - } - - verbose "Starting $INSIGHT -nx -q --tclcommand=$test" - - set real_test [which $test] - if {$real_test == 0} { - perror "$test is not found" - return "ERROR gdbtk_start" - } - - if {![is_remote host]} { - if { [which $INSIGHT] == 0 } { - perror "$INSIGHT does not exist." - return "ERROR gdbtk_start" - } - } - - set wd [pwd] - - # Find absolute path to test - set test [to_tcl_path -abs $test] - - # Set some environment variables - cd $srcdir - set abs_srcdir [pwd] - set env(DEFS) [to_tcl_path -abs [file join $abs_srcdir $subdir defs]] - - cd $wd - cd [file join $objdir $subdir] - set env(OBJDIR) [pwd] - cd $wd - - # Set info about target into env - _gdbtk_export_target_info - - set env(SRCDIR) $abs_srcdir - set env(GDBTK_VERBOSE) 1 - set env(GDBTK_LOGFILE) [to_tcl_path [file join $objdir gdb.log]] - unset -nocomplain env(TCL_LIBRARY) - - set err [catch {exec $INSIGHT -nx -q --tclcommand=$test} res] - if { $err } { - perror "Execing $INSIGHT failed: $res" - append res "\nERROR gdb-crash" - } - return $res -} - -# Start xvfb when using it. -# The precedence is: -# 1. If GDB_DISPLAY is set (and not ""), use it -# 2. If Xvfb exists, use it (not on cygwin) -# 3. Skip tests -proc _gdbtk_xvfb_init {} { - global env spawn_id _xvfb_spawn_id _using_windows - - if {[info exists env(GDB_DISPLAY)]} { - if {$env(GDB_DISPLAY) != ""} { - set env(DISPLAY) $env(GDB_DISPLAY) - } else { - # Suppress tests - return 0 - } - } elseif {!$_using_windows && [which Xvfb] != 0} { - set screen ":[getpid]" - set pid [spawn Xvfb $screen -ac] - set _xvfb_spawn_id $spawn_id - set env(DISPLAY) localhost$screen - } else { - # No Xvfb found -- skip test - return 0 - } - - return 1 -} - -# Kill xvfb -proc _gdbtk_xvfb_exit {} { - global objdir subdir env _xvfb_spawn_id - - if {[info exists _xvfb_spawn_id]} { - exec kill [exp_pid -i $_xvfb_spawn_id] - wait -i $_xvfb_spawn_id - } -} - -# help proc for setting tcl-style paths from unix-style paths -# pass "-abs" to make it an absolute path -proc to_tcl_path {unix_path {arg {}}} { - global _using_windows - - if {[string compare $unix_path "-abs"] == 0} { - set unix_path $arg - set wd [pwd] - cd [file dirname $unix_path] - set dirname [pwd] - set unix_name [file join $dirname [file tail $unix_path]] - cd $wd - } - - if {$_using_windows} { - set unix_path [exec cygpath -aw $unix_path] - set unix_path [join [split $unix_path \\] /] - } - - return $unix_path -} - -# Set information about the target into the environment -# variable TARGET_INFO. This array will contain a list -# of commands that are necessary to run a target. -# -# This is mostly devined from how dejagnu works, what -# procs are defined, and analyzing unix.exp, monitor.exp, -# and sim.exp. -# -# Array elements exported: -# Index Meaning -# ----- ------- -# init list of target/board initialization commands -# target target command for target/board -# load load command for target/board -# run run command for target_board -proc _gdbtk_export_target_info {} { - global env - - # Figure out what "target class" the testsuite is using, - # i.e., sim, monitor, native - if {[string compare [info proc gdb_target_monitor] gdb_target_monitor] == 0} { - # Using a monitor/remote target - set target monitor - } elseif {[string compare [info proc gdb_target_sim] gdb_target_sim] == 0} { - # Using a simulator target - set target simulator - } elseif {[string compare [info proc gdb_target_sid] gdb_target_sid] == 0} { - # Using sid - set target sid - } else { - # Assume native - set target native - } - - # Now setup the array to be exported. - set info(init) {} - set info(target) {} - set info(load) {} - set info(run) {} - - switch $target { - simulator { - set opts "[target_info gdb,target_sim_options]" - set info(target) "target sim $opts" - set info(load) "load" - set info(run) "run" - } - - monitor { - # Setup options for the connection - if {[target_info exists baud]} { - lappend info(init) "set remotebaud [target_info baud]" - } - if {[target_info exists binarydownload]} { - lappend info(init) "set remotebinarydownload [target_info binarydownload]" - } - if {[target_info exists disable_x_packet]} { - lappend info(init) "set remote X-packet disable" - } - if {[target_info exists disable_z_packet]} { - lappend info(init) "set remote Z-packet disable" - } - - # Get target name and connection info - if {[target_info exists gdb_protocol]} { - set targetname "[target_info gdb_protocol]" - } else { - set targetname "not_specified" - } - if {[target_info exists gdb_serial]} { - set serialport "[target_info gdb_serial]" - } elseif {[target_info exists netport]} { - set serialport "[target_info netport]" - } else { - set serialport "[target_info serial]" - } - - set info(target) "target $targetname $serialport" - set info(load) "load" - set info(run) "continue" - } - - sid { - # We must start sid first, since Insight won't have a clue - # about how to do this. - sid_start - set info(target) "target [target_info gdb_protocol] [target_info netport]" - set info(load) "load" - set info(run) "continue" - } - - native { - set info(run) "run" - } - } - - # Export the array to the environment - set env(TARGET_INFO) [array get info] -} - -# gdbtk tests call this function to print out the results of the -# tests. The argument is a proper list of lists of the form: -# {status name description msg}. All of these things typically -# come from the testsuite harness. -proc gdbtk_analyze_results {results} { - foreach test $results { - set status [lindex $test 0] - set name [lindex $test 1] - set description [lindex $test 2] - set msg [lindex $test 3] - - switch $status { - PASS { - pass "$description ($name)" - } - - FAIL { - fail "$description ($name)" - } - - ERROR { - perror "$name" - } - - XFAIL { - xfail "$description ($name)" - } - - XPASS { - xpass "$description ($name)" - } - } - } -} - -proc gdbtk_done {{results {}}} { - global _xvfb_spawn_id - gdbtk_analyze_results $results - - # Kill off xvfb if using it - if {[info exists _xvfb_spawn_id]} { - _gdbtk_xvfb_exit - } - - # Yich. If we're using sid, we must kill it - if {[string compare [info proc gdb_target_sid] gdb_target_sid] == 0} { - sid_exit - } -} 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 969f6880636..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 c9267d805e3..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 ../gdb.gdbtk/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 eaa9ba8530e..00000000000 --- a/gdb/testsuite/gdb.gdbtk/srcwin.test +++ /dev/null @@ -1,1192 +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 list get 0 end] - set r 0 - foreach f {list0.c list1.c} { - if {[lsearch $names $f] != -1} { - incr r - } - } - set r -} {2} - -# Test: srcwin-2.2 -# Desc: check contents of function combobox -gdbtk_test srcwin-2.2 "check contents of function combobox" { - set names [$statbar.func list get 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 list get 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. PR# mi/1101 - -gdbtk_test srcwin-6.1 "mixed mode disassembly of include file (mi/1101)" { - 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 ee693e269cb..00000000000 --- a/gdb/testsuite/gdb.gdbtk/srcwin2.test +++ /dev/null @@ -1,899 +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. This behaviour is - # different for different debug formats, so we accept either. - if {$file1(mixed) == ""} {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 list get 0 end] - set r 0 - foreach f {list0.c list1.c} { - if {[lsearch $names $f] != -1} { - incr r - } - } - set r -} {2} - -# Test: srcwin2-2.2 -# Desc: check contents of function combobox -gdbtk_test srcwin2-2.2 "check contents of function combobox" { - set names [$statbar.func list get 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 list get 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 b9a1617bb5c..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 list get 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 c5613de8b42..00000000000 --- a/gdb/testsuite/gdb.gdbtk/windows.exp +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2001, 2004 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 ../gdb.gdbtk/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 d8f72c549fe..00000000000 --- a/gdb/testsuite/gdb.gdbtk/windows.test +++ /dev/null @@ -1,131 +0,0 @@ -# Basic window tests -# Copyright 2001, 2003 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 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 |