https://llvm.org/bugs/show_bug.cgi?id=26694
Bug ID: 26694 Summary: Expression evaluation broken for__attribute__((overloadable)) Product: lldb Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: lldb-dev@lists.llvm.org Reporter: e...@codeplay.com CC: llvm-b...@lists.llvm.org, scalla...@apple.com Classification: Unclassified Created attachment 15932 --> https://llvm.org/bugs/attachment.cgi?id=15932&action=edit Example C file and compiled binary Commit r260768 broke expression evaluation for C functions with __attribute__((overloadable)) See attached example compiled with clang -g -O0 Before this commit the correct decl of evaluated function 'MyFunc' was chosen. (lldb) target create "overloadable" Current executable set to 'overloadable' (x86_64). (lldb) b 19 Breakpoint 1: where = overloadable`main + 44 at overloadable.c:19, address = 0x00000000004005bc (lldb) r Process 7127 launched: '/home/ewan/Desktop/Scratch/overloadable' (x86_64) This is a float function This is an integer function Process 7127 stopped * thread #1: tid = 7127, 0x00000000004005bc overloadable`main + 44 at overloadable.c:19, name = 'overloadable', stop reason = breakpoint 1.1 frame #0: 0x00000000004005bc overloadable`main + 44 at overloadable.c:19 16 MyFunc(2.0f); 17 int x = MyFunc(2); 18 -> 19 return 0; 20 } (lldb) expr -- MyFunc('a') This is an integer function (int) $0 = 97 (lldb) expr -- MyFunc(2) This is an integer function (int) $1 = 2 (lldb) expr -- MyFunc(2.0f) This is a float function Now however the the first decl looks like it's always chosen, incorrectly in these cases. (lldb) target create "overloadable" Current executable set to 'overloadable' (x86_64). (lldb) b 19 Breakpoint 1: where = overloadable`main + 44 at overloadable.c:19, address = 0x00000000004005bc (lldb) r Process 6992 launched: '/home/ewan/Desktop/Scratch/overloadable' (x86_64) This is a float function This is an integer function Process 6992 stopped * thread #1: tid = 6992, 0x00000000004005bc overloadable`main + 44 at overloadable.c:19, name = 'overloadable', stop reason = breakpoint 1.1 frame #0: 0x00000000004005bc overloadable`main + 44 at overloadable.c:19 16 MyFunc(2.0f); 17 int x = MyFunc(2); 18 -> 19 return 0; 20 } (lldb) expr -- MyFunc('a') This is a float function (int) $0 = 25 (lldb) expr -- MyFunc(2) This is a float function -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev