Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Fernando Nasser <fnasser@cygnus.com>
To: Stephane Carrez <Stephane.Carrez@worldnet.fr>
Cc: gdb-patches@sources.redhat.com, Michael Snyder <msnyder@cygnus.com>
Subject: Re: [RFA]: Fix gdb.c++/userdef.exp for HC11
Date: Mon, 09 Jul 2001 15:00:00 -0000	[thread overview]
Message-ID: <3B4A2961.D58D6400@cygnus.com> (raw)
In-Reply-To: <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


      parent reply	other threads:[~2001-07-09 15:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3B07B0AC.59C50A0@worldnet.fr>
2001-06-27 22:20 ` Andrew Cagney
2001-06-27 22:43   ` Daniel Berlin
2001-06-28 15:20     ` Stephane Carrez
2001-07-09 15:00 ` Fernando Nasser [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B4A2961.D58D6400@cygnus.com \
    --to=fnasser@cygnus.com \
    --cc=Stephane.Carrez@worldnet.fr \
    --cc=gdb-patches@sources.redhat.com \
    --cc=msnyder@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox