Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions lldb/test/API/tools/lldb-dap/evaluate/TestDAP_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,7 @@ def run_test_evaluate_expressions(
else:
self.assertEvaluate(
"struct1",
(
re.escape("{foo:15}")
if enableAutoVariableSummaries
else "my_struct @ 0x"
),
(re.escape("{foo:15}") if enableAutoVariableSummaries else "my_struct"),
want_varref=True,
)
self.assertEvaluate(
Expand Down Expand Up @@ -243,11 +239,7 @@ def run_test_evaluate_expressions(
else:
self.assertEvaluate(
"struct1",
(
re.escape("{foo:15}")
if enableAutoVariableSummaries
else "my_struct @ 0x"
),
(re.escape("{foo:15}") if enableAutoVariableSummaries else "my_struct"),
want_type="my_struct",
want_varref=True,
)
Expand Down
10 changes: 5 additions & 5 deletions lldb/test/API/tools/lldb-dap/variables/TestDAP_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def do_test_scopes_variables_setVariable_evaluate(
"result": (
"{x:11, y:22, buffer:{...}}"
if enableAutoVariableSummaries
else "PointType @ 0x"
else "PointType"
)
},
"hasVariablesReference": True,
Expand All @@ -266,7 +266,7 @@ def do_test_scopes_variables_setVariable_evaluate(
"result": (
"{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...}"
if enableAutoVariableSummaries
else "int[16] @ 0x"
else "int[16]"
)
},
"hasVariablesReference": True,
Expand Down Expand Up @@ -502,7 +502,7 @@ def do_test_scopes_and_evaluate_expansion(self, enableAutoVariableSummaries: boo
"result": (
"{x:11, y:22, buffer:{...}}"
if enableAutoVariableSummaries
else "PointType @ 0x"
else "PointType"
)
},
"missing": ["indexedVariables"],
Expand All @@ -514,7 +514,7 @@ def do_test_scopes_and_evaluate_expansion(self, enableAutoVariableSummaries: boo
"result": (
"{x:11, y:22, buffer:{...}}"
if enableAutoVariableSummaries
else "PointType @ 0x"
else "PointType"
)
},
"missing": ["indexedVariables"],
Expand All @@ -526,7 +526,7 @@ def do_test_scopes_and_evaluate_expansion(self, enableAutoVariableSummaries: boo
"result": (
"{x:11, y:22, buffer:{...}}"
if enableAutoVariableSummaries
else "PointType @ 0x"
else "PointType"
)
},
"missing": ["indexedVariables"],
Expand Down
9 changes: 2 additions & 7 deletions lldb/tools/lldb-dap/JSONUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -814,13 +814,8 @@ VariableDescription::VariableDescription(lldb::SBValue v,
os_display_value << *effective_summary;

// As last resort, we print its type and address if available.
} else {
if (!raw_display_type_name.empty()) {
os_display_value << raw_display_type_name;
lldb::addr_t address = v.GetLoadAddress();
if (address != LLDB_INVALID_ADDRESS)
os_display_value << " @ " << llvm::format_hex(address, 0);
}
} else if (!raw_display_type_name.empty()) {
os_display_value << raw_display_type_name;
}
}

Expand Down
Loading