[LLVMbugs] [Bug 12192] New: Debug metadata does not contain source variable name

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 5 18:47:42 PST 2012


http://llvm.org/bugs/show_bug.cgi?id=12192

             Bug #: 12192
           Summary: Debug metadata does not contain source variable name
           Product: dragonegg
           Version: 3.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: New Bugs
        AssignedTo: baldrick at free.fr
        ReportedBy: ashay.r at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Here is an example source code:
struct s_def
{
        char c;
        int y;
        float f;
};

float func()
{
        struct s_def s;
        s.c = '0';
        return s.f;
}

The relevant portions of the bitcode are here:
  call void @llvm.dbg.declare(metadata !{%struct.s_def* %memtmp}, metadata !7),
!dbg !15
  %0 = getelementptr inbounds %struct.s_def* %memtmp, i32 0, i32 0, !dbg !16
  store i8 48, i8* %0, align 1, !dbg !16

!7 = metadata !{i32 655616, metadata !0, metadata !"memtmp", metadata !1, i32
11, metadata !8, i32 0, i32 0}
!8 = metadata !{i32 655379, metadata !1, metadata !"s_def", metadata !1, i32 2,
i64 96, i64 32, i64 0, i32 0, null, metadata !9, i32 0, null}
!9 = metadata !{metadata !10, metadata !12, metadata !14}

The metadata refers to `memtmp' but not to the variable `s' (as it is called in
the source code).

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list