From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5533 invoked by alias); 22 Jul 2012 10:52:19 -0000 Received: (qmail 5524 invoked by uid 22791); 22 Jul 2012 10:52:19 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Sun, 22 Jul 2012 10:52:00 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6MApjUj019000 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 22 Jul 2012 06:51:45 -0400 Received: from host2.jankratochvil.net (ovpn-116-30.ams2.redhat.com [10.36.116.30]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q6MApf7W016929 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 22 Jul 2012 06:51:43 -0400 Date: Sun, 22 Jul 2012 10:52:00 -0000 From: Jan Kratochvil To: Hui Zhu Cc: gdb-patches ml , Joel Brobecker Subject: Re: [PATCH Bug breakpoints/14381] Fix linespec to parse file name that begin with decimal numbers Message-ID: <20120722105136.GA13654@host2.jankratochvil.net> References: <20120722071044.GA8522@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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: 2012-07/txt/msg00426.txt.bz2 On Sun, 22 Jul 2012 12:10:45 +0200, Hui Zhu wrote: > This issue must build test code without dir, for example: "1.c". > But "gdb_compile" or "prepare_for_testing" will build the test code > with dir, for example:"src/gdb/testsuite/gdb.base/1.c". > > Could you tell me how to handle it? Oops, OK, I did not expect difficulties. The easier should be just to use TCL commands 'cd' (and restore it to 'pwd'), and then do not pass $srcdir/$subdir to gdb_compile (you cannot use build_executable and you also cannot use prepare_for_testing). The more safe way against compiler output changes would be to generate DWARF. This case should be the part compdir_absolute_ldir_missing__file_basename from not yet committed patch/testcase: http://sourceware.org/ml/gdb-patches/2012-04/msg00106.html so one could simplify that testcase; the testcase is a bit complex, though. Thanks, Jan