https://llvm.org/bugs/show_bug.cgi?id=24269

            Bug ID: 24269
           Summary: [debug info] Template parameter packs - incorrect
                    arguments in appear in gdb
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

$ cat /tmp/d2.cpp 
#include <iostream>
using namespace std;

template <typename ... T>
void foo(T ... t) {
  cout << "here\n";
}

int main() {
  foo(3, 3, 5, 6);
}

$ clang++ -std=c++14 -g -o ~/tmp/d /tmp/d2.cpp

$ gdb ~/tmp/d
GNU gdb (GDB) 7.7
...
Reading symbols from ~/tmp/d...done.
(gdb) b main
Breakpoint 1 at 0x4007a3: file /tmp/d2.cpp, line 10.
(gdb) s
The program is not being run.
(gdb) r
Starting program: ~/tmp/d 

Breakpoint 1, main () at /tmp/d2.cpp:10
10      foo(3, 3, 5, 6);
(gdb) s
foo<int, int, int, int> (t=6, t=6, t=6, t=6) at /tmp/d2.cpp:6
6      cout << "here\n";
(gdb) p t
$1 = 6
(gdb) quit

The '(t=6, t=6, t=6, t=6)' bit is clearly wrong. This obviously might be a gdb
bug; I don't know how to tell. FWIW, MS Visual Studio produces
pseudo-parameters t_0, t_1, etc. Perhaps that would be better?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to