From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5269 invoked by alias); 4 Nov 2015 21:39:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 5260 invoked by uid 89); 4 Nov 2015 21:39:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_05,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 04 Nov 2015 21:39:31 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id EF8E52996C; Wed, 4 Nov 2015 16:39:29 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rGGVBm1Gt9VH; Wed, 4 Nov 2015 16:39:29 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id BFDB82996B; Wed, 4 Nov 2015 16:39:29 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 5B251446B0; Wed, 4 Nov 2015 13:39:28 -0800 (PST) Date: Wed, 04 Nov 2015 21:39:00 -0000 From: Joel Brobecker To: Fei Jie Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/3] Add testcases for display function Message-ID: <20151104213928.GP4009@adacore.com> References: <1446620987-4140-1-git-send-email-feij.fnst@cn.fujitsu.com> <1446620987-4140-3-git-send-email-feij.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1446620987-4140-3-git-send-email-feij.fnst@cn.fujitsu.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-11/txt/msg00162.txt.bz2 > add testcases to test display under different conditions Same kind of procedural issues as before, so I'm not going to comment on those again. > --- a/gdb/testsuite/gdb.base/display.c > +++ b/gdb/testsuite/gdb.base/display.c > @@ -4,6 +4,11 @@ > #define LOOP 10 > > int sum = 0; > +int int_array[2]={0,1}; The formatting does not follow the GCS: - spaces around binary operators; - space after comma. Thus: int int_array[2] = {0, 1}; > +struct { > + char name; > + int age; > +} human; GCS issues: - the opening curly braces should be on the next line. - the indentation level should be 2 characters. Thus: struct { char name; int age; } human; > +set bp_location [gdb_get_line_number "set breakpoint 1 here"] > +send_gdb "break $bp_location\n" > +send_gdb "run\n" Do not use send_gdb unless you absolutely have no other choice. Take a look at the gdb testsuite cookbook for how to insert breakpoints and run to them. Also, this might no longer become relevant, but it's better to never test the "run" command directly, since there are targets where this is not the appropriate thing to do (Eg: when using gdbserver, we do "set target remote ..." followed by "continue" instead). But why not enhance display.exp instead of creating a new one? -- Joel