[cfe-dev] clang++ r235810: gdb doesn't enter some C++ functions, libcxx-pretty-printers don't work, misses signed/unsigned comparisons, etc etc

Yaron Keren yaron.keren at gmail.com
Sat Apr 25 22:31:14 PDT 2015


There was a discussion about the LLVM pretty-printers, the problem was the
GPL license.


2015-04-26 5:16 GMT+03:00 Yuri <yuri at rawbw.com>:

> I noticed that clang++ produces code in which gdb doesn't enter some
> functions, when clang-3.4.1 didn't have such problem. All compiled with -g,
> and no -O options
>
> Additionally, STL containers aren't printed with pretty-printers. Is this
> not the right git repository location
> https://github.com/koutheir/libcxx-pretty-printers ?
>
> gcc compiled code is free of both problems.
>
> Additionally, gcc found the problem of signed vs. unsigned comparison:
> int i;
> vector<...> v;
> if (i >= v.size())   // <==== **** Here gcc finds the problem, and clang
> doesn't, as I think it should
>
> Also, gcc found that 'memcpy' not defined (#include <string.h> was really
> missing). Same with 'close' function and missing header unistd.h. I doubt
> that headers change depending on compiler. Not sure what to think here, but
> g++ seems to be more right than clang++.
>
> gdb-7.8.2, FreeBSD 10.1
> plain C++ code, compiler with -Wall -g -std=c++11 and linked with -g
>
> BTW, a long while ago I reported the bug that llvm produces clearly wrong
> debug info, with a very short and particular test case, and you just never
> fixed this, in "no comment" style. This debug info problem here with C++
> might be directly related to that.
>
> Yuri
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150426/dc833a86/attachment.html>


More information about the cfe-dev mailing list