Re: [Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-10-08 Thread Frédéric Riss via lldb-commits
So I should see this on my machine, but I don’t... > On Oct 8, 2019, at 10:06 AM, Shafik Yaghmour via Phabricator > wrote: > > shafik added a comment. > > See the same break on green dragon as well: >

[Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-10-08 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added a comment. See the same break on green dragon as well: http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/2360/testReport/LLDB/SymbolFile_NativePDB/s_constant_cpp/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67520/new/

Re: [Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-10-08 Thread Frédéric Riss via lldb-commits
Taking a look > On Oct 8, 2019, at 9:47 AM, Stella Stamenova via Phabricator > wrote: > > stella.stamenova added a comment. > > It looks like this broke one of the tests on the Windows LLDB bot: > > http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/9628/steps/test/logs/stdio >

[Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-10-08 Thread Stella Stamenova via Phabricator via lldb-commits
stella.stamenova added a comment. It looks like this broke one of the tests on the Windows LLDB bot: http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/9628/steps/test/logs/stdio The bot was already red because of a change from yesterday, so you probably didn't get a notification.

[Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-10-08 Thread Frederic Riss via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG41ff39605ea1: Add pretty printing of Clang bitfield enums (authored by friss). Herald added a project: LLDB. Changed prior to commit: https://reviews.llvm.org/D67520?vs=223705=223877#toc Repository:

[Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-10-08 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. looks good to me Comment at: packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py:44 +# Test that an enum that doesn't match the heuristic we use in +

[Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-10-07 Thread Frederic Riss via Phabricator via lldb-commits
friss updated this revision to Diff 223705. friss marked an inline comment as done. friss added a comment. Add comments to some tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67520/new/ https://reviews.llvm.org/D67520 Files:

[Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-10-07 Thread Frederic Riss via Phabricator via lldb-commits
friss marked 3 inline comments as done. friss added a comment. In D67520#1668494 , @jingham wrote: > (lldb) expr (enum bitfield) whatever > > Be nice to see a test of that to make sure that works through the expression > parser as well. This works now

[Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-10-07 Thread Frederic Riss via Phabricator via lldb-commits
friss updated this revision to Diff 223702. friss added a comment. Added a couple more tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67520/new/ https://reviews.llvm.org/D67520 Files: lit/SymbolFile/DWARF/debug-types-missing-signature.test

[Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-09-16 Thread Frederic Riss via Phabricator via lldb-commits
friss added a comment. In D67520#1670880 , @labath wrote: > This looks like a really useful feature. The code seems fine, but I am > wondering if we should really bail out when encountering a zero enumerator. > It is not uncommon to use a special

[Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-09-16 Thread Fangrui Song via Phabricator via lldb-commits
MaskRay added inline comments. Comment at: source/Symbol/ClangASTContext.cpp:9529 + // in `enum {A, B, ALL = A|B }` we visit ALL first. + std::stable_sort( + values.begin(), values.end(), [](const auto , const auto ) { You can simply sort by magnitude and

[Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-09-16 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. This looks like a really useful feature. The code seems fine, but I am wondering if we should really bail out when encountering a zero enumerator. It is not uncommon to use a special enumerator to mean "none of the above". Lldb does that occasionally

[Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-09-12 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. The code looks fine to me. Comment at: source/Symbol/ClangASTContext.cpp:9502 +++num_enumerators; +if (val == enum_svalue) { + s->PutCString(enumerator->getNameAsString()); Can you put a comment here like: // TADA - we

[Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-09-12 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. Also, since in C++ you can't do: enum bitfield ac = A | C; it's fairly common practice to pass or'ed elements from the enum as an int of some sort. This feature would be really handy in that case, but the way you would get at it is not through frame var (since you

[Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-09-12 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. Your description says that if there are bits not belonging to the enum, you will print them after the enum values are listed. But you don't have a test for that. I thought you were going to use the "nonsense" var for that, but then you didn't... CHANGES SINCE LAST

[Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

2019-09-12 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision. friss added reviewers: jingham, labath. Using enumerators as flags is standard practice. This patch adds support to LLDB to display such enum values symbolically, eg: (E) e1 = A | B If enumerators don't cover the whole value, the remaining bits are displayed as