Skip to content

Commit 19a0f65

Browse files
author
git apple-llvm automerger
committed
Merge commit '317403d705ac' from llvm.org/release/21.x into stable/21.x
2 parents 47db400 + 317403d commit 19a0f65

File tree

7 files changed

+47
-8
lines changed

7 files changed

+47
-8
lines changed

lldb/source/Target/TargetProperties.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ let Definition = "target_experimental" in {
3838
DefaultTrue,
3939
Desc<"Enables caching of task pointers inside the swift tasks plugin">;
4040
def UseDIL : Property<"use-DIL", "Boolean">,
41-
Global, DefaultFalse,
42-
Desc<"If true, use the alternative DIL implementation for frame variable evaluation.">;
41+
Global, DefaultTrue,
42+
Desc<"If true, use the DIL implementation for frame variable evaluation.">;
4343
}
4444

4545
let Definition = "target" in {

lldb/source/ValueObject/DILEval.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ Interpreter::Visit(const MemberOfNode *node) {
303303
}
304304
}
305305

306-
if (field_obj && field_obj->GetName() == node->GetFieldName()) {
306+
if (field_obj) {
307307
if (m_use_dynamic != lldb::eNoDynamicValues) {
308308
lldb::ValueObjectSP dynamic_val_sp =
309309
field_obj->GetDynamicValue(m_use_dynamic);

lldb/test/API/commands/frame/var-dil/basics/QualifiedId/TestFrameVarDILQualifiedId.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,17 @@ def test_frame_var(self):
2929
self.expect_var_path("ns::i", value="1")
3030
self.expect_var_path("::ns::ns::i", value="2")
3131
self.expect_var_path("ns::ns::i", value="2")
32+
33+
self.expect_var_path("foo", value="1")
34+
self.expect_var_path("::(anonymous namespace)::foo", value="13")
35+
self.expect_var_path("(anonymous namespace)::foo", value="13")
36+
self.expect_var_path("ns1::(anonymous namespace)::foo", value="5")
37+
self.expect_var_path(
38+
"(anonymous namespace)::ns2::(anonymous namespace)::foo",
39+
value="7",
40+
)
41+
self.expect_var_path("::ns1::(anonymous namespace)::foo", value="5")
42+
self.expect_var_path(
43+
"::(anonymous namespace)::ns2::(anonymous namespace)::foo",
44+
value="7",
45+
)

lldb/test/API/commands/frame/var-dil/basics/QualifiedId/main.cpp

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,26 @@ int i = 2;
1010

1111
} // namespace ns
1212

13+
namespace {
14+
int foo = 13;
15+
}
16+
17+
namespace ns1 {
18+
namespace {
19+
int foo = 5;
20+
}
21+
} // namespace ns1
22+
23+
namespace {
24+
namespace ns2 {
25+
namespace {
26+
int foo = 7;
27+
}
28+
} // namespace ns2
29+
} // namespace
30+
1331
int main(int argc, char **argv) {
32+
int foo = 1;
1433

15-
return 0; // Set a breakpoint here
34+
return foo + ::foo + ns1::foo + ns2::foo; // Set a breakpoint here
1635
}

lldb/test/API/tools/lldb-dap/evaluate/TestDAP_evaluate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def run_test_evaluate_expressions(
131131
self.assertEvaluateFailure("a_function(1)")
132132
self.assertEvaluateFailure("var2 + struct1.foo")
133133
self.assertEvaluateFailure("foo_func")
134-
self.assertEvaluateFailure("foo_var")
134+
self.assertEvaluate("foo_var", "44")
135135

136136
# Expressions at breakpoint 2, which is an anonymous block
137137
self.continue_to_breakpoint(breakpoint_2)
@@ -169,7 +169,7 @@ def run_test_evaluate_expressions(
169169
self.assertEvaluateFailure("a_function(1)")
170170
self.assertEvaluateFailure("var2 + struct1.foo")
171171
self.assertEvaluateFailure("foo_func")
172-
self.assertEvaluateFailure("foo_var")
172+
self.assertEvaluate("foo_var", "44")
173173

174174
# Expressions at breakpoint 3, which is inside a_function
175175
self.continue_to_breakpoint(breakpoint_3)
@@ -195,7 +195,7 @@ def run_test_evaluate_expressions(
195195
self.assertEvaluateFailure("a_function(1)")
196196
self.assertEvaluateFailure("list + 1")
197197
self.assertEvaluateFailure("foo_func")
198-
self.assertEvaluateFailure("foo_var")
198+
self.assertEvaluate("foo_var", "44")
199199

200200
# Now we check that values are updated after stepping
201201
self.continue_to_breakpoint(breakpoint_4)

lldb/test/Shell/SymbolFile/DWARF/TestDedupWarnings.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# RUN: %clang_host -fmodules -Xclang -fmodules-cache-path=%t/cache -I%t -g -gmodules %t/b.m -o %t/b.o -c
1616
# RUN: %clang_host %t/a.o %t/b.o -o %t/a.out
1717
# RUN: rm -rf %t/cache
18-
# RUN: %lldb %t/a.out -o "b main" -o run -o "p a" -o "p b" -o q 2>&1 | FileCheck %s
18+
# RUN: %lldb %t/a.out -o "b main" -o run -o "expr a" -o "expr b" -o q 2>&1 | FileCheck %s
1919
# CHECK: {{[ab]}}.o{{.*}}/cache/{{.*}}/C-{{.*}}.pcm' does not exist
2020
# CHECK-NOT: /cache/{{.*}}/C-{.*}.pcm' does not exist
2121
# CHECK: {{[ab]}}.o{{.*}}/cache/{{.*}}/C-{{.*}}.pcm' does not exist

llvm/docs/ReleaseNotes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,19 @@ Changes to LLDB
313313
stop reason = SIGSEGV: sent by tkill system call (sender pid=649752, uid=2667987)
314314
```
315315
* ELF Cores can now have their siginfo structures inspected using `thread siginfo`.
316+
* LLDB now uses
317+
[DIL](https://discourse.llvm.org/t/rfc-data-inspection-language/69893) as the
318+
default implementation for 'frame variable'. This should not change the
319+
behavior of 'frame variable' at all, at this time. To revert to using the
320+
old implementation use: `settings set target.experimental.use-DIL false`.
316321
* Disassembly of unknown instructions now produces `<unknown>` instead of
317322
nothing at all
318323
* Changed the format of opcode bytes to match llvm-objdump when disassembling
319324
RISC-V code with `disassemble`'s `--byte` option.
320325
* LLDB added native support for the Model Context Protocol (MCP). An MCP
321326
server can be started with the `protocol-server start MCP` command.
322327

328+
323329
### Changes to lldb-dap
324330

325331
* Breakpoints can now be set for specific columns within a line.

0 commit comments

Comments
 (0)