This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Fix gdb.c++/userdef.exp for HC11
- To: Stephane Carrez <Stephane dot Carrez at worldnet dot fr>
- Subject: Re: [RFA]: Fix gdb.c++/userdef.exp for HC11
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Mon, 09 Jul 2001 18:00:01 -0400
- CC: gdb-patches at sources dot redhat dot com, Michael Snyder <msnyder at cygnus dot com>
- Organization: Red Hat , Inc. - Toronto
- References: <3B07B0AC.59C50A0@worldnet.fr>
Stephane Carrez wrote:
>
> Hi!
>
> The test gdb.c++/userdef.exp does not link for HC11 because there is
> no C++ iostream. The patch below avoids to execute the test for m6811 target.
>
> Can you approve it?
>
> Thanks,
> Stephane
>
> 2001-05-20 Stephane Carrez <Stephane.Carrez@worldnet.fr>
>
> * gdb.c++/userdef.exp: This test fails for 68HC11 because C++
> iostream is not available.
>
>
Hi Stephane,
Sorry for the delay.
Here is how you should do this. It will also allow someone to run these tests if a target with this architecture but with more memory is built in the future (as I understood from your last response it is a question of memory size). Also, it will help other folks that may have similar restrictions (i.e., iostream not available).
The code snippets are from a Michael Snyder's patch which added a similar feature for the C stdio.
2000-10-13 Michael Snyder <msnyder@cleaver.cygnus.com>
* lib/gdb.exp (gdb_skip_float_test): New proc. Skip test if
no floating point support.
(gdb_skip_stdio_test): New proc. Skip test if no stdio support.
* gdb.base/call-ar-st.exp: Use above procs to skip tests.
Index: lib/gdb.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.156
diff -c -p -r1.156 gdb.exp
*** gdb.exp 2000/03/14 06:47:51 1.156
--- gdb.exp 2000/10/14 00:25:48
*************** proc gdbtk_analyze_results {results} {
*** 1686,1689 ****
--- 1695,1724 ----
}
}
}
+ }
+
+ # Print a message and return true if a test should be skipped
+ # due to lack of stdio support.
+
+ proc gdb_skip_stdio_test { msg } {
+ if [target_info exists gdb,noinferiorio] {
+ verbose "Skipping test '$msg': no inferior i/o.";
+ return 1;
+ }
+ return 0;
+ }
+
}
You just make one for streamio and then add to the test file the equivalent to:
# Can't do this test without stdio support.
if [gdb_skip_stdio_test "a2run.exp"] {
return
}
Then, you add the following line to the file that describes your board:
set_board_info gdb,noinferiorio 1
Regards,
Fernando
> Index: testsuite/gdb.c++/userdef.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/userdef.exp,v
> retrieving revision 1.3
> diff -u -p -r1.3 userdef.exp
> --- userdef.exp 2001/03/21 20:51:16 1.3
> +++ userdef.exp 2001/05/20 11:40:02
> @@ -1,5 +1,5 @@
> # Tests of overloaded operators resolution.
> -# Copyright 1998, 1999 Free Software Foundation, Inc.
> +# Copyright 1998, 1999, 2001 Free Software Foundation, Inc.
>
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> @@ -28,6 +28,9 @@ if $tracelevel then {
> }
>
> if { [skip_cplus_tests] } { continue }
> +
> +# The C++ iostream is not available on embedded 68HC11.
> +if [istarget "m6811-*-*"] { continue }
>
> set testfile "userdef"
> set srcfile ${testfile}.cc
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9