[lldb-dev] [Bug 20297] New: can't set file:line breakpoint in ccache compiled source

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jul 14 12:19:05 PDT 2014


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

            Bug ID: 20297
           Summary: can't set file:line breakpoint in ccache compiled
                    source
           Product: lldb
           Version: 3.4
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at cs.uiuc.edu
          Reporter: vharron at google.com
    Classification: Unclassified

ccache compiled code has *.i filenames instead of *.c file names so the
breakpoint can't be found.

FWIW, I don't know how it does it, but mingw/gdb can set breakpoints in ccache
compiled files just fine.

vharron-macbookpro:bp vharron$ cat bp.c
#include <stdio.h>

int
main() {
  printf("Hello, World!\n");
  return 0;
}

working case:

vharron-macbookpro:bp vharron$ gcc -c -o bp.o bp.c
vharron-macbookpro:bp vharron$ gcc -o bp bp.o
vharron-macbookpro:bp vharron$ lldb bp
Current executable set to 'bp' (x86_64).
(lldb) b bp.c:5
Breakpoint 1: where = bp`main + 22 at bp.c:5, address = 0x0000000100000f56
(lldb) r
Process 6218 launched: '/Users/vharron/dev/bp/bp' (x86_64)
Process 6218 stopped
* thread #1: tid = 0xa93b9, 0x0000000100000f56 bp`main + 22 at bp.c:5, queue =
'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000100000f56 bp`main + 22 at bp.c:5
   2       
   3       int
   4       main() {
-> 5         printf("Hello, World!\n");
   6         return 0;
   7       }
   8       
(lldb) quit

vharron-macbookpro:bp vharron$ ccache gcc -g -c -o bp.o bp.c
vharron-macbookpro:bp vharron$ gcc -o bp bp.o
vharron-macbookpro:bp vharron$ lldb bp
Current executable set to 'bp' (x86_64).
(lldb) b bp.c:5
Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) quit


(my ccache is from macports)

vharron-macbookpro:bp vharron$ ccache --version
ccache version 3.1.9

Copyright (C) 2002-2007 Andrew Tridgell
Copyright (C) 2009-2011 Joel Rosdahl

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.
vharron-macbookpro:bp vharron$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140714/263e729b/attachment.html>


More information about the lldb-dev mailing list