[Lldb-commits] [PATCH] Fix break-insert command on Windows.

Zachary Turner zturner at google.com
Wed Feb 4 07:51:31 PST 2015


This is due to a change i made recently to allow natural windows paths.
Just use only 1 backslash on command line, not 2.

b F:\work\demos\main.c:14
On Wed, Feb 4, 2015 at 7:07 AM Hafiz Abid Qadeer <abidh.haq at gmail.com>
wrote:

> Hi Greg,
> Thanks for the review. I think I found the real problem now.
> When FileSpec::Normalize is given this path with \\ in it, it ends up
> changing it to //. But there are still 2 / in it.
>
> Before: F:\\work\\demos\\main.c
> After: F://work//demos//main.c
>
> This then fails comparison in FileSpec::Equals as the path stored in the
> symbols have one /.
>
> I tried adding the following in the Normalize after std::replace call and
> it solved the problem.
>
>   auto iter = std::unique ( path.begin(), path.end(),
>                              []( char &c1, char &c2 ){
>                                 return (c1 == '/' && c2 == '/');});
>   path.erase(iter, path.end() );
>
> Does this look ok to you? Please note that this problem also manifest if
> you try the following from command line.
> b F:\\work\\demos\\main.c:14
>
>
> http://reviews.llvm.org/D7379
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150204/5f750462/attachment.html>


More information about the lldb-commits mailing list