From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2891 invoked by alias); 4 May 2005 14:43:58 -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 29599 invoked from network); 4 May 2005 14:40:45 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 4 May 2005 14:40:45 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) id 1DTL3M-0003lT-Lw; Wed, 04 May 2005 10:40:44 -0400 Date: Wed, 04 May 2005 14:43:00 -0000 From: Daniel Jacobowitz To: Manoj Iyer Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] new GDB server testcase Message-ID: <20050504144044.GA14120@nevyn.them.org> Mail-Followup-To: Manoj Iyer , gdb-patches@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-05/txt/msg00115.txt.bz2 On Wed, May 04, 2005 at 09:24:20AM -0500, Manoj Iyer wrote: > > I wrote a testcase for testing basic gdbserver functionality over TCP > connection. I will add more cases like step, print, etc once the testcase > is approved. Thanks for doing this. Can you find a better name than "basictest.exp"? Is there a reason not to add these basic tests to server-run.exp? > /* File: test basic remote debug functionality through TCP connection. */ > /* Author: Manoj Iyer */ This needs a copyright notice. > #include > #include Why are you using stdio? We have no easy way to get at the program's output. > > main() > { > printf("hello gdb\n"); > function1(); > } That's not valid C, though many compilers will accept it. "int main" and "return 0" please. > > ====================================================================== > > ======================= basictest.exp =============================== Please use server-run.exp as a template instead of whatever you were using. For instance, use skip_gdbserver_tests, and don't use gdb_suppress_entire_file. > gdb_exit > global gdbport > > set ret [gdbserver_spawn $binfile ""] > set gdbport [lindex $ret 1] > > gdb_start > > send_gdb "file $binfile \n " > > gdb_target_cmd "remote" $gdbport ... and don't duplicate any of that. gdbserver_load. I went to a lot of trouble to write the infrastructure, so please use it :-) -- Daniel Jacobowitz CodeSourcery, LLC