[Lldb-commits] [PATCH] D13350: [lldb] Fix evaluation of global variables

2015-10-01 Thread Eugene Leviant via lldb-commits
evgeny777 created this revision. evgeny777 added reviewers: clayborg, paulherman. evgeny777 added subscribers: lldb-commits, KLapshin. Current revision contains bug, related to evaluation of global variables. Imagine you have the following code ``` int _g = 1; int func(void) { int _g = 2;

Re: [Lldb-commits] [PATCH] D13350: [lldb] Fix evaluation of qualified global variables

2015-10-01 Thread Eugene Leviant via lldb-commits
evgeny777 added a comment. Thanks for your comments. I will certainly add the test cases to lldb. I was just curious if this is correct way of fixing the issue. Besides test case what else has to be done? Separate review for changes in clang linked to this review? http://reviews.llvm.org/D1335

Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range

2015-10-02 Thread Eugene Leviant via lldb-commits
evgeny777 added inline comments. Comment at: tools/lldb-mi/MICmnLLDBUtilSBValue.cpp:372 @@ +371,3 @@ +CMIUtilString +CMICmnLLDBUtilSBValue::GetValueSummary() const +{ granata.enrico wrote: > I might be missing something, but how is this going to work when an SBVal

Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range

2015-10-02 Thread Eugene Leviant via lldb-commits
evgeny777 added inline comments. Comment at: include/lldb/API/SBTypeSummary.h:125 @@ +124,3 @@ + +bool DoesPrintValue(const lldb::SBValue &value) const; + granata.enrico wrote: > Can you please change this to > > bool > DoesPrintValue (lldb::SBValue value

Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range

2015-10-02 Thread Eugene Leviant via lldb-commits
evgeny777 updated this revision to Diff 36341. evgeny777 added a comment. Changed DoesPrintValue() function prototype http://reviews.llvm.org/D13058 Files: include/lldb/API/SBTypeSummary.h source/API/SBTypeSummary.cpp test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py test/tools/lldb-

Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range

2015-10-02 Thread Eugene Leviant via lldb-commits
evgeny777 added a comment. Thanks for a good point. MI formatting refactoring will likely come soon as a separate review http://reviews.llvm.org/D13058 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

Re: [Lldb-commits] [PATCH] D13577: Fix build with python disabled after r249597

2015-10-08 Thread Eugene Leviant via lldb-commits
evgeny777 accepted this revision. evgeny777 added a comment. This revision is now accepted and ready to land. Lgtm Repository: rL LLVM http://reviews.llvm.org/D13577 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/

[Lldb-commits] [PATCH] D13657: [lldb] char summary provider

2015-10-12 Thread Eugene Leviant via lldb-commits
evgeny777 created this revision. evgeny777 added a reviewer: granata.enrico. evgeny777 added subscribers: lldb-commits, KLapshin. This patch enables type summary for 'char' type. Let's suppose we have: **char c = 'h'; ** Current revision evaluates c as: **(char) $0 = 'h'** After this patch (10

Re: [Lldb-commits] [PATCH] D13657: [lldb] char summary provider

2015-10-12 Thread Eugene Leviant via lldb-commits
evgeny777 added a comment. Ok, I see MI historically has this code + value printing and test cases covering it. By the way char16_t and char32_t summary providers also print code and value, in case you don't know. http://reviews.llvm.org/D13657 ___

Re: [Lldb-commits] [PATCH] D13657: [lldb] char summary provider

2015-10-13 Thread Eugene Leviant via lldb-commits
evgeny777 added a comment. I thought this would be a nice feature, as I'm long term gdb user and gdb also evaluates chars as code and value. MI private category sounds good, but I have concerns on implementing it properly. For instance SBTypeSummary can create string, function and script summar

Re: [Lldb-commits] [PATCH] D13657: [lldb] char summary provider

2015-10-13 Thread Eugene Leviant via lldb-commits
evgeny777 added a comment. Yes, I'm interested. Imagine I have: SBTypeSummary::CreateCxxFunctionSummary( ... ) How am I supposed to pass the callback there? Or this should be done by means of introducing some base class, like SBTypeSummaryFormatter and deriving custom formatters from this c

Re: [Lldb-commits] [PATCH] D13657: [lldb] char summary provider

2015-10-14 Thread Eugene Leviant via lldb-commits
evgeny777 updated this revision to Diff 37339. evgeny777 added a comment. Looks like can be done much easier http://reviews.llvm.org/D13657 Files: include/lldb/API/SBTypeSummary.h source/API/SBTypeSummary.cpp Index: source/API/SBTypeSummary.cpp =

Re: [Lldb-commits] [PATCH] D13657: [lldb] char summary provider

2015-10-14 Thread Eugene Leviant via lldb-commits
evgeny777 added a comment. One question: CreateWithCallback and CreateWithSummaryString do not require Python support and can be used with LLDB_DISABLE_PYTHON. May be it makes sense to remove conditional compilation, like it is done here: http://reviews.llvm.org/D13577 Commen

Re: [Lldb-commits] [PATCH] D13657: [lldb] char summary provider

2015-10-14 Thread Eugene Leviant via lldb-commits
evgeny777 added inline comments. Comment at: source/API/SBTypeSummary.cpp:157 @@ +156,3 @@ +SBStream stream; +if (!cb(valobj.GetSP(), &opt, stream)) +return false; granata.enri

Re: [Lldb-commits] [PATCH] D13657: [lldb] char summary provider

2015-10-15 Thread Eugene Leviant via lldb-commits
evgeny777 updated this revision to Diff 37487. evgeny777 added a comment. Updated: callback is checked for null + explicit construction http://reviews.llvm.org/D13657 Files: include/lldb/API/SBTypeSummary.h source/API/SBTypeSummary.cpp Index: source/API/SBTypeSummary.cpp ==

[Lldb-commits] [PATCH] D13799: [lldb-mi] display summary for simple types + refactor (use lldb formatting for all cases)

2015-10-16 Thread Eugene Leviant via lldb-commits
evgeny777 created this revision. evgeny777 added reviewers: granata.enrico, ki.stfu, abidh. evgeny777 added subscribers: lldb-commits, KLapshin. Current revision do not use lldb type summaries for simple types with no children (like function pointers). So this patch makes MI use lldb type summar

Re: [Lldb-commits] [PATCH] D13799: [lldb-mi] display summary for simple types + refactor (use lldb formatting for all cases)

2015-10-16 Thread Eugene Leviant via lldb-commits
evgeny777 added inline comments. Comment at: tools/lldb-mi/MICmnLLDBDebugger.cpp:835 @@ +834,3 @@ + +if (!MI_add_summary(miCategory, "char", MI_char_summary_provider, +lldb::eTypeOptionHideValue | lldb::eTypeOptionSkipPointers)) granat

Re: [Lldb-commits] [PATCH] D13799: [lldb-mi] display summary for simple types + refactor (use lldb formatting for all cases)

2015-10-16 Thread Eugene Leviant via lldb-commits
evgeny777 added inline comments. Comment at: tools/lldb-mi/MICmnLLDBDebugger.cpp:37 @@ +36,3 @@ +return false; +stream.Printf("%d %s", (int)value.GetValueAsSigned(), value.GetValue()); +return true; granata.enrico wrote: > I would definitely not st

Re: [Lldb-commits] [PATCH] D13799: [lldb-mi] display summary for simple types + refactor (use lldb formatting for all cases)

2015-10-19 Thread Eugene Leviant via lldb-commits
evgeny777 added inline comments. Comment at: tools/lldb-mi/MICmnLLDBUtilSBValue.cpp:126 @@ -125,12 +125,3 @@ { -if (m_bHandleCharType && IsCharType()) -{ -vwrValue = GetSimpleValueChar(); -return MIstatus::success; -} -e

Re: [Lldb-commits] [PATCH] D13799: [lldb-mi] display summary for simple types + refactor (use lldb formatting for all cases)

2015-10-19 Thread Eugene Leviant via lldb-commits
evgeny777 updated this revision to Diff 37733. evgeny777 added a comment. Review updated to reflect Enrico comments regarding signed/unsigned char. Now all character types are evaluated as ASCII code (signed or unsigned) + value. Additional method introduced to SBValue to check if type is signed

Re: [Lldb-commits] [PATCH] D13799: [lldb-mi] display summary for simple types + refactor (use lldb formatting for all cases)

2015-10-19 Thread Eugene Leviant via lldb-commits
evgeny777 added inline comments. Comment at: include/lldb/API/SBValue.h:372 @@ +371,3 @@ +bool +IsIntegerType(bool& is_signed); + granata.enrico wrote: > Greg pointed me to SBType::GetBasicType() - this will return to you one of > > ``` > eBasicTy

Re: [Lldb-commits] [PATCH] D13799: [lldb-mi] display summary for simple types + refactor (use lldb formatting for all cases)

2015-10-20 Thread Eugene Leviant via lldb-commits
evgeny777 updated this revision to Diff 37888. evgeny777 added a comment. Update according to suggestions from granata.enrico http://reviews.llvm.org/D13799 Files: test/tools/lldb-mi/data/TestMiData.py test/tools/lldb-mi/symbol/TestMiSymbol.py tools/lldb-mi/MICmnLLDBDebugger.cpp tools/l

[Lldb-commits] [PATCH] D13947: [lldb-mi] Fix expansion of anonymous structures and unions

2015-10-21 Thread Eugene Leviant via lldb-commits
evgeny777 created this revision. evgeny777 added reviewers: ki.stfu, abidh. evgeny777 added subscribers: lldb-commits, KLapshin. Suppose we have the following type ``` struct S { union { inti1; unsigned u1; }; union { inti2; unsigned u2

[Lldb-commits] [PATCH] D14542: [lldb] Fix name lookup in ClangASTContext

2015-11-10 Thread Eugene Leviant via lldb-commits
evgeny777 created this revision. evgeny777 added a reviewer: clayborg. evgeny777 added subscribers: lldb-commits, KLapshin. The check for already searched namespaces has disappeared from DeclContextFindDeclByName() recently. This breaks variable evaluation in many cases, for example in this one

Re: [Lldb-commits] [PATCH] D14542: [lldb] Fix name lookup in ClangASTContext

2015-11-11 Thread Eugene Leviant via lldb-commits
evgeny777 updated this revision to Diff 39893. evgeny777 added a comment. Added test case http://reviews.llvm.org/D14542 Files: packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py packages/Python/lldbsuite/test/lang/cpp/namespace/main.cpp source/Symbol/ClangASTContext.cpp

[Lldb-commits] [lldb] r253028 - Fix multiple symbol lookup in the same namespace

2015-11-13 Thread Eugene Leviant via lldb-commits
Author: evgeny777 Date: Fri Nov 13 05:00:10 2015 New Revision: 253028 URL: http://llvm.org/viewvc/llvm-project?rev=253028&view=rev Log: Fix multiple symbol lookup in the same namespace Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py lldb/trunk/pack

Re: [Lldb-commits] [PATCH] D13350: [lldb] Fix evaluation of qualified global variables

2015-11-18 Thread Eugene Leviant via lldb-commits
evgeny777 updated this revision to Diff 40497. evgeny777 added a comment. Hi folks! The clang patch has been landed. I've added test cases, so please look at the new patch. Thanks http://reviews.llvm.org/D13350 Files: packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py pack

Re: [Lldb-commits] [PATCH] D13350: [lldb] Fix evaluation of qualified global variables

2015-11-18 Thread Eugene Leviant via lldb-commits
evgeny777 updated this revision to Diff 40508. evgeny777 added a comment. Minor code cleanups http://reviews.llvm.org/D13350 Files: packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py packages/Python/lldbsuite/test/lang/cpp/namespace/main.cpp packages/Python/lldbsuite/test/

Re: [Lldb-commits] [PATCH] D13350: [lldb] Fix evaluation of qualified global variables

2016-09-27 Thread Eugene Leviant via lldb-commits
evgeny777 abandoned this revision. evgeny777 added a comment. This patch is longer valid after more than 9 months on review due to changes in namespace handing in ClangExpressionDeclMap. It probably should be done in a different way, but I don't have time for this now. https://reviews.llvm.org

Re: [Lldb-commits] [PATCH] D15778: [lldb] Ignore breakpoints by default in SBFrame::EvaluateExpression

2016-01-27 Thread Eugene Leviant via lldb-commits
evgeny777 added a comment. Greg, Enrico, Can someone tell if it is possible to modify Python interface this way. Without this modification user breakpoints will be hit when someone evaluates expression and use Python interface. The lldb frontend ignores breakpoints, lldb-mi does not, becauses

Re: [Lldb-commits] [PATCH] D15778: [lldb] Ignore breakpoints by default in SBFrame::EvaluateExpression

2016-01-27 Thread Eugene Leviant via lldb-commits
evgeny777 updated this revision to Diff 46129. http://reviews.llvm.org/D15778 Files: source/API/SBFrame.cpp Index: source/API/SBFrame.cpp === --- source/API/SBFrame.cpp +++ source/API/SBFrame.cpp @@ -1389,6 +1389,7 @@ lld

[Lldb-commits] [lldb] r259185 - Ignore breakpoints by default in SBFrame::EvaluateExpression

2016-01-29 Thread Eugene Leviant via lldb-commits
Author: evgeny777 Date: Fri Jan 29 04:48:11 2016 New Revision: 259185 URL: http://llvm.org/viewvc/llvm-project?rev=259185&view=rev Log: Ignore breakpoints by default in SBFrame::EvaluateExpression Modified: lldb/trunk/source/API/SBFrame.cpp Modified: lldb/trunk/source/API/SBFrame.cpp URL: h

[Lldb-commits] [lldb] r259189 - Fix crash in lldb-mi when stack variable name is nullptr. This always happens when execution stops in try scope with unnamed catch clause

2016-01-29 Thread Eugene Leviant via lldb-commits
Author: evgeny777 Date: Fri Jan 29 06:17:09 2016 New Revision: 259189 URL: http://llvm.org/viewvc/llvm-project?rev=259189&view=rev Log: Fix crash in lldb-mi when stack variable name is nullptr. This always happens when execution stops in try scope with unnamed catch clause Modified: lldb/tru

[Lldb-commits] [PATCH] D16728: [lldb-mi] print real error message in "-data-evaluate-expression"

2016-01-29 Thread Eugene Leviant via lldb-commits
evgeny777 created this revision. evgeny777 added reviewers: abidh, ki.stfu. evgeny777 added a subscriber: lldb-commits. Unlike "-var-create", the "-data-evaluate-expression" command always prints "Could not evaluate expression" when error occurs. http://reviews.llvm.org/D16728 Files: packages

[Lldb-commits] [lldb] r260082 - Show real error message in -data-evaluate-expression

2016-02-08 Thread Eugene Leviant via lldb-commits
Author: evgeny777 Date: Mon Feb 8 04:04:51 2016 New Revision: 260082 URL: http://llvm.org/viewvc/llvm-project?rev=260082&view=rev Log: Show real error message in -data-evaluate-expression Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/variable/TestMiVar.py lldb/trunk/

Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range

2015-09-22 Thread Eugene Leviant via lldb-commits
evgeny777 added a comment. Yes I know about GetValue() and stuff Actually I implemented new method, because I needed TypeSummaryImpl::DoesPrintValue(). In lldb when you evaluate char*, you get both value and summary, for example: 0xdeadbeef "hello" But when you evaluate char[] array, you get ju

Re: [Lldb-commits] [PATCH] D13094: LLDB-MI: Fix assignment operator in CMIUtilString

2015-09-23 Thread Eugene Leviant via lldb-commits
evgeny777 added a comment. Without this change I have to use temporary const char* variable each time I call GetData() GetSummary(), GetValue() and so on It would be nice to be able to do something like this CMIUtilString s = v.GetSummary(); if (!s.empty()) { CMIUtilString v = v.GetValue();

Re: [Lldb-commits] [PATCH] D13094: LLDB-MI: Fix assignment operator in CMIUtilString

2015-09-23 Thread Eugene Leviant via lldb-commits
evgeny777 added a comment. Also in MI empty value and NULL value almost always mean "no output". Checking for NULL everywhere is just not convenient http://reviews.llvm.org/D13094 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lis

Re: [Lldb-commits] [PATCH] D13094: LLDB-MI: Fix assignment operator in CMIUtilString

2015-09-24 Thread Eugene Leviant via lldb-commits
evgeny777 added inline comments. Comment at: tools/lldb-mi/MIUtilString.cpp:41 @@ -40,3 +40,3 @@ CMIUtilString::CMIUtilString(const char *vpData) -: std::string(vpData) +: std::string(vpData != nullptr ? vpData : "") { ki.stfu wrote: > Not sure about use

Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range

2015-09-24 Thread Eugene Leviant via lldb-commits
evgeny777 updated this revision to Diff 35607. evgeny777 added a comment. Revised according to suggestions from granta.enrico and ki.stfu http://reviews.llvm.org/D13058 Files: include/lldb/API/SBTypeSummary.h source/API/SBTypeSummary.cpp test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.p

Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range

2015-09-24 Thread Eugene Leviant via lldb-commits
evgeny777 updated this revision to Diff 35618. evgeny777 added a comment. Revised, removed dependencies from http://reviews.llvm.org/D13094 http://reviews.llvm.org/D13058 Files: include/lldb/API/SBTypeSummary.h source/API/SBTypeSummary.cpp test/tools/lldb-mi/variable/TestMiGdbSetShowPrint

Re: [Lldb-commits] [PATCH] D13094: LLDB-MI: Fix assignment operator in CMIUtilString

2015-09-24 Thread Eugene Leviant via lldb-commits
evgeny777 updated this revision to Diff 35620. evgeny777 added a comment. Revised, now contains fix for just assignment operation The "if(vpRhs != nullptr)" was removed to provide the same behaviour for a) CMIUtilString s = (char*)nullptr; b) s = (char*)nullptr; http://reviews.llvm.org/D13094

Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range

2015-09-25 Thread Eugene Leviant via lldb-commits
evgeny777 added inline comments. Comment at: tools/lldb-mi/MICmnLLDBUtilSBValue.h:58 @@ -57,3 +57,3 @@ bool GetCompositeValue(const bool vbPrintFieldNames, CMICmnMIValueTuple &vwrMiValueTuple, const MIuint vnDepth = 1) const; - +bool TryGetValueSummary(CMIUtilString &vrV

Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range

2015-09-25 Thread Eugene Leviant via lldb-commits
evgeny777 added inline comments. Comment at: tools/lldb-mi/MICmnLLDBUtilSBValue.cpp:191-193 @@ -182,1 +190,5 @@ { +CMIUtilString summary; +if (TryGetValueSummary(summary)) +return summary; + ki.stfu wrote: > ``` > const CMIUtilString summary = Get

Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range

2015-09-25 Thread Eugene Leviant via lldb-commits
evgeny777 added inline comments. Comment at: source/API/SBTypeSummary.cpp:290 @@ +289,3 @@ +bool +SBTypeSummary::DoesPrintValue(const SBValue& value) +{ ki.stfu wrote: > ditto I used clang-format with style file taken from lldb directory here, but formatting didn

Re: [Lldb-commits] [PATCH] D13058: LLDB-MI: Bug when evaluating strings containing characters from non-ascii range

2015-09-25 Thread Eugene Leviant via lldb-commits
evgeny777 updated this revision to Diff 35725. evgeny777 added a comment. Revised with changes requested by ki.stfu http://reviews.llvm.org/D13058 Files: include/lldb/API/SBTypeSummary.h source/API/SBTypeSummary.cpp test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py test/tools/lldb-mi