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
4 changes: 2 additions & 2 deletions lldb/source/Target/TargetProperties.td
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ let Definition = "target_experimental" in {
Global, DefaultTrue,
Desc<"If true, inject local variables explicitly into the expression text. This will fix symbol resolution when there are name collisions between ivars and local variables. But it can make expressions run much more slowly.">;
def UseDIL : Property<"use-DIL", "Boolean">,
Global, DefaultFalse,
Desc<"If true, use the alternative DIL implementation for frame variable evaluation.">;
Global, DefaultTrue,
Desc<"If true, use the DIL implementation for frame variable evaluation.">;
}

let Definition = "target" in {
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/ValueObject/DILEval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ Interpreter::Visit(const MemberOfNode *node) {
}
}

if (field_obj && field_obj->GetName() == node->GetFieldName()) {
if (field_obj) {
if (m_use_dynamic != lldb::eNoDynamicValues) {
lldb::ValueObjectSP dynamic_val_sp =
field_obj->GetDynamicValue(m_use_dynamic);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,17 @@ def test_frame_var(self):
self.expect_var_path("ns::i", value="1")
self.expect_var_path("::ns::ns::i", value="2")
self.expect_var_path("ns::ns::i", value="2")

self.expect_var_path("foo", value="1")
self.expect_var_path("::(anonymous namespace)::foo", value="13")
self.expect_var_path("(anonymous namespace)::foo", value="13")
self.expect_var_path("ns1::(anonymous namespace)::foo", value="5")
self.expect_var_path(
"(anonymous namespace)::ns2::(anonymous namespace)::foo",
value="7",
)
self.expect_var_path("::ns1::(anonymous namespace)::foo", value="5")
self.expect_var_path(
"::(anonymous namespace)::ns2::(anonymous namespace)::foo",
value="7",
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,26 @@ int i = 2;

} // namespace ns

namespace {
int foo = 13;
}

namespace ns1 {
namespace {
int foo = 5;
}
} // namespace ns1

namespace {
namespace ns2 {
namespace {
int foo = 7;
}
} // namespace ns2
} // namespace

int main(int argc, char **argv) {
int foo = 1;

return 0; // Set a breakpoint here
return foo + ::foo + ns1::foo + ns2::foo; // Set a breakpoint here
}
6 changes: 3 additions & 3 deletions lldb/test/API/tools/lldb-dap/evaluate/TestDAP_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def run_test_evaluate_expressions(
self.assertEvaluateFailure("a_function(1)")
self.assertEvaluateFailure("var2 + struct1.foo")
self.assertEvaluateFailure("foo_func")
self.assertEvaluateFailure("foo_var")
self.assertEvaluate("foo_var", "44")

# Expressions at breakpoint 2, which is an anonymous block
self.continue_to_breakpoint(breakpoint_2)
Expand Down Expand Up @@ -169,7 +169,7 @@ def run_test_evaluate_expressions(
self.assertEvaluateFailure("a_function(1)")
self.assertEvaluateFailure("var2 + struct1.foo")
self.assertEvaluateFailure("foo_func")
self.assertEvaluateFailure("foo_var")
self.assertEvaluate("foo_var", "44")

# Expressions at breakpoint 3, which is inside a_function
self.continue_to_breakpoint(breakpoint_3)
Expand All @@ -195,7 +195,7 @@ def run_test_evaluate_expressions(
self.assertEvaluateFailure("a_function(1)")
self.assertEvaluateFailure("list + 1")
self.assertEvaluateFailure("foo_func")
self.assertEvaluateFailure("foo_var")
self.assertEvaluate("foo_var", "44")

# Now we check that values are updated after stepping
self.continue_to_breakpoint(breakpoint_4)
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/Shell/SymbolFile/DWARF/TestDedupWarnings.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# RUN: %clang_host -fmodules -Xclang -fmodules-cache-path=%t/cache -I%t -g -gmodules %t/b.m -o %t/b.o -c
# RUN: %clang_host %t/a.o %t/b.o -o %t/a.out
# RUN: rm -rf %t/cache
# RUN: %lldb %t/a.out -o "b main" -o run -o "p a" -o "p b" -o q 2>&1 | FileCheck %s
# RUN: %lldb %t/a.out -o "b main" -o run -o "expr a" -o "expr b" -o q 2>&1 | FileCheck %s
# CHECK: {{[ab]}}.o{{.*}}/cache/{{.*}}/C-{{.*}}.pcm' does not exist
# CHECK-NOT: /cache/{{.*}}/C-{.*}.pcm' does not exist
# CHECK: {{[ab]}}.o{{.*}}/cache/{{.*}}/C-{{.*}}.pcm' does not exist
Expand Down
9 changes: 9 additions & 0 deletions llvm/docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,20 @@ Changes to LLDB
stop reason = SIGSEGV: sent by tkill system call (sender pid=649752, uid=2667987)
```
* ELF Cores can now have their siginfo structures inspected using `thread siginfo`.
* LLDB now uses
[DIL](https://discourse.llvm.org/t/rfc-data-inspection-language/69893) as the
default implementation for 'frame variable'. This should not change the
behavior of 'frame variable' at all, at this time. To revert to using the
old implementation use
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a : on the end here, or put the command on the same line, so it's one sentence.

```
settings set target.experimental.use-DIL false
```
* Disassembly of unknown instructions now produces `<unknown>` instead of
nothing at all
* Changed the format of opcode bytes to match llvm-objdump when disassembling
RISC-V code with `disassemble`'s `--byte` option.


### Changes to lldb-dap

* Breakpoints can now be set for specific columns within a line.
Expand Down
Loading