From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15005 invoked by alias); 27 Dec 2011 12:22:07 -0000 Received: (qmail 14993 invoked by uid 22791); 27 Dec 2011 12:22:05 -0000 X-SWARE-Spam-Status: No, hits=-1.5 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-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Dec 2011 12:21:51 +0000 Received: by iacb35 with SMTP id b35so21843357iac.0 for ; Tue, 27 Dec 2011 04:21:50 -0800 (PST) Received: by 10.42.148.136 with SMTP id r8mr29297959icv.1.1324988509515; Tue, 27 Dec 2011 04:21:49 -0800 (PST) Received: from [192.168.1.103] ([218.109.117.104]) by mx.google.com with ESMTPS id l28sm89546541ibc.3.2011.12.27.04.21.46 (version=SSLv3 cipher=OTHER); Tue, 27 Dec 2011 04:21:48 -0800 (PST) Message-ID: <4EF9B94C.7030204@gmail.com> Date: Tue, 27 Dec 2011 12:40:00 -0000 From: asmwarrior User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Joel Brobecker CC: gdb-patches@sourceware.org Subject: Re: [RFA/commit] Improve gdb_realpath for Windows hosts References: <1324574084-7971-1-git-send-email-brobecker@adacore.com> In-Reply-To: <1324574084-7971-1-git-send-email-brobecker@adacore.com> 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: 2011-12/txt/msg00838.txt.bz2 On 2011-12-23 1:14, Joel Brobecker wrote: > Hello, > > I noticed that inserting a breakpoint on Windows hosts > often does not work when the linespec involves a filename > with its full path. For instance: > > (gdb) b c:/some/double/slashes/dir/foo.c:4 > No source file named c:/some/double/slashes/dir/foo.c:4. > (gdb) b c:\some\double\slashes\dir\foo.c:4 > No source file named c:\some\double\slashes\dir\foo.c:4. > > The problem in this case comes from the fact that the compiler > produced some debugging info where the filename had double > backslaces (weird), as in `c:\\some\\double\\slashes\\dir'. > > On Unix platforms, this wouldn't be a problem, because gdb_realpath > takes care of normalizing the path. But on windows, the implementation > is just an xstrdup. > > This fixes the problem by enhancing gdb_realpath on Windows hosts. > The code is inspired from libiberty's lrealpath. I decided to > continue duplicating part of lrealpath rather than replacing > everything by a call to lrealpath because I think that we actually > want something slightly different: after normalizing the path, > lrealpath then lowercases it. This is not idea of GDB, because > it prevents us from displaying filenames using the correct casing. > > gdb/ChangeLog: > > * utils.c (gdb_realpath): Add better support for Windows hosts. > > Tested on x86-windows. Any objection to this? There is a performance > cost, but this is just on par with what we do on Unix hosts, so > I assume it's OK. > > Thanks, Someone said that "MAX_PATH" is not enough about several months ago when we were discussing some breakpoint issue see: http://sourceware.org/ml/gdb/2011-06/msg00101.html asmwarrior