This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/10590] New: Support template parameters debug info


GCC 4.5 generates debug info for template parameters. Look at
http://gcc.gnu.org/wiki/TemplateParmsDwarf for more details.

It would be nice if GDB could support that so that the following debugging
session wouldn't fail:

Example program and debug session:
----------------------
#include <cstdlib>

template <int dim> struct X {
    X(){ abort(); };
};

int main () {
  X<1> x;
};
-----------------

When executed, the program stops at the site of the abort.
In a debugger, then try this:
-----------------
(gdb) r
Starting program: /home/bangerth/tmp/gcc/a.out

Program received signal SIGABRT, Aborted.
0x40131ab1 in kill () from /lib/libc.so.6
(gdb) bt
#0  0x40131ab1 in kill () from /lib/libc.so.6
#1  0x401318a8 in raise () from /lib/libc.so.6
#2  0x40132edb in abort () from /lib/libc.so.6
#3  0x080485ab in X<1>::X() () at x.cc:4
#4  0x0804855b in main () at x.cc:8
#5  0x401209ed in __libc_start_main () from /lib/libc.so.6
(gdb) fr 3
#3  0x080485ab in X<1>::X() () at x.cc:4
4           X(){ abort(); };
(gdb) p dim
No symbol "dim" in current context.

-- 
           Summary: Support template parameters debug info
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: gdb
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: dodji at redhat dot com
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10590

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]