[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-11-12 Thread Jonas Devlieghere via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG406ad187486b: [lldb/DataFormatters] Display null C++ pointers as nullptr (authored by JDevlieghere). Changed prior to commit: https://reviews.llvm.org/D77153?vs=304614=304983#toc Repository: rG LLVM

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-11-11 Thread Jim Ingham via Phabricator via lldb-commits
jingham accepted this revision. jingham added a comment. It seems weird that even if you had a summary formatter for some pointer type that was trying to print "DANGER WILL ROBINSON" when the pointer value was 0x0, we will override that and print "nullptr" in a C++ context or "nil" in an ObjC

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-11-11 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 304614. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77153/new/ https://reviews.llvm.org/D77153 Files: lldb/include/lldb/Target/Language.h lldb/source/DataFormatters/ValueObjectPrinter.cpp lldb/source/Expression/UserExpression.cpp

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-11-11 Thread Raphael Isemann via Phabricator via lldb-commits
teemperor requested changes to this revision. teemperor added a comment. This revision now requires changes to proceed. A few comments, but otherwise this seems good. Comment at: lldb/include/lldb/Target/Language.h:214 + virtual llvm::StringRef NilReferenceSummaryString() {

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-11-11 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 304415. JDevlieghere added a comment. Fix the C test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77153/new/ https://reviews.llvm.org/D77153 Files: lldb/include/lldb/Target/Language.h lldb/source/DataFormatters/ValueObjectPrinter.cpp

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-11-10 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 304352. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77153/new/ https://reviews.llvm.org/D77153 Files: lldb/include/lldb/Target/Language.h lldb/source/DataFormatters/ValueObjectPrinter.cpp

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-11-10 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. In D77153#2386740 , @shafik wrote: > So this work for primitive types like `int*` etc? No, Jim probably know the details, but this only applies to composite types. CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-11-10 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added a comment. So this work for primitive types like `int*` etc? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77153/new/ https://reviews.llvm.org/D77153 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-11-10 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 304282. JDevlieghere added a comment. - Add fallback for finding the language - Fix tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77153/new/ https://reviews.llvm.org/D77153 Files: lldb/include/lldb/Target/Language.h

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-04-07 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. ValueObjects know their execution context, and so they can get to their frame, if they have one. The language of the frame seems like the best thing to clue off here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-04-06 Thread Frederic Riss via Phabricator via lldb-commits
friss added a comment. This looks like what I'd like to implement, but unfortunately it breaks other tests. Some C tests start printing null pointers as `nullptr` too. I suppose this is because the expression evaluator is always in C++ mode. Is there a way to get the origin type/language of a

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-04-06 Thread Frederic Riss via Phabricator via lldb-commits
friss updated this revision to Diff 255579. friss added a comment. Remove the now useless code in TypeSummary.cpp, and change the C++ implementation of IsNilReference() to return true soemtimes. This breaks other tests though... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-04-06 Thread Frederic Riss via Phabricator via lldb-commits
friss updated this revision to Diff 255571. friss added a comment. Implement null C++ printing at the ValueObjectPrinter level Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77153/new/ https://reviews.llvm.org/D77153 Files:

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-04-02 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D77153#1955829 , @friss wrote: > I was checking whether there is a way to catch null pointer before a type > summary is even chosen. And found out that such logic exists, but only for > Objective-C. Languages have a

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-04-01 Thread Frederic Riss via Phabricator via lldb-commits
friss added a comment. I was checking whether there is a way to catch null pointer before a type summary is even chosen. And found out that such logic exists, but only for Objective-C. Languages have a `IsNilReference()` virtual method that can tell whether a `ValueObject` is a nil reference.

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-04-01 Thread Frederic Riss via Phabricator via lldb-commits
friss added a comment. In D77153#1954154 , @labath wrote: > It might be worth mentioning though that the title of the patch is somewhat > misleading -- I believe the `CXX` in `CXXFunctionSummaryFormat` refers to the > language the formatter is

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-04-01 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D77153#1952952 , @friss wrote: > I haven't tested the libstdc++ part, would be great if someone could confirm > this works. This doesn't work work for libstdc++ (I get ``), presumably because the code uses the simple

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-04-01 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. It might be worth mentioning though that the title of the patch is somewhat misleading -- I believe the `CXX` in `CXXFunctionSummaryFormat` refers to the language the formatter is implemented in, not the language of the type itself. So this patch affects all types whose

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-03-31 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik added inline comments. Comment at: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/main.cpp:13 std::basic_string uchar(5, 'a'); +std::string *null = nullptr; S.assign(L"!"); // Set break point at this line.

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-03-31 Thread Frederic Riss via Phabricator via lldb-commits
friss added a comment. I haven't tested the libstdc++ part, would be great if someone could confirm this works. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77153/new/ https://reviews.llvm.org/D77153

[Lldb-commits] [PATCH] D77153: [lldb/DataFormatters] Display null C++ pointers as nullptr

2020-03-31 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision. friss added reviewers: jingham, labath. Herald added a project: LLDB. friss added a comment. I haven't tested the libstdc++ part, would be great if someone could confirm this works. The original motivation for this patch was to display a null std::string pointer as