From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5080 invoked by alias); 9 Feb 2005 20:00:54 -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 4979 invoked from network); 9 Feb 2005 20:00:36 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (205.232.38.116) by sourceware.org with SMTP; 9 Feb 2005 20:00:36 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id B19E947DBA; Wed, 9 Feb 2005 15:00:36 -0500 (EST) Date: Wed, 09 Feb 2005 21:57:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: [PATCH/testsuite] New test for "start" (w/ C program) Message-ID: <20050209200036.GH18546@adacore.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="oJ71EGRlYNjSvfq7" Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2005-02/txt/msg00074.txt.bz2 --oJ71EGRlYNjSvfq7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 311 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). -- Joel --oJ71EGRlYNjSvfq7 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="start.c" Content-length: 1035 /* 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; } --oJ71EGRlYNjSvfq7 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="start.exp" Content-length: 1304 # 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" --oJ71EGRlYNjSvfq7--