From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7018 invoked by alias); 8 Apr 2013 14:39:48 -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 7009 invoked by uid 89); 8 Apr 2013 14:39:48 -0000 X-Spam-SWARE-Status: No, score=-8.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 08 Apr 2013 14:39:47 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r38EddIW022728 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 8 Apr 2013 10:39:39 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r38Edbi6020193; Mon, 8 Apr 2013 10:39:38 -0400 Message-ID: <5162D6A9.2070706@redhat.com> Date: Mon, 08 Apr 2013 18:34:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Hui Zhu CC: Keith Seitz , Hui Zhu , gdb-patches ml Subject: Re: [PATCH] Fix dprintf work not right if it is pending References: <514BF736.3070706@mentor.com> <514C3C85.4000704@codesourcery.com> <514EEBFF.8090705@redhat.com> <5154378D.60302@redhat.com> <515B1DF7.3090705@redhat.com> <515EF6A3.2080704@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00190.txt.bz2 Hi Hui, Getting there. On 04/08/2013 08:19 AM, Hui Zhu wrote: > + /* 1 - connect to target 1, that can run breakpoint commands. > + 2 - create a dprintf, which resolves fine. > + 3 - disconnect from target 2 This should have been "from target 1". > + 4 - connect to target 2, that can NOT run breakpoint commands. > +load_lib gdbserver-support.exp > + You're not calling gdbserver directly anymore, so this is no longer necessary. > +set testfile "dprintf-pending" > +set libfile "dprintf-pendshr" > +set srcfile $testfile.c > +set libsrc $srcdir/$subdir/$libfile.c > +set binfile $objdir/$subdir/$testfile > +set lib_sl $objdir/$subdir/$libfile.sl Please use standard_testfile/standard_output_file. Instead of these explicit "(without ...)": > + "set pending dprintf (without format)" \ ... > + "set pending dprintf (without symbols)" \ ... > +"single pending dprintf info (without symbols)" ... > +gdb_test "" ".*x=3.*x=4.*x=3.*" "run to resolved dprintf (without symbols)" Please use with_test_prefix, like with_test_prefix "without format" { ... group all "without format" bits here, including test setup ... } with_test_prefix "without symbols" { ... group all "without symbols" bits here ... } > +gdb_test "file ${binfile}" ".*Error in re-setting breakpoint.*" "load symbols get without format error" "load symbols get without format error" is not very correct English and I find it hard to grok. I suggest instead "resolved dprintf fails to be re-set". No need to mention "without format" here, as that will be covered by with_test_prefix. -- Pedro Alves