From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17787 invoked by alias); 9 Feb 2005 22:40:39 -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 17515 invoked from network); 9 Feb 2005 22:40:16 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 9 Feb 2005 22:40:16 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j19MeGIQ016228 for ; Wed, 9 Feb 2005 17:40:16 -0500 Received: from localhost.redhat.com (vpn50-22.rdu.redhat.com [172.16.50.22]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j19MeFO01369; Wed, 9 Feb 2005 17:40:15 -0500 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id BB3067D79; Wed, 9 Feb 2005 17:39:32 -0500 (EST) Message-ID: <420A9123.9060800@gnu.org> Date: Thu, 10 Feb 2005 02:29:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH/testsuite] New test for "start" (w/ C program) References: <20050209200036.GH18546@adacore.com> In-Reply-To: <20050209200036.GH18546@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-02/txt/msg00079.txt.bz2 Joel Brobecker wrote: > A new testcase verifying that "start" works on C programs. > > 2005-02-09 Joel Brobecker > > * gdb.base/start.c: New file. > * gdb.base/start.exp: New testcase. > > Tested on x86-linux, one PASS. > Checked in (was pre-approved). > > (I hope this is what Andrew had in mind). Perfect (wonder out loud if there should be a gdb.cli/.exp directory.) > /* This testcase is part of GDB, the GNU debugger. > > Copyright 2005 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 > 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 */ > > #include > > int x; > > void bar() > { > x--; > } > > void foo() > { > x++; > } > > int main() > { > foo(); > bar(); > return 0; > } > > > ------------------------------------------------------------------------ > > # Copyright 2005 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 > # 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. > > if $tracelevel then { > strace $tracelevel > } > > set prms_id 0 > set bug_id 0 > > set testfile start > set srcfile ${testfile}.c > set binfile ${objdir}/${subdir}/${testfile} > if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { > untested "Couldn't compile test program" > return -1 > } > > # Get things started. > > gdb_exit > gdb_start > gdb_reinitialize_dir $srcdir/$subdir > gdb_load ${binfile} > > # For C programs, "start" should stop in main(). > > gdb_test "start" \ > "main \\(\\) at .*start.c.*" \ > "start" >