Go to file
Jason Molenda 8825c5c9b4 Re-commit the (fixed) changes from r248985 which were reverted by Pavel
when they introduced android testsuite regressions.  Pavel has run the
testsuite against the updated patch and it completes cleanly now.

The original commit message:


Fixing a subtle issue on Mac OS X systems with dSYMs (possibly
introduced by r235737 but I didn't look into it too closely).

A dSYM can have a per-UUID plist in it which tells lldb where
to find an executable binary for the dSYM (DBGSymbolRichExecutable)
- other information can be included in this plist, like how to
remap the source file paths from their build pathnames to their
long-term storage pathnames.

This per-UUID plist is a unusual; it is used probably exclusively
inside apple with our build system.  It is not created by default
in normal dSYMs.

The problem was like this:

  1. lldb wants to find an executable, given only a UUID
     (this happens when lldb is doing cross-host debugging
      and doesn't have a copy of the target system's binaries)

  2. It eventually calls LocateMacOSXFilesUsingDebugSymbols
     which does a spotlight search for the dSYM on the local
     system, and failing that, tries the DBGShellCommands
     command to find the dSYM.

  3. It gets a dSYM.  It reads the per-UUID plist in the dSYM.
     The dSYM has a DBGSymbolRichExecutable kv pair pointing to
     the binary on a network filesystem.

  4. Using the binary on the network filesystem, lldb now goes
     to find the dSYM.

  5. It starts by looking for a dSYM next to the binary it found.

  6. lldb is now reading the dSYM over a network filesystem,
     ignoring the one it found on its local filesystem earlier.

Everything still *works* but it's much slower.

This would be a tricky one to write up in a testsuite case;
you really need the binary to not exist on the local system.
And LocateMacOSXFilesUsingDebugSymbols will only compile on
Mac OS X - even if I found a way to write up a test case, it
would not run anywhere but on a mac.

One change Greg wanted while I was touching this code was to
have LocateMacOSXFilesUsingDebugSymbols (which could be asked
to find a binary OR find a dSYM) to instead return a ModuleSpec
with the sum total of everything it could find.  This
change of passing around a ModuleSpec instead of a FileSpec
was percolated up into ModuleList::GetSharedModule.

The changes to LocateMacOSXFilesUsingDebugSymbols look larger
than they really are - there's a lot of simple whitespace changes
in there.

I ran the testsuites on mac, no new regressions introduced

<rdar://problem/21993813> 

llvm-svn: 249755
2015-10-08 21:48:35 +00:00
clang Use Triple.isAndroid() where possible. 2015-10-08 21:21:44 +00:00
clang-tools-extra Adding a checker (cert-err52-cpp) that detects use of setjmp or longjmp in C++ code. Corresponds to the CERT C++ secure coding rule: https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=1834 2015-10-08 19:54:43 +00:00
compiler-rt New MSan mapping layout (compiler-rt part). 2015-10-08 21:35:34 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc integer: remove explicit casts from _MIN definitions 2015-10-06 19:12:12 +00:00
libcxx Fix incorrect file header. This is <cfenv> not <cctype>. 2015-10-08 21:17:21 +00:00
libcxxabi Fix incorrect parsing of arguments for nested functions. Reviewed as http://reviews.llvm.org/D13192. Thanks to Anseny Kapoulkine for the patch. 2015-10-08 03:02:09 +00:00
libunwind unwind: Allow the building of libunwind for MIPS. 2015-09-26 18:26:01 +00:00
lld Revert: r249728 - Roll back r249726 and r249723 because they broke buildbots. 2015-10-08 21:25:04 +00:00
lldb Re-commit the (fixed) changes from r248985 which were reverted by Pavel 2015-10-08 21:48:35 +00:00
llgo [llgo] irgen: always use TargetMachine's data layout 2015-09-25 06:28:14 +00:00
llvm New MSan mapping layout (llvm part). 2015-10-08 21:35:26 +00:00
openmp Formatting/Whitespace/Comment changes associated with wait/release improvements. 2015-10-08 19:44:16 +00:00
polly [FIX] Add missing projection for invariant load domains 2015-10-08 11:05:57 +00:00