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;
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
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
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
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-
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
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/
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
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
___
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
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
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
=
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
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
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
==
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
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
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
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
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
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
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
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
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
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
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
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
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/
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
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
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
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
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
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
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/
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
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();
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
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
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
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
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
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
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
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
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
46 matches
Mail list logo