Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: asmwarrior <asmwarrior@gmail.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/commit] Improve gdb_realpath for Windows hosts
Date: Tue, 27 Dec 2011 12:40:00 -0000	[thread overview]
Message-ID: <4EF9B94C.7030204@gmail.com> (raw)
In-Reply-To: <1324574084-7971-1-git-send-email-brobecker@adacore.com>

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



  parent reply	other threads:[~2011-12-27 12:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-22 17:31 Joel Brobecker
2011-12-22 17:59 ` Eli Zaretskii
2011-12-22 18:16   ` Joel Brobecker
2011-12-27  4:11 ` Checked in: " Joel Brobecker
2011-12-27 12:40 ` asmwarrior [this message]
2011-12-27 13:47   ` Joel Brobecker
2011-12-27 14:00     ` asmwarrior
2011-12-27 14:12     ` asmwarrior
2011-12-27 14:35       ` Joel Brobecker
2011-12-27 16:26         ` asmwarrior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EF9B94C.7030204@gmail.com \
    --to=asmwarrior@gmail.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox