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

Hafiz Abid Qadeer abidh.haq at gmail.com
Wed Feb 4 07:05:24 PST 2015


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/






More information about the lldb-commits mailing list