[llvm-bugs] [Bug 35043] New: lldb incorrectly reports multiple symbols when evaluating expressions (on Linux)
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Oct 23 14:31:00 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=35043
Bug ID: 35043
Summary: lldb incorrectly reports multiple symbols when
evaluating expressions (on Linux)
Product: lldb
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: lldb-dev at lists.llvm.org
Reporter: davide at freebsd.org
CC: llvm-bugs at lists.llvm.org
I think this is a bug in the expression parser/symtab handling, but I can't say
for sure.
given the test in lambdas/main.cpp, after we set a breakpoint on the printf()
and we try to evaluate the lambda, we get:
(lldb) target create "made"
Current executable set to 'made' (x86_64).
(lldb) b main.cpp:14
Breakpoint 1: where = made`main + 32 at main.cpp:14, address =
0x00000000004005f0
(lldb) r
Process 32489 launched:
'/home/davide/work/llvm-lldb/tools/lldb/packages/Python/lldbsuite/test/lang/cpp/lambdas/made'
(x86_64)
Process 32489 stopped
* thread #1, name = 'made', stop reason = breakpoint 1.1
frame #0: 0x00000000004005f0 made`main(argc=1, argv=0x00007fffffffe128) at
main.cpp:14
11
12 int main (int argc, char const *argv[])
13 {
-> 14 printf("Stop here\n"); //% self.runCmd("expression auto $add =
[](int a, int b) { return a + b; }")
15 //% self.expect("expression $add(2,3)",
substrs = ['= 5'])
16 return 0;
17 }
(lldb) expression auto $add = [](int a, int b) { return a + b; }
error: Multiple internal symbols found for 'a'
id = {0x000003cf}, range = [0x00007ffff77ec290-0x00007ffff77ec298), name="a"
id = {0x0000051b}, range = [0x00007ffff77ec290-0x00007ffff77ec298), name="a"
id = {0x000000fe}, range = [0x00007ffff77ec290-0x00007ffff77ec298), name="a"
error: Multiple internal symbols found for 'b'
id = {0x0000051a}, range = [0x00007ffff77cfe70-0x00007ffff77cfe78), name="b"
id = {0x000003ce}, range = [0x00007ffff77cfe70-0x00007ffff77cfe78), name="b"
id = {0x000000fd}, range = [0x00007ffff77cfe70-0x00007ffff77cfe78), name="b"
I don't think that's quite right, as `b` is not really redefined, it's just a
temporary binding that we use for the lambda argument.
This requires a little more knowledge of the internals than I currently have,
so hints on where to look would be appreciated.
I can attach the ELF object, if it's helpful
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171023/5f40b4ad/attachment.html>
More information about the llvm-bugs
mailing list