[Bug 146] New: Wrong filename in DWARF debugging information for templates

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 18 09:02:15 PDT 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=146

           Summary: Wrong filename in DWARF debugging information for
                    templates
           Product: D
           Version: 0.157
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: me at teqdruid.com


When a template is used, DMD puts the filename in which the template was
instianted into the DWARF debugging information, so one can't debug templated
code, which makes me a sad panda.  This might be a symptom of a large problem
along with bug #107.

Example:
teqdruid at teqBook:~/workspace/test$ cat test1.d
import test2;

void main()
{
        t!().foo();
}teqdruid at teqBook:~/workspace/test$ cat test2.d
template t()
{
        void foo()
        {
                Object o = null;
                o.toString(); //Segfault
        }
}teqdruid at teqBook:~/workspace/test$ gdb test1
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library
"/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) run
Starting program: /home/teqdruid/workspace/test/test1 
[Thread debugging using libthread_db enabled]
[New Thread -1210018112 (LWP 9605)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210018112 (LWP 9605)]
_D5test26__T1tZ3fooFZv () at test1.d:6
6       }Current language:  auto; currently minimal
(gdb) bt
#0  _D5test26__T1tZ3fooFZv () at test1.d:6
#1  0x0804bb4c in _Dmain () at test1.d:5
#2  0x0804ccf3 in main ()
(gdb)


-- 




More information about the Digitalmars-d-bugs mailing list