From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30454 invoked by alias); 11 Apr 2013 09:14:15 -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 30405 invoked by uid 89); 11 Apr 2013 09:14:14 -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; Thu, 11 Apr 2013 09:14:13 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3B9E7DN015724 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 11 Apr 2013 05:14:07 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3B9E4Zt009414; Thu, 11 Apr 2013 05:14:05 -0400 Message-ID: <51667EDC.9070207@redhat.com> Date: Thu, 11 Apr 2013 17:47: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: Eli Zaretskii , Hui Zhu , gdb-patches ml , Marc Khouzam Subject: Re: [PATCH] add -s option to make -break-insert support dprintf References: <515451EA.1000200@mentor.com> <83y5d7wpvq.fsf@gnu.org> <516454DA.9040109@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00324.txt.bz2 On 04/11/2013 03:40 AM, Hui Zhu wrote: >> New MI features need a NEWS entry. > > This is for NEWS: > ** The -s of MI command -break-insert can set a dynamic printf. > Please send that as a real patch, so e.g., we can see what section of NEWS you're proposing adding it to. > >> >>> +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { >>> + untested mi-dprintf.exp >> >> http://sourceware.org/gdb/wiki/GDBTestcaseCookbook#A.22untested.22_calls >> > > Looks test doesn't need it now. So I removed it. I still see it in the patch. But, you can simplify and replace that gdb_compile call with a build_executable call, I think? Then you don't need the untested call. >> >>> + set target_can_dprintf 0 >>> + pass "$msg - cannot do" >> >>> + } >>> + timeout { >>> + fail "resume all, waiting for program exit (timeout)" >> >> Certainly "resume all" is a pasto here. > > pasto? Typo -> pasto. Pasto is like a typo, but refers to blindly copy/pasting text from elsewhere. "resume all, waiting for program exit" makes no sense here. It should be $msg, no? >> Why do I get: >> >> PASS: gdb.mi/mi-dprintf.exp: Set dprintf style to agent - cannot do >> >> with gdbserver? > > Set dprintf style to agent need test with gdbserver. > I update this pass to unsupported. > > And also update this part to make it test OK with gdbserver. I still get: $ make check gdbserver RUNTESTFLAGS="--target_board=native-gdbserver mi-dprintf.exp" ... FAIL: gdb.mi/mi-dprintf.exp: set dprintf style to agent === gdb Summary === # of expected passes 13 # of unexpected failures 1 gdb.log: ~"arg=1235, g=2222\n" *running,thread-id="1" =breakpoint-modified,bkpt={number="5",type="breakpoint",disp="keep",enabled="y",addr="0x00000000004006c2",func="foo",file="../../../src/gdb/testsuite/gdb.mi/mi-dprintf.c",fullname="/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.mi/mi-dprintf.c",line="29",thread-groups=["i1"],times="2",original-location="/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.mi/mi-dprintf.c:29"} *stopped,reason="breakpoint-hit",disp="keep",bkptno="5",frame={addr="0x00000000004006c2",func="foo",args=[{name="arg",value="1235"}],file="../../../src/gdb/testsuite/gdb.mi/mi-dprintf.c",fullname="/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.mi/mi-dprintf.c",line="29"},thread-id="1",stopped-threads="all",core="1" (gdb) PASS: gdb.mi/mi-dprintf.exp: gdb: mi 2nd dprintf &"continue\n" ~"Continuing.\n" ^running *running,thread-id="1" (gdb) =breakpoint-modified,bkpt={number="3",type="dprintf",disp="keep",enabled="y",addr="0x00000000004006a3",func="foo",file="../../../src/gdb/testsuite/gdb.mi/mi-dprintf.c",fullname="/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.mi/mi-dprintf.c",line="27",thread-groups=["i1"],times="3",script={"printf \\"At foo entry\\\\n\\"","continue"},original-location="foo"} *stopped ~"At foo entry\n" *running,thread-id="1" =breakpoint-modified,bkpt={number="4",type="dprintf",disp="keep",enabled="y",addr="0x00000000004006b4",func="foo",file="../../../src/gdb/testsuite/gdb.mi/mi-dprintf.c",fullname="/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.mi/mi-dprintf.c",line="28",thread-groups=["i1"],times="3",script={"printf \\"arg=%d, g=%d\\\\n\\", arg, g","continue"},original-location="/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.mi/mi-dprintf.c:28"} *stopped ~"arg=1236, g=3013\n" *running,thread-id="1" =breakpoint-modified,bkpt={number="5",type="breakpoint",disp="keep",enabled="y",addr="0x00000000004006c2",func="foo",file="../../../src/gdb/testsuite/gdb.mi/mi-dprintf.c",fullname="/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.mi/mi-dprintf.c",line="29",thread-groups=["i1"],times="3",original-location="/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.mi/mi-dprintf.c:29"} *stopped,reason="breakpoint-hit",disp="keep",bkptno="5",frame={addr="0x00000000004006c2",func="foo",args=[{name="arg",value="1236"}],file="../../../src/gdb/testsuite/gdb.mi/mi-dprintf.c",fullname="/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.mi/mi-dprintf.c",line="29"},thread-id="1",stopped-threads="all",core="0" (gdb) FAIL: gdb.mi/mi-dprintf.exp: set dprintf style to agent > +# Sleep 1 second to make sure set dprintf-style agent get right outout. s/outout/output/ ? -- Pedro Alves