From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32019 invoked by alias); 9 Sep 2011 07:59:08 -0000 Received: (qmail 32009 invoked by uid 22791); 9 Sep 2011 07:59:07 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Sep 2011 07:58:52 +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 p897wpWO029266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 9 Sep 2011 03:58:51 -0400 Received: from host1.jankratochvil.net (ovpn-116-38.ams2.redhat.com [10.36.116.38]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p897wm3k027394 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Sep 2011 03:58:50 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p897wlk8005087; Fri, 9 Sep 2011 09:58:47 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p897wkpn005079; Fri, 9 Sep 2011 09:58:46 +0200 Date: Fri, 09 Sep 2011 12:32:00 -0000 From: Jan Kratochvil To: Hui Zhu Cc: Tom Tromey , gdb-patches ml Subject: Re: [PATCH] printcmd.c (ui_printf): make internalvar string can be printf and eval when inferior cannot alloc memory Message-ID: <20110909075846.GA3468@host1.jankratochvil.net> References: <20110906085007.GA19880@host1.jankratochvil.net> <20110907095850.GA25473@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2011-09/txt/msg00156.txt.bz2 On Fri, 09 Sep 2011 09:27:09 +0200, Hui Zhu wrote: > >    gdb_test_no_output {set $a={'a','b'}} (I forgot to state the original gdb_test expect string "" matches any output.) > > Still this testcase FAILs for me: > > printf "%s\n", $a^M > > abX^M > > (gdb) FAIL: gdb.base/printcmds.exp: printf "%s\n", $a > > > > Where X is some binary unprintable garbage character, not sure which way you > > plan to fix it (maybe some `error' call if there is no zero-terminator?). > > I didn't got this issue. Could you post more info about this issue? The primary problem is the regression with valgrind, as shown in: http://sourceware.org/ml/gdb-patches/2011-09/msg00084.html http://sourceware.org/gdb/wiki/TestingGDB#Running_GDB_under_Valgrind_in_the_testsuite The valgrind regression is present even with live inferior (but GDB must not valgrind-complain even on commands which were refused with error before). Moreover when I link GDB with -lmcheck (which I always do) I get the testcase FAIL as shown above but that is exactly the same GDB code patch problem as the valgrind-shown case. I did not try to but I think with proper size of the $a array GDB will crash. very minor issue: Now with your recent change it will with -lmcheck: FAIL: gdb.base/printcmds.exp: printf "%s\n", $a FAIL: gdb.base/printcmds.exp: printf "%s\n", $a - the testcase names should be unique. Thanks, Jan