From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17052 invoked by alias); 23 Nov 2010 20:47:13 -0000 Received: (qmail 17042 invoked by uid 22791); 23 Nov 2010 20:47:12 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,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; Tue, 23 Nov 2010 20:46:57 +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.13.8/8.13.8) with ESMTP id oANKkMEN002525 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 23 Nov 2010 15:46:22 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oANKkLPV024175; Tue, 23 Nov 2010 15:46:21 -0500 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id oANKkKTe031897; Tue, 23 Nov 2010 15:46:20 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 4C671378885; Tue, 23 Nov 2010 13:46:19 -0700 (MST) From: Tom Tromey To: Nathan Froyd Cc: Joel Brobecker , JuYoung Kim , Eli Zaretskii , "gdb-patches\@sourceware.org" Subject: Re: [patch]change dwarf2_start_subfile() to adapt inappropriate dir name References: <13428716.22191289802305139.JavaMail.weblogic@epml17> <20101115165834.GA4434@adacore.com> <20101115180513.GJ8544@codesourcery.com> Date: Tue, 23 Nov 2010 20:47:00 -0000 In-Reply-To: <20101115180513.GJ8544@codesourcery.com> (Nathan Froyd's message of "Mon, 15 Nov 2010 10:05:14 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2010-11/txt/msg00373.txt.bz2 >>>>> "Nathan" == Nathan Froyd writes: Nathan> FWIW, we encountered this problem as well. This is the patch we used to Nathan> fix it. It's very similar to the proposed patch, but slightly more Nathan> complete. Thanks. Nathan> + if (dirname[dir_len-1] == SLASH_STRING[0]) Noting Eli's note... Nathan> + memmove (concat_name+dir_len-1, concat_name+dir_len, Spaces around the operators. Nathan> + /* SLASH_STRING and trailing NULL */ Nathan> + strlen (filename) + 1 + 1); I think it is mildly better to use strlen (SLASH_STRING) rather than 1. Or just call concat two different ways instead of memmove. This is ok with these nits fixed. Tom