[lldb-dev] ArchSpec IsCompatibleMatch()

Zachary Turner zturner at google.com
Wed Jul 23 13:47:21 PDT 2014


I'm trying to understand what the semantics of this function are.  When it
refers to compatibility, how much compatibility is required?

To use a concrete example, consider the following architectures:

        eCore_x86_32_i386,
        eCore_x86_32_i486,
        eCore_x86_32_i486sx,
        eCore_x86_32_i686,

These all fall under the category of "x86 architectures".  So if someone
were to call IsCompatibleMatch(arch1.core = eCore_x86_32_i386, arch2.core =
eCore_x86_32_i686) would these cores be considered matching or non-matching?

The reason I ask is that when we load a PE / Coff executable, we can get
from the PE file the x86_32 file part, but we can't get whether it was
built specifically for a 386, 486, etc.  Currently we are just using the
value eCore_x86_32_i386 since we don't know how to be more specific, but
this fails to find an architecture match later on in the process.  One
possible fix is to use kCore_x86_32_any, which would cause the match to
succeed.  Another possible fix is to make the match function always use
wildcard matching for this set of architectures.  But then later if someone
needs a more specific definition of compatibility, this might not work.

Anyone have suggestions as to what is the correct fix?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140723/cb82853c/attachment.html>


More information about the lldb-dev mailing list