<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - can't set file:line breakpoint in ccache compiled source"
   href="http://llvm.org/bugs/show_bug.cgi?id=20297">20297</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>can't set file:line breakpoint in ccache compiled source
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.4
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vharron@google.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>