[Lldb-commits] [PATCH] Fix load address resolution on Windows

Greg Clayton clayborg at gmail.com
Thu Jan 22 09:31:11 PST 2015


Close. A couple changed as annotated in the source. There are two categories of unknown:

- specified "unknown" for the vendor or OS where the user actually typed "unknown" in the triple
- unspecified "unknown" for the vendor or OS where the user didn't specify it.

Add the quick fixes I specify above and this patch is good to go.


================
Comment at: source/Core/Module.cpp:1314
@@ +1313,3 @@
+                m_objfile_sp->GetArchitecture (new_arch);
+                if (m_arch.GetTriple().getVendor() == llvm::Triple::UnknownVendor)
+                    m_arch.GetTriple().setVendor(new_arch.GetTriple().getVendor());
----------------
We need to make sure the vendor wasn't specified as "unknown" by also calling:

bool ArchSpec::TripleVendorWasSpecified(). So the above line should be:

```
if (m_arch.GetTriple().getVendor() == llvm::Triple::UnknownVendor && m_arch.TripleVendorWasSpecified())
```

================
Comment at: source/Core/Module.cpp:1316
@@ +1315,3 @@
+                    m_arch.GetTriple().setVendor(new_arch.GetTriple().getVendor());
+                if (m_arch.GetTriple().getOS() == llvm::Triple::UnknownOS)
+                    m_arch.GetTriple().setOS(new_arch.GetTriple().getOS());
----------------
Save thing as the previous, make sure "unknown" wasn't specified:

```
if (m_arch.GetTriple().getOS() == llvm::Triple::UnknownOS && m_arch.TripleOSWasSpecified())
```

http://reviews.llvm.org/D7120

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list