From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26293 invoked by alias); 16 Apr 2003 20:32:42 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26284 invoked from network); 16 Apr 2003 20:32:41 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 16 Apr 2003 20:32:41 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h3GKWfD09241 for ; Wed, 16 Apr 2003 16:32:41 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h3GKWfq16875 for ; Wed, 16 Apr 2003 16:32:41 -0400 Received: from localhost.localdomain (vpn50-38.rdu.redhat.com [172.16.50.38]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h3GKWeg29472 for ; Wed, 16 Apr 2003 16:32:40 -0400 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h3GKWZw26967 for gdb-patches@sources.redhat.com; Wed, 16 Apr 2003 13:32:35 -0700 Date: Wed, 16 Apr 2003 20:32:00 -0000 From: Kevin Buettner Message-Id: <1030416203234.ZM26966@localhost.localdomain> In-Reply-To: Kevin Buettner "[RFC] gdb.base/args.exp: Invoke gdb_load for simulator targets" (Apr 8, 3:27pm) References: <1030408222709.ZM13182@localhost.localdomain> To: gdb-patches@sources.redhat.com Subject: Re: [RFC] gdb.base/args.exp: Invoke gdb_load for simulator targets MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-04/txt/msg00330.txt.bz2 I ended up committing the following patch. (My original patch modified some rexexps to match extra output after program exit in a simulator. The patch below does not do this.) * gdb.base/args.exp: Invoke gdb_load for simulator targets. Index: gdb.base/args.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/args.exp,v retrieving revision 1.5 diff -u -p -r1.5 args.exp --- gdb.base/args.exp 20 Mar 2003 14:42:15 -0000 1.5 +++ gdb.base/args.exp 16 Apr 2003 20:28:52 -0000 @@ -31,6 +31,15 @@ if [target_info exists noargs] { return; } +# No loading needs to be done when the target is `exec'. Some targets +# require that the program be loaded, however. +proc args_load {} { + global binfile + if [target_info exists is_simulator] { + gdb_load ${binfile} + } +} + set testfile "args" set srcfile ${testfile}.c set binfile ${objdir}/${subdir}/${testfile} @@ -47,6 +56,7 @@ set GDBFLAGS "--args $binfile 1 3" gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir +args_load gdb_test "run" \ "Starting program.*args(\\.exe)? 1 3.*3\r\n.*args\r\n1\r\n3.*Program exited normally." \ "correct args printed" @@ -58,6 +68,7 @@ set GDBFLAGS "--args $binfile 1 '' 3" gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir +args_load gdb_test "run" \ "Starting program.*args(\\.exe)? 1 \\\\'\\\\' 3.*4\r\n.*args\r\n1\r\n''\r\n3.*Program exited normally." \ "correct args printed, one empty" @@ -69,6 +80,7 @@ set GDBFLAGS "--args $binfile 1 '' '' 3" gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir +args_load gdb_test "run" \ "Starting program.*args(\\.exe)? 1 \\\\'\\\\' \\\\'\\\\' 3.*5\r\n.*args\r\n1\r\n''\r\n''\r\n3.*Program exited normally." \ "correct args printed, two empty"