The DWO handling code can get confused by clang modules which also use skeleton CUs to point to the object file with the full debug info. This patch detects whether an object is a "real" DWO or a clang module and prevents LLDB from interpreting clang modules as DWO. This fixes the regression in TestWithModuleDebugging.
I was under the impression that this was found by a test case failure.
Anyway, given that we've got different kinds of DWARF CU's, wouldn't it be better to add an attribute describing them, rather than using semi-unrelated pieces of information like this? I wouldn't hold up this patch on that suggestion, but this does seem kind of indirect...
I looked at this briefly last week but I could not find a good fix in the amount of time I had left. This fixes the current test failure, but it does not fix the underlying bug, which is that we (sometimes?) set the compile unit offset for non-dwo, non-dsym DIEs as 0. This works fine if all compile units are regular dwarf as we have logic to locate the containing CU if the offset is zero. However, it can fail in case of mixed dwarf and dwo compile units. My guess is you could still reproduce this bug with a so file that has a dwo compile unit at offset zero.
That said, I don't think this makes things any worse, so I have no objections to this patch.