[LLVMbugs] [Bug 13211] New: debug info sometimes fails when breaking by function name

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 25 23:10:16 PDT 2012


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

             Bug #: 13211
           Summary: debug info sometimes fails when breaking by function
                    name
           Product: clang
           Version: 3.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: b.r.longbons at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8765
  --> http://llvm.org/bugs/attachment.cgi?id=8765
demonstration as referenced in the description

This is weird:

I'm compiling with -O0 -g, but debug info does not turn out usable.

Breakpoints can be set on a function name, but they often do not allow expected
actions such as stepping or printing local variables.

With the attached file, I have observed the following:
* Hitting a breakpoint on just main works, including stepping into not_main.
* Hitting a breakpoint on not_main does not work, and shows bad values for the
arguments. This happens even if you were stepping from the outer breakpoint. It
manages to fix itself during the call to puts.
* For the cases that fail, setting the breakpoint does not print out a file and
line; 'step' afterwards says "single-stepping from <correct function name>,
which has no line number information", which may execute the rest of the
function, or might stop if it calls another function.
* Breakpoints set by file:line always work.


My system is amd64, Debian testing, with just the clang package installed from
unstable (so I could get 3.1 instead of 3.0).

GNU gdb (GDB) 7.4.1-debian
Debian clang version 3.1-4 (branches/release_31) (based on LLVM 3.1)

-- 
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