ashgti wrote:
Sounds good to me
https://github.com/llvm/llvm-project/pull/77026
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
walter-erquinigo wrote:
I'm okay with anything that ensures hovering is fast.
https://github.com/llvm/llvm-project/pull/77026
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
labath wrote:
Thanks for checking this out.
> I just checked and I'm not seeing the hover's in the same format as they were
> when I made the pull request. The expression context should still have the
> expanded forms though for example:
>
ashgti wrote:
I just checked and I'm not seeing the hover's in the same format as they were
when I made the pull request. The expression context should still have the
expanded forms though for example:
https://github.com/llvm/llvm-project/assets/22535/28db4adc-d488-44ff-8d99-78966e0e0e05;>
I
labath wrote:
Thanks for checking this out. I'll try to whip something up tomorrow.
https://github.com/llvm/llvm-project/pull/77026
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
walter-erquinigo wrote:
I don't think anything has changed on VSCode proper. I've just verified I have
the same experience as you. Given what you said, I'm in favor of reverting this
or at least gating this feature under a json initialization option until the
original author can look at this.
labath wrote:
I'm currently optimizing our data formatters for some fairly complex data
structures, and I've ran into something I don't understand. My DAP packet
sequence for a hover request consists of two (mostly redundant) packets:
```
-->
Content-Length: 114
{
"arguments": {
https://github.com/DavidGoldman closed
https://github.com/llvm/llvm-project/pull/77026
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/clayborg approved this pull request.
https://github.com/llvm/llvm-project/pull/77026
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -1210,15 +1210,16 @@ bool SBValue::GetDescription(SBStream ) {
ValueLocker locker;
lldb::ValueObjectSP value_sp(GetSP(locker));
- if (value_sp) {
-DumpValueObjectOptions options;
-options.SetUseDynamicType(m_opaque_sp->GetUseDynamic());
-
@@ -405,6 +405,9 @@ struct VariableDescription {
/// Create a JSON object that represents these extensions to the DAP variable
/// response.
llvm::json::Object GetVariableExtensionsJSON();
+
+ /// Returns a description of the value appropraite for the specified context.
@@ -173,21 +173,21 @@ TryCreateAutoSummaryForContainer(lldb::SBValue ) {
lldb::SBValue child = v.GetChildAtIndex(i);
if (llvm::StringRef name = child.GetName(); !name.empty()) {
- llvm::StringRef value;
+ llvm::StringRef desc;
if (llvm::StringRef
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/77026
>From 56d1520f2ce7eb9a9f0c5b5c199deefab15dadfa Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 4 Jan 2024 15:42:35 -0800
Subject: [PATCH] [lldb-dap] Updating VariableDescription to use
GetDescription()
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/77026
>From 52d6dc8f26477b8fba839194ac1485274312a865 Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 4 Jan 2024 15:42:35 -0800
Subject: [PATCH] [lldb-dap] Updating VariableDescription to use
GetDescription()
@@ -1210,15 +1210,16 @@ bool SBValue::GetDescription(SBStream ) {
ValueLocker locker;
lldb::ValueObjectSP value_sp(GetSP(locker));
- if (value_sp) {
-DumpValueObjectOptions options;
-options.SetUseDynamicType(m_opaque_sp->GetUseDynamic());
-
@@ -1210,15 +1210,16 @@ bool SBValue::GetDescription(SBStream ) {
ValueLocker locker;
lldb::ValueObjectSP value_sp(GetSP(locker));
- if (value_sp) {
-DumpValueObjectOptions options;
-options.SetUseDynamicType(m_opaque_sp->GetUseDynamic());
-
@@ -173,21 +173,21 @@ TryCreateAutoSummaryForContainer(lldb::SBValue ) {
lldb::SBValue child = v.GetChildAtIndex(i);
if (llvm::StringRef name = child.GetName(); !name.empty()) {
- llvm::StringRef value;
+ llvm::StringRef desc;
if (llvm::StringRef
@@ -405,6 +405,9 @@ struct VariableDescription {
/// Create a JSON object that represents these extensions to the DAP variable
/// response.
llvm::json::Object GetVariableExtensionsJSON();
+
+ /// Returns a description of the value appropraite for the specified context.
ashgti wrote:
> That will work nicely.
Done, the latest revision will only use the description for hovers and repl
contexts.
https://github.com/llvm/llvm-project/pull/77026
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/77026
>From 7656af47e058aa7101504cb31aaa067178110351 Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 4 Jan 2024 15:42:35 -0800
Subject: [PATCH 1/6] [lldb-dap] Updating VariableDescription to use
ashgti wrote:
Sorry about the spam, I synced my branch and it looks like the pull request
added reviewers from all the patches.
https://github.com/llvm/llvm-project/pull/77026
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
github-actions[bot] wrote:
:warning: Python code formatter, darker found issues in your code. :warning:
You can test this locally with the following command:
``bash
darker --check --diff -r
241fe83704476f81e3438e32b6d988ea123e624d...d8eb78e220b2127b78cee2868daddbe57ae2c5c8
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/77026
>From 7656af47e058aa7101504cb31aaa067178110351 Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 4 Jan 2024 15:42:35 -0800
Subject: [PATCH 1/5] [lldb-dap] Updating VariableDescription to use
clayborg wrote:
> > Is there a way we can tell that the request is from the console and only
> > enable this feature if we are going to dump it to the debug console?
>
> Yea, the DAP has a context we can use to limit this
>
ashgti wrote:
> Is there a way we can tell that the request is from the console and only
> enable this feature if we are going to dump it to the debug console?
Yea, the DAP has a context we can use to limit this
walter-erquinigo wrote:
Now that I think of it, it would be really nice if GetDescription() could get a
`one_line` flag that prints the description as a single line. Then the
rendering will be much better on vscode, because we already dump the children
of each object anyway.
clayborg wrote:
Is there a way we can tell that the request is from the console and only enable
this feature if we are going to dump it to the debug console?
https://github.com/llvm/llvm-project/pull/77026
___
lldb-commits mailing list
clayborg wrote:
> > Looks fine to me. Can we add a test?
>
> Updated the existing tests to check the adjusted format.
>
> One issue I did notice with tests is that the response to an expression will
> include a response are automatically persisted by
> `SBValue::GetDescription()`, so you
@@ -135,6 +135,21 @@ std::vector GetStrings(const
llvm::json::Object *obj,
return strs;
}
+static std::string GetDescriptionTrimmed(lldb::SBValue ) {
+ lldb::SBStream stream;
+ if (!value.GetDescription(stream)) {
+return "";
+ }
ashgti wrote:
@@ -135,6 +135,21 @@ std::vector GetStrings(const
llvm::json::Object *obj,
return strs;
}
+static std::string GetDescriptionTrimmed(lldb::SBValue ) {
ashgti wrote:
Done.
https://github.com/llvm/llvm-project/pull/77026
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/77026
>From 7656af47e058aa7101504cb31aaa067178110351 Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 4 Jan 2024 15:42:35 -0800
Subject: [PATCH 1/4] [lldb-dap] Updating VariableDescription to use
@@ -135,6 +135,21 @@ std::vector GetStrings(const
llvm::json::Object *obj,
return strs;
}
+static std::string GetDescriptionTrimmed(lldb::SBValue ) {
+ lldb::SBStream stream;
+ if (!value.GetDescription(stream)) {
+return "";
+ }
walter-erquinigo
@@ -135,6 +135,21 @@ std::vector GetStrings(const
llvm::json::Object *obj,
return strs;
}
+static std::string GetDescriptionTrimmed(lldb::SBValue ) {
walter-erquinigo wrote:
add a comment for this function mentioning that this returns an empty string if
https://github.com/walter-erquinigo edited
https://github.com/llvm/llvm-project/pull/77026
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/walter-erquinigo approved this pull request.
just two minor things left, but otherwise LGTM
https://github.com/llvm/llvm-project/pull/77026
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
@@ -242,19 +254,57 @@ def do_test_scopes_variables_setVariable_evaluate(
},
"pt": {
"equals": {"type": "PointType"},
-"startswith": {
-"result": "{x:11, y:22}"
+"equals": {
+
@@ -242,19 +254,57 @@ def do_test_scopes_variables_setVariable_evaluate(
},
"pt": {
"equals": {"type": "PointType"},
-"startswith": {
-"result": "{x:11, y:22}"
+"equals": {
+
@@ -135,6 +135,18 @@ std::vector GetStrings(const
llvm::json::Object *obj,
return strs;
}
+static std::string GetDescriptionTrimmed(lldb::SBValue ) {
+ lldb::SBStream stream;
+ value.GetDescription(stream);
ashgti wrote:
Updated `bool
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/77026
>From 7656af47e058aa7101504cb31aaa067178110351 Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 4 Jan 2024 15:42:35 -0800
Subject: [PATCH 1/3] [lldb-dap] Updating VariableDescription to use
@@ -242,19 +254,57 @@ def do_test_scopes_variables_setVariable_evaluate(
},
"pt": {
"equals": {"type": "PointType"},
-"startswith": {
-"result": "{x:11, y:22}"
+"equals": {
+
@@ -135,6 +135,18 @@ std::vector GetStrings(const
llvm::json::Object *obj,
return strs;
}
+static std::string GetDescriptionTrimmed(lldb::SBValue ) {
+ lldb::SBStream stream;
+ value.GetDescription(stream);
walter-erquinigo wrote:
The method `bool
ashgti wrote:
cc @walter-erquinigo since this looks like it has similar overlap to the auto
generated summeries.
https://github.com/llvm/llvm-project/pull/77026
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
ashgti wrote:
> Looks fine to me. Can we add a test?
Updated the existing tests to check the adjusted format.
One issue I did notice with tests is that the response to an expression will
include a response are automatically persisted by `SBValue::GetDescription()`,
so you will see the value
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/77026
>From 7656af47e058aa7101504cb31aaa067178110351 Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 4 Jan 2024 15:42:35 -0800
Subject: [PATCH 1/2] [lldb-dap] Updating VariableDescription to use
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 241fe83704476f81e3438e32b6d988ea123e624d
4fe831e0bb779a3bda255033e475dcf3979daa61 --
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/77026
>From 7656af47e058aa7101504cb31aaa067178110351 Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 4 Jan 2024 15:42:35 -0800
Subject: [PATCH 1/2] [lldb-dap] Updating VariableDescription to use
https://github.com/clayborg commented:
Looks fine to me. Can we add a test?
https://github.com/llvm/llvm-project/pull/77026
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: John Harrison (ashgti)
Changes
When generating a `display_value` for a variable the current approach calls
`SBValue::GetValue()` and `SBValue::GetSummary()` to generate a `display_value`
for the `SBValue`. However, there are cases where
https://github.com/ashgti created
https://github.com/llvm/llvm-project/pull/77026
When generating a `display_value` for a variable the current approach calls
`SBValue::GetValue()` and `SBValue::GetSummary()` to generate a `display_value`
for the `SBValue`. However, there are cases where both
49 matches
Mail list logo