<html>
    <head>
      <base href="https://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 --- - error: failed to load objectfile for static-linking archives?"
   href="https://llvm.org/bugs/show_bug.cgi?id=28017">28017</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>error: failed to load objectfile for static-linking archives?
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.6
          </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@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>chris+llvm@qwirx.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I'm having trouble debugging my application with LLDB on Mac because it seems
to fail to find some of the compiled object files, which are inside a static
link library (.a file). Objects which are compiled directly into the binary
seem to be OK.

I get errors like this when I first try to access line-level information:

(lldb) l BackupStoreFile.cpp
error: backupstore.a(BackupStoreFile.o) failed to load objfile for
/Users/chris/projects/2004/boxi/bb-git/bin/bbackupquery/../../debug/lib/backupstore/backupstore.a
error: backupstore.a(BackupCommands.o) failed to load objfile for
/Users/chris/projects/2004/boxi/bb-git/bin/bbackupquery/../../debug/lib/backupstore/backupstore.a
...
error: common.a(autogen_CommonException.o) failed to load objfile for
/Users/chris/projects/2004/boxi/bb-git/bin/bbackupquery/../../debug/lib/common/common.a
error: Could not find source file "BackupStoreFile.cpp".

I suspect that either lldb does not fully understand the .a archive format, or
another bug prevents it from locating the correct object file inside the
archive. It is definitely there:

chris@Chriss-MacBook-Pro(backupstorepatch)$ ar t
/Users/chris/projects/2004/boxi/bb-git/bin/bbackupquery/../../debug/lib/backupstore/backupstore.a
__.SYMDEF
BackupAccountControl.o
...
BackupStoreDirectory.o
BackupStoreFile.o
BackupStoreFileCmbDiff.o
...</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>