Inspect template parameter pack in gdb
<p>I'm trying to debug the following simple program:</p>

<pre><code>#include &lt;iostream&gt;

template &lt;class... Args&gt;
void printAll(Args&amp;&amp;... args) {
    using swallow = int[];
    swallow{0,
        (std::cout &lt;&lt; args, 0)...
    };  
}

int main() {
    printAll(1, "23", 4); 
}
</code></pre>

<p>Compiled with gcc 4.9.2 using:</p>

<pre><code>g++ -std=c++11 -g -O0 foo.cxx
</code></pre>

<p>And then debugging with gdb 7.9 using:</p>

<pre><code>gdb a.out

(gdb) break foo.cxx:5
Breakpoint 1 at 0x400884: file foo.cxx, line 5.
(gdb) run
Starting program: /..[snip]../a.out 

Breakpoint 1, printAll&lt;int, char const (&amp;) [3], int&gt;(int&amp;&amp;, char const (&amp;) [3], int&amp;&amp;) () at foo.cxx:6
6       swallow{0,
(gdb) bt
#0  printAll&lt;int, char const (&amp;) [3], int&gt;(int&amp;&amp;, char const (&amp;) [3], int&amp;&amp;) () at foo.cxx:6
#1  0x0000000000400813 in main () at foo.cxx:12
</code></pre>

<p>I'm in the right function, but I have no way to inspect the parameter pack:</p>

<pre><code>(gdb) info args
No arguments.
(gdb) print args
No symbol "args" in current context.
(gdb) inspect args
No symbol "args" in current context.
</code></pre>

<p>How do I actually examine the arguments? </p>