public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/10590] New: Support template parameters debug info
@ 2009-09-02 18:23 dodji at redhat dot com
  2009-09-02 18:37 ` [Bug gdb/10590] " tromey at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: dodji at redhat dot com @ 2009-09-02 18:23 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug gdb/10590] Support template parameters debug info
  2009-09-02 18:23 [Bug gdb/10590] New: Support template parameters debug info dodji at redhat dot com
@ 2009-09-02 18:37 ` tromey at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: tromey at redhat dot com @ 2009-09-02 18:37 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From tromey at redhat dot com  2009-09-02 18:37 -------


*** This bug has been marked as a duplicate of 9946 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-02 18:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-02 18:23 [Bug gdb/10590] New: Support template parameters debug info dodji at redhat dot com
2009-09-02 18:37 ` [Bug gdb/10590] " tromey at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).