From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6052 invoked by alias); 8 Mar 2012 02:18:14 -0000 Received: (qmail 5942 invoked by uid 22791); 8 Mar 2012 02:18:13 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-tul01m020-f169.google.com (HELO mail-tul01m020-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 08 Mar 2012 02:18:00 +0000 Received: by obbta14 with SMTP id ta14so22757obb.0 for ; Wed, 07 Mar 2012 18:17:59 -0800 (PST) Received: by 10.182.141.10 with SMTP id rk10mr1655311obb.48.1331173079808; Wed, 07 Mar 2012 18:17:59 -0800 (PST) Received: from [192.168.1.128] ([115.195.152.123]) by mx.google.com with ESMTPS id il8sm367771obc.18.2012.03.07.18.17.56 (version=SSLv3 cipher=OTHER); Wed, 07 Mar 2012 18:17:58 -0800 (PST) Message-ID: <4F5816EE.4050908@gmail.com> Date: Thu, 08 Mar 2012 02:18:00 -0000 From: asmwarrior User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Doug Evans CC: gdb-patches@sourceware.org, Chris Sutcliffe Subject: Re: [windows] patch to set breakpoint in a dll References: <4F54D758.8020508@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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-03/txt/msg00252.txt.bz2 On 2012-3-8 2:46, Doug Evans wrote: > The patch has a few nits that need to be fixed, but I like the idea: Hi, Doug, Thanks for the reply. > have find_and_open_source consistently return the canonicalized path. > However, openp (called by find_and_open_source later on) uses > xfullpath, so for consistency I think that should be used here too > instead of gdb_realpath. > What do others think? By reading the function body of xfullpath, I see that it do more checks. And transfer from gdb_realpath to xfullpath will adding an extra xmalloc and xfree call. BTW: are there any simple way we can quickly check a path is cononicalized or not, because even gdb_realpath have internally call xmalloc and xfree. but once the *fullname is already cononicalized(after the first call of find_and_open_source()), I think we can avoid calling any xmalloc and xfree. Am I right? Yuanhui Zhang